From b0477cb7a70cb6e90cd014e3e12b2c4788a071a7 Mon Sep 17 00:00:00 2001 From: Joe Esposito Date: Mon, 9 Jun 2014 18:58:08 -0400 Subject: [PATCH] Upgrade to a modern code style. --- TrayMe/AboutForm.Designer.cs | 132 +- TrayMe/AboutForm.cs | 30 +- TrayMe/MainForm.Designer.cs | 182 +- TrayMe/MainForm.cs | 164 +- TrayMe/Program.cs | 95 +- TrayMe/ShellShortcut.cs | 92 +- TrayMe/TrayMe.cs | 18 +- TrayMe/Win32.cs | 20156 ++++++++++++++++----------------- TrayMe/Win32Ex.cs | 86 +- TrayMeDll/Main.cpp | 1168 +- TrayMeDll/Main.h | 6 +- 11 files changed, 11065 insertions(+), 11064 deletions(-) diff --git a/TrayMe/AboutForm.Designer.cs b/TrayMe/AboutForm.Designer.cs index 747262a..647f0a6 100644 --- a/TrayMe/AboutForm.Designer.cs +++ b/TrayMe/AboutForm.Designer.cs @@ -21,14 +21,14 @@ partial class AboutForm /// Releases unmanaged and - optionally - managed resources /// /// true to release both managed and unmanaged resources; false to release only unmanaged resources. - protected override void Dispose( bool disposing ) + protected override void Dispose(bool disposing) { - if( disposing ) + if (disposing) { - if( components != null ) + if (components != null) components.Dispose(); } - base.Dispose( disposing ); + base.Dispose(disposing); } #region Windows Form Designer generated code @@ -39,7 +39,7 @@ protected override void Dispose( bool disposing ) /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager( typeof( AboutForm ) ); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutForm)); this.labelVersion = new System.Windows.Forms.Label(); this.picLogo = new System.Windows.Forms.PictureBox(); this.panelAbout = new System.Windows.Forms.Panel(); @@ -51,7 +51,7 @@ private void InitializeComponent() this.labelTitle = new System.Windows.Forms.Label(); this.buttonClose = new System.Windows.Forms.Button(); this.labelRevision = new System.Windows.Forms.Label(); - ( (System.ComponentModel.ISupportInitialize)( this.picLogo ) ).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.picLogo)).BeginInit(); this.panelAbout.SuspendLayout(); this.picDescription.SuspendLayout(); this.SuspendLayout(); @@ -59,109 +59,109 @@ private void InitializeComponent() // labelVersion // this.labelVersion.AutoSize = true; - this.labelVersion.Font = new System.Drawing.Font( "Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( (byte)( 0 ) ) ); - this.labelVersion.Location = new System.Drawing.Point( 12, 220 ); + this.labelVersion.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelVersion.Location = new System.Drawing.Point(12, 220); this.labelVersion.Name = "labelVersion"; - this.labelVersion.Size = new System.Drawing.Size( 45, 13 ); + this.labelVersion.Size = new System.Drawing.Size(45, 13); this.labelVersion.TabIndex = 3; this.labelVersion.Text = "Version:"; - this.labelVersion.Resize += new System.EventHandler( this.labelVersion_Resize ); + this.labelVersion.Resize += new System.EventHandler(this.labelVersion_Resize); // // picLogo // - this.picLogo.Image = ( (System.Drawing.Image)( resources.GetObject( "picLogo.Image" ) ) ); - this.picLogo.Location = new System.Drawing.Point( 12, 8 ); + this.picLogo.Image = ((System.Drawing.Image)(resources.GetObject("picLogo.Image"))); + this.picLogo.Location = new System.Drawing.Point(12, 8); this.picLogo.Name = "picLogo"; - this.picLogo.Size = new System.Drawing.Size( 32, 32 ); + this.picLogo.Size = new System.Drawing.Size(32, 32); this.picLogo.TabIndex = 10; this.picLogo.TabStop = false; // // panelAbout // - this.panelAbout.BackColor = System.Drawing.Color.FromArgb( ( (int)( ( (byte)( 70 ) ) ) ), ( (int)( ( (byte)( 89 ) ) ) ), ( (int)( ( (byte)( 117 ) ) ) ) ); - this.panelAbout.BackgroundImage = ( (System.Drawing.Image)( resources.GetObject( "panelAbout.BackgroundImage" ) ) ); + this.panelAbout.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(70)))), ((int)(((byte)(89)))), ((int)(((byte)(117))))); + this.panelAbout.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelAbout.BackgroundImage"))); this.panelAbout.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panelAbout.Controls.Add( this.linkHomepageLink ); - this.panelAbout.Controls.Add( this.labelHomepageTitle ); - this.panelAbout.Controls.Add( this.labelAuthor ); - this.panelAbout.Controls.Add( this.picDescription ); - this.panelAbout.Location = new System.Drawing.Point( 12, 48 ); + this.panelAbout.Controls.Add(this.linkHomepageLink); + this.panelAbout.Controls.Add(this.labelHomepageTitle); + this.panelAbout.Controls.Add(this.labelAuthor); + this.panelAbout.Controls.Add(this.picDescription); + this.panelAbout.Location = new System.Drawing.Point(12, 48); this.panelAbout.Name = "panelAbout"; - this.panelAbout.Size = new System.Drawing.Size( 284, 160 ); + this.panelAbout.Size = new System.Drawing.Size(284, 160); this.panelAbout.TabIndex = 2; // // linkHomepageLink // - this.linkHomepageLink.ActiveLinkColor = System.Drawing.Color.FromArgb( ( (int)( ( (byte)( 200 ) ) ) ), ( (int)( ( (byte)( 228 ) ) ) ), ( (int)( ( (byte)( 164 ) ) ) ) ); + this.linkHomepageLink.ActiveLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(228)))), ((int)(((byte)(164))))); this.linkHomepageLink.AutoSize = true; this.linkHomepageLink.BackColor = System.Drawing.Color.Transparent; - this.linkHomepageLink.DisabledLinkColor = System.Drawing.Color.FromArgb( ( (int)( ( (byte)( 136 ) ) ) ), ( (int)( ( (byte)( 136 ) ) ) ), ( (int)( ( (byte)( 136 ) ) ) ) ); - this.linkHomepageLink.Font = new System.Drawing.Font( "Microsoft Sans Serif", 11.484F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ( (byte)( 0 ) ) ); - this.linkHomepageLink.ForeColor = System.Drawing.Color.FromArgb( ( (int)( ( (byte)( 154 ) ) ) ), ( (int)( ( (byte)( 175 ) ) ) ), ( (int)( ( (byte)( 162 ) ) ) ) ); + this.linkHomepageLink.DisabledLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(136)))), ((int)(((byte)(136)))), ((int)(((byte)(136))))); + this.linkHomepageLink.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.484F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(0))); + this.linkHomepageLink.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(154)))), ((int)(((byte)(175)))), ((int)(((byte)(162))))); this.linkHomepageLink.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; - this.linkHomepageLink.LinkColor = System.Drawing.Color.FromArgb( ( (int)( ( (byte)( 154 ) ) ) ), ( (int)( ( (byte)( 175 ) ) ) ), ( (int)( ( (byte)( 162 ) ) ) ) ); - this.linkHomepageLink.Location = new System.Drawing.Point( 144, 136 ); + this.linkHomepageLink.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(154)))), ((int)(((byte)(175)))), ((int)(((byte)(162))))); + this.linkHomepageLink.Location = new System.Drawing.Point(144, 136); this.linkHomepageLink.Name = "linkHomepageLink"; - this.linkHomepageLink.Size = new System.Drawing.Size( 137, 15 ); + this.linkHomepageLink.Size = new System.Drawing.Size(137, 15); this.linkHomepageLink.TabIndex = 3; this.linkHomepageLink.TabStop = true; this.linkHomepageLink.Text = "www.uber-ware.com"; - this.linkHomepageLink.VisitedLinkColor = System.Drawing.Color.FromArgb( ( (int)( ( (byte)( 154 ) ) ) ), ( (int)( ( (byte)( 175 ) ) ) ), ( (int)( ( (byte)( 162 ) ) ) ) ); - this.linkHomepageLink.MouseLeave += new System.EventHandler( this.linkHomepageLink_MouseLeave ); - this.linkHomepageLink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler( this.linkHomepageLink_LinkClicked ); - this.linkHomepageLink.MouseEnter += new System.EventHandler( this.linkHomepageLink_MouseEnter ); + this.linkHomepageLink.VisitedLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(154)))), ((int)(((byte)(175)))), ((int)(((byte)(162))))); + this.linkHomepageLink.MouseLeave += new System.EventHandler(this.linkHomepageLink_MouseLeave); + this.linkHomepageLink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkHomepageLink_LinkClicked); + this.linkHomepageLink.MouseEnter += new System.EventHandler(this.linkHomepageLink_MouseEnter); // // labelHomepageTitle // this.labelHomepageTitle.AutoSize = true; this.labelHomepageTitle.BackColor = System.Drawing.Color.Transparent; - this.labelHomepageTitle.Font = new System.Drawing.Font( "Microsoft Sans Serif", 11.484F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ( (byte)( 0 ) ) ); - this.labelHomepageTitle.ForeColor = System.Drawing.Color.FromArgb( ( (int)( ( (byte)( 154 ) ) ) ), ( (int)( ( (byte)( 175 ) ) ) ), ( (int)( ( (byte)( 162 ) ) ) ) ); - this.labelHomepageTitle.Location = new System.Drawing.Point( 176, 118 ); + this.labelHomepageTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.484F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(0))); + this.labelHomepageTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(154)))), ((int)(((byte)(175)))), ((int)(((byte)(162))))); + this.labelHomepageTitle.Location = new System.Drawing.Point(176, 118); this.labelHomepageTitle.Name = "labelHomepageTitle"; - this.labelHomepageTitle.Size = new System.Drawing.Size( 103, 15 ); + this.labelHomepageTitle.Size = new System.Drawing.Size(103, 15); this.labelHomepageTitle.TabIndex = 2; this.labelHomepageTitle.Text = "uber-ware labs"; // // labelAuthor // this.labelAuthor.BackColor = System.Drawing.Color.Transparent; - this.labelAuthor.ForeColor = System.Drawing.Color.FromArgb( ( (int)( ( (byte)( 154 ) ) ) ), ( (int)( ( (byte)( 175 ) ) ) ), ( (int)( ( (byte)( 162 ) ) ) ) ); - this.labelAuthor.Location = new System.Drawing.Point( 12, 80 ); + this.labelAuthor.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(154)))), ((int)(((byte)(175)))), ((int)(((byte)(162))))); + this.labelAuthor.Location = new System.Drawing.Point(12, 80); this.labelAuthor.Name = "labelAuthor"; - this.labelAuthor.Size = new System.Drawing.Size( 264, 15 ); + this.labelAuthor.Size = new System.Drawing.Size(264, 15); this.labelAuthor.TabIndex = 1; this.labelAuthor.Text = "Designed and Coded by Joe Esposito"; this.labelAuthor.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // picDescription // - this.picDescription.BackColor = System.Drawing.Color.FromArgb( ( (int)( ( (byte)( 35 ) ) ) ), ( (int)( ( (byte)( 44 ) ) ) ), ( (int)( ( (byte)( 58 ) ) ) ) ); - this.picDescription.BackgroundImage = ( (System.Drawing.Image)( resources.GetObject( "picDescription.BackgroundImage" ) ) ); + this.picDescription.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(44)))), ((int)(((byte)(58))))); + this.picDescription.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("picDescription.BackgroundImage"))); this.picDescription.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.picDescription.Controls.Add( this.labelDescription ); - this.picDescription.Location = new System.Drawing.Point( 8, 8 ); + this.picDescription.Controls.Add(this.labelDescription); + this.picDescription.Location = new System.Drawing.Point(8, 8); this.picDescription.Name = "picDescription"; - this.picDescription.Size = new System.Drawing.Size( 268, 64 ); + this.picDescription.Size = new System.Drawing.Size(268, 64); this.picDescription.TabIndex = 0; // // labelDescription // this.labelDescription.BackColor = System.Drawing.Color.Transparent; this.labelDescription.ForeColor = System.Drawing.SystemColors.ControlLight; - this.labelDescription.Location = new System.Drawing.Point( 4, 8 ); + this.labelDescription.Location = new System.Drawing.Point(4, 8); this.labelDescription.Name = "labelDescription"; - this.labelDescription.Size = new System.Drawing.Size( 256, 48 ); + this.labelDescription.Size = new System.Drawing.Size(256, 48); this.labelDescription.TabIndex = 0; this.labelDescription.Text = "[ Description ]"; this.labelDescription.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // labelTitle // - this.labelTitle.Font = new System.Drawing.Font( "Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ( (byte)( 0 ) ) ); - this.labelTitle.Location = new System.Drawing.Point( 48, 20 ); + this.labelTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelTitle.Location = new System.Drawing.Point(48, 20); this.labelTitle.Name = "labelTitle"; - this.labelTitle.Size = new System.Drawing.Size( 248, 16 ); + this.labelTitle.Size = new System.Drawing.Size(248, 16); this.labelTitle.TabIndex = 0; this.labelTitle.Text = "[ Title ]"; this.labelTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -169,9 +169,9 @@ private void InitializeComponent() // buttonClose // this.buttonClose.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonClose.Location = new System.Drawing.Point( 208, 220 ); + this.buttonClose.Location = new System.Drawing.Point(208, 220); this.buttonClose.Name = "buttonClose"; - this.buttonClose.Size = new System.Drawing.Size( 84, 32 ); + this.buttonClose.Size = new System.Drawing.Size(84, 32); this.buttonClose.TabIndex = 1; this.buttonClose.Text = "&Close"; // @@ -179,24 +179,24 @@ private void InitializeComponent() // this.labelRevision.AutoSize = true; this.labelRevision.ForeColor = System.Drawing.SystemColors.GrayText; - this.labelRevision.Location = new System.Drawing.Point( 68, 220 ); + this.labelRevision.Location = new System.Drawing.Point(68, 220); this.labelRevision.Name = "labelRevision"; - this.labelRevision.Size = new System.Drawing.Size( 51, 13 ); + this.labelRevision.Size = new System.Drawing.Size(51, 13); this.labelRevision.TabIndex = 4; this.labelRevision.Text = "Revision:"; // // frmAbout // this.AcceptButton = this.buttonClose; - this.AutoScaleBaseSize = new System.Drawing.Size( 5, 13 ); + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.CancelButton = this.buttonClose; - this.ClientSize = new System.Drawing.Size( 306, 264 ); - this.Controls.Add( this.labelVersion ); - this.Controls.Add( this.labelRevision ); - this.Controls.Add( this.picLogo ); - this.Controls.Add( this.panelAbout ); - this.Controls.Add( this.labelTitle ); - this.Controls.Add( this.buttonClose ); + this.ClientSize = new System.Drawing.Size(306, 264); + this.Controls.Add(this.labelVersion); + this.Controls.Add(this.labelRevision); + this.Controls.Add(this.picLogo); + this.Controls.Add(this.panelAbout); + this.Controls.Add(this.labelTitle); + this.Controls.Add(this.buttonClose); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.MaximizeBox = false; this.MinimizeBox = false; @@ -204,12 +204,12 @@ private void InitializeComponent() this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "About"; - this.Load += new System.EventHandler( this.AboutForm_Load ); - ( (System.ComponentModel.ISupportInitialize)( this.picLogo ) ).EndInit(); - this.panelAbout.ResumeLayout( false ); + this.Load += new System.EventHandler(this.AboutForm_Load); + ((System.ComponentModel.ISupportInitialize)(this.picLogo)).EndInit(); + this.panelAbout.ResumeLayout(false); this.panelAbout.PerformLayout(); - this.picDescription.ResumeLayout( false ); - this.ResumeLayout( false ); + this.picDescription.ResumeLayout(false); + this.ResumeLayout(false); this.PerformLayout(); } diff --git a/TrayMe/AboutForm.cs b/TrayMe/AboutForm.cs index 4464654..9ceac44 100644 --- a/TrayMe/AboutForm.cs +++ b/TrayMe/AboutForm.cs @@ -29,7 +29,7 @@ public AboutForm() /// /// The source of the event. /// The instance containing the event data. - private void AboutForm_Load( object sender, System.EventArgs e ) + private void AboutForm_Load(object sender, System.EventArgs e) { string m_strProductVersion; string m_strVersion; @@ -38,14 +38,14 @@ private void AboutForm_Load( object sender, System.EventArgs e ) m_strProductVersion = System.Windows.Forms.Application.ProductVersion; - i = m_strProductVersion.IndexOf( "." ); - if( i >= 0 ) - i = m_strProductVersion.IndexOf( ".", ( i + 1 ) ); - m_strVersion = ( ( i >= 0 ) ? ( m_strProductVersion.Substring( 0, i ) ) : ( "0" ) ); + i = m_strProductVersion.IndexOf("."); + if (i >= 0) + i = m_strProductVersion.IndexOf(".", (i + 1)); + m_strVersion = ((i >= 0) ? (m_strProductVersion.Substring(0, i)) : ("0")); - if( i >= 0 ) - i = m_strProductVersion.IndexOf( ".", ( i + 1 ) ); - m_strRevision = ( ( i >= 0 ) ? ( m_strProductVersion.Substring( i + 1 ) ) : ( "0" ) ); + if (i >= 0) + i = m_strProductVersion.IndexOf(".", (i + 1)); + m_strRevision = ((i >= 0) ? (m_strProductVersion.Substring(i + 1)) : ("0")); labelVersion.Text = "Version: " + m_strVersion; labelRevision.Text = "[Revision: " + m_strRevision + "]"; @@ -56,21 +56,21 @@ private void AboutForm_Load( object sender, System.EventArgs e ) /// /// The source of the event. /// The instance containing the event data. - private void linkHomepageLink_LinkClicked( object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e ) + private void linkHomepageLink_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) { try { // Call the Process.Start method to open the default browser with a URL: - System.Diagnostics.Process.Start( "http://www.uber-ware.com" ); + System.Diagnostics.Process.Start("http://www.uber-ware.com"); } - catch( Win32Exception ) + catch (Win32Exception) { // Ignore false Windows exceptions since the browser still opens. } catch { // Failsafe - MessageBox.Show( this, "Could not open the link.", ( AppTitle + " Error" ).TrimStart( ' ' ), MessageBoxButtons.OK, MessageBoxIcon.Error ); + MessageBox.Show(this, "Could not open the link.", (AppTitle + " Error").TrimStart(' '), MessageBoxButtons.OK, MessageBoxIcon.Error); } } @@ -79,7 +79,7 @@ private void linkHomepageLink_LinkClicked( object sender, System.Windows.Forms.L /// /// The source of the event. /// The instance containing the event data. - private void linkHomepageLink_MouseEnter( object sender, System.EventArgs e ) + private void linkHomepageLink_MouseEnter(object sender, System.EventArgs e) { linkHomepageLink.LinkColor = linkHomepageLink.ActiveLinkColor; } @@ -89,7 +89,7 @@ private void linkHomepageLink_MouseEnter( object sender, System.EventArgs e ) /// /// The source of the event. /// The instance containing the event data. - private void linkHomepageLink_MouseLeave( object sender, System.EventArgs e ) + private void linkHomepageLink_MouseLeave(object sender, System.EventArgs e) { linkHomepageLink.LinkColor = linkHomepageLink.ForeColor; } @@ -99,7 +99,7 @@ private void linkHomepageLink_MouseLeave( object sender, System.EventArgs e ) /// /// The source of the event. /// The instance containing the event data. - private void labelVersion_Resize( object sender, System.EventArgs e ) + private void labelVersion_Resize(object sender, System.EventArgs e) { labelRevision.Left = labelVersion.Left + labelVersion.Width; } diff --git a/TrayMe/MainForm.Designer.cs b/TrayMe/MainForm.Designer.cs index cbbda7b..4404a61 100644 --- a/TrayMe/MainForm.Designer.cs +++ b/TrayMe/MainForm.Designer.cs @@ -32,13 +32,13 @@ partial class MainForm /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose( bool disposing ) + protected override void Dispose(bool disposing) { - if( disposing && ( components != null ) ) + if (disposing && (components != null)) { components.Dispose(); } - base.Dispose( disposing ); + base.Dispose(disposing); } #region Windows Form Designer generated code @@ -50,10 +50,10 @@ protected override void Dispose( bool disposing ) private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager( typeof( MainForm ) ); - this.imageList = new System.Windows.Forms.ImageList( this.components ); - this.timerCheck = new System.Windows.Forms.Timer( this.components ); - this.notifyIcon = new System.Windows.Forms.NotifyIcon( this.components ); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); + this.imageList = new System.Windows.Forms.ImageList(this.components); + this.timerCheck = new System.Windows.Forms.Timer(this.components); + this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components); this.menuTrayMenu = new System.Windows.Forms.ContextMenu(); this.menuTrayMenuStatus = new System.Windows.Forms.MenuItem(); this.menuTrayMenuExit = new System.Windows.Forms.MenuItem(); @@ -72,222 +72,222 @@ private void InitializeComponent() this.labelFinderTool = new System.Windows.Forms.Label(); this.buttonAbout = new System.Windows.Forms.Button(); this.groupTrayMe.SuspendLayout(); - ( (System.ComponentModel.ISupportInitialize)( this.picTarget ) ).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.picTarget)).BeginInit(); this.SuspendLayout(); // // imageList // - this.imageList.ImageStream = ( (System.Windows.Forms.ImageListStreamer)( resources.GetObject( "imageList.ImageStream" ) ) ); + this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream"))); this.imageList.TransparentColor = System.Drawing.Color.Transparent; - this.imageList.Images.SetKeyName( 0, "" ); - this.imageList.Images.SetKeyName( 1, "" ); + this.imageList.Images.SetKeyName(0, ""); + this.imageList.Images.SetKeyName(1, ""); // // timerCheck // this.timerCheck.Enabled = true; - this.timerCheck.Tick += new System.EventHandler( this.timerCheck_Tick ); + this.timerCheck.Tick += new System.EventHandler(this.timerCheck_Tick); // // notifyIcon // this.notifyIcon.ContextMenu = this.menuTrayMenu; - this.notifyIcon.Icon = ( (System.Drawing.Icon)( resources.GetObject( "notifyIcon.Icon" ) ) ); + this.notifyIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon.Icon"))); this.notifyIcon.Text = "TrayMe"; - this.notifyIcon.DoubleClick += new System.EventHandler( this.notifyIcon_DoubleClick ); + this.notifyIcon.DoubleClick += new System.EventHandler(this.notifyIcon_DoubleClick); // // menuTrayMenu // - this.menuTrayMenu.MenuItems.AddRange( new System.Windows.Forms.MenuItem[] { + this.menuTrayMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuTrayMenuStatus, - this.menuTrayMenuExit} ); + this.menuTrayMenuExit}); // // menuTrayMenuStatus // this.menuTrayMenuStatus.DefaultItem = true; this.menuTrayMenuStatus.Index = 0; this.menuTrayMenuStatus.Text = "&Status..."; - this.menuTrayMenuStatus.Click += new System.EventHandler( this.menuTrayMenuStatus_Click ); + this.menuTrayMenuStatus.Click += new System.EventHandler(this.menuTrayMenuStatus_Click); // // menuTrayMenuExit // this.menuTrayMenuExit.Index = 1; this.menuTrayMenuExit.Text = "&Exit"; - this.menuTrayMenuExit.Click += new System.EventHandler( this.menuTrayMenuExit_Click ); + this.menuTrayMenuExit.Click += new System.EventHandler(this.menuTrayMenuExit_Click); // // buttonClose // - this.buttonClose.Anchor = ( (System.Windows.Forms.AnchorStyles)( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right ) ) ); + this.buttonClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.buttonClose.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonClose.Location = new System.Drawing.Point( 276, 96 ); + this.buttonClose.Location = new System.Drawing.Point(276, 96); this.buttonClose.Name = "buttonClose"; - this.buttonClose.Size = new System.Drawing.Size( 100, 32 ); + this.buttonClose.Size = new System.Drawing.Size(100, 32); this.buttonClose.TabIndex = 3; this.buttonClose.Text = "Cl&ose"; - this.buttonClose.Click += new System.EventHandler( this.buttonClose_Click ); + this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click); // // buttonHide // - this.buttonHide.Anchor = ( (System.Windows.Forms.AnchorStyles)( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right ) ) ); - this.buttonHide.Location = new System.Drawing.Point( 276, 52 ); + this.buttonHide.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonHide.Location = new System.Drawing.Point(276, 52); this.buttonHide.Name = "buttonHide"; - this.buttonHide.Size = new System.Drawing.Size( 100, 32 ); + this.buttonHide.Size = new System.Drawing.Size(100, 32); this.buttonHide.TabIndex = 2; this.buttonHide.Text = "&Hide"; - this.buttonHide.Click += new System.EventHandler( this.buttonHide_Click ); + this.buttonHide.Click += new System.EventHandler(this.buttonHide_Click); // // groupTrayMe // - this.groupTrayMe.Anchor = ( (System.Windows.Forms.AnchorStyles)( ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom ) - | System.Windows.Forms.AnchorStyles.Left ) - | System.Windows.Forms.AnchorStyles.Right ) ) ); - this.groupTrayMe.Controls.Add( this.checkTopmost ); - this.groupTrayMe.Controls.Add( this.picTarget ); - this.groupTrayMe.Controls.Add( this.buttonTrayMe ); - this.groupTrayMe.Controls.Add( this.labelHandle ); - this.groupTrayMe.Controls.Add( this.textHandle ); - this.groupTrayMe.Controls.Add( this.labelCaption ); - this.groupTrayMe.Controls.Add( this.textCaption ); - this.groupTrayMe.Controls.Add( this.labelCharset ); - this.groupTrayMe.Controls.Add( this.textCharset ); - this.groupTrayMe.Controls.Add( this.labelFinderTool ); + this.groupTrayMe.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupTrayMe.Controls.Add(this.checkTopmost); + this.groupTrayMe.Controls.Add(this.picTarget); + this.groupTrayMe.Controls.Add(this.buttonTrayMe); + this.groupTrayMe.Controls.Add(this.labelHandle); + this.groupTrayMe.Controls.Add(this.textHandle); + this.groupTrayMe.Controls.Add(this.labelCaption); + this.groupTrayMe.Controls.Add(this.textCaption); + this.groupTrayMe.Controls.Add(this.labelCharset); + this.groupTrayMe.Controls.Add(this.textCharset); + this.groupTrayMe.Controls.Add(this.labelFinderTool); this.groupTrayMe.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.groupTrayMe.Location = new System.Drawing.Point( 8, 8 ); + this.groupTrayMe.Location = new System.Drawing.Point(8, 8); this.groupTrayMe.Name = "groupTrayMe"; - this.groupTrayMe.Size = new System.Drawing.Size( 260, 192 ); + this.groupTrayMe.Size = new System.Drawing.Size(260, 192); this.groupTrayMe.TabIndex = 0; this.groupTrayMe.TabStop = false; // // checkTopmost // - this.checkTopmost.Anchor = ( (System.Windows.Forms.AnchorStyles)( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left ) - | System.Windows.Forms.AnchorStyles.Right ) ) ); + this.checkTopmost.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.checkTopmost.Checked = true; this.checkTopmost.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkTopmost.Location = new System.Drawing.Point( 20, 152 ); + this.checkTopmost.Location = new System.Drawing.Point(20, 152); this.checkTopmost.Name = "checkTopmost"; - this.checkTopmost.Size = new System.Drawing.Size( 116, 16 ); + this.checkTopmost.Size = new System.Drawing.Size(116, 16); this.checkTopmost.TabIndex = 7; this.checkTopmost.Text = "Topmost"; - this.checkTopmost.CheckedChanged += new System.EventHandler( this.checkTopmost_CheckedChanged ); + this.checkTopmost.CheckedChanged += new System.EventHandler(this.checkTopmost_CheckedChanged); // // picTarget // this.picTarget.BackColor = System.Drawing.Color.White; - this.picTarget.Location = new System.Drawing.Point( 108, 28 ); + this.picTarget.Location = new System.Drawing.Point(108, 28); this.picTarget.Name = "picTarget"; - this.picTarget.Size = new System.Drawing.Size( 31, 28 ); + this.picTarget.Size = new System.Drawing.Size(31, 28); this.picTarget.TabIndex = 13; this.picTarget.TabStop = false; - this.picTarget.MouseMove += new System.Windows.Forms.MouseEventHandler( this.picTarget_MouseMove ); - this.picTarget.MouseDown += new System.Windows.Forms.MouseEventHandler( this.picTarget_MouseDown ); - this.picTarget.MouseUp += new System.Windows.Forms.MouseEventHandler( this.picTarget_MouseUp ); + this.picTarget.MouseMove += new System.Windows.Forms.MouseEventHandler(this.picTarget_MouseMove); + this.picTarget.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picTarget_MouseDown); + this.picTarget.MouseUp += new System.Windows.Forms.MouseEventHandler(this.picTarget_MouseUp); // // buttonTrayMe // - this.buttonTrayMe.Anchor = ( (System.Windows.Forms.AnchorStyles)( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right ) ) ); - this.buttonTrayMe.Location = new System.Drawing.Point( 148, 148 ); + this.buttonTrayMe.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonTrayMe.Location = new System.Drawing.Point(148, 148); this.buttonTrayMe.Name = "buttonTrayMe"; - this.buttonTrayMe.Size = new System.Drawing.Size( 100, 32 ); + this.buttonTrayMe.Size = new System.Drawing.Size(100, 32); this.buttonTrayMe.TabIndex = 8; this.buttonTrayMe.Text = "&Tray Me!"; - this.buttonTrayMe.Click += new System.EventHandler( this.buttonAttach_Click ); + this.buttonTrayMe.Click += new System.EventHandler(this.buttonAttach_Click); // // labelHandle // - this.labelHandle.Location = new System.Drawing.Point( 16, 72 ); + this.labelHandle.Location = new System.Drawing.Point(16, 72); this.labelHandle.Name = "labelHandle"; - this.labelHandle.Size = new System.Drawing.Size( 48, 16 ); + this.labelHandle.Size = new System.Drawing.Size(48, 16); this.labelHandle.TabIndex = 1; this.labelHandle.Text = "H&andle:"; // // textHandle // - this.textHandle.Location = new System.Drawing.Point( 68, 68 ); + this.textHandle.Location = new System.Drawing.Point(68, 68); this.textHandle.MaxLength = 8; this.textHandle.Name = "textHandle"; - this.textHandle.Size = new System.Drawing.Size( 72, 20 ); + this.textHandle.Size = new System.Drawing.Size(72, 20); this.textHandle.TabIndex = 2; - this.textHandle.TextChanged += new System.EventHandler( this.textHandle_TextChanged ); + this.textHandle.TextChanged += new System.EventHandler(this.textHandle_TextChanged); // // labelCaption // - this.labelCaption.Location = new System.Drawing.Point( 16, 96 ); + this.labelCaption.Location = new System.Drawing.Point(16, 96); this.labelCaption.Name = "labelCaption"; - this.labelCaption.Size = new System.Drawing.Size( 48, 16 ); + this.labelCaption.Size = new System.Drawing.Size(48, 16); this.labelCaption.TabIndex = 3; this.labelCaption.Text = "&Caption:"; // // textCaption // - this.textCaption.Anchor = ( (System.Windows.Forms.AnchorStyles)( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left ) - | System.Windows.Forms.AnchorStyles.Right ) ) ); - this.textCaption.Location = new System.Drawing.Point( 68, 92 ); + this.textCaption.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textCaption.Location = new System.Drawing.Point(68, 92); this.textCaption.Name = "textCaption"; this.textCaption.ReadOnly = true; - this.textCaption.Size = new System.Drawing.Size( 180, 20 ); + this.textCaption.Size = new System.Drawing.Size(180, 20); this.textCaption.TabIndex = 4; // // labelCharset // - this.labelCharset.Location = new System.Drawing.Point( 16, 120 ); + this.labelCharset.Location = new System.Drawing.Point(16, 120); this.labelCharset.Name = "labelCharset"; - this.labelCharset.Size = new System.Drawing.Size( 48, 16 ); + this.labelCharset.Size = new System.Drawing.Size(48, 16); this.labelCharset.TabIndex = 5; this.labelCharset.Text = "C&harset:"; // // textCharset // - this.textCharset.Anchor = ( (System.Windows.Forms.AnchorStyles)( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left ) - | System.Windows.Forms.AnchorStyles.Right ) ) ); - this.textCharset.Location = new System.Drawing.Point( 68, 116 ); + this.textCharset.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textCharset.Location = new System.Drawing.Point(68, 116); this.textCharset.Name = "textCharset"; this.textCharset.ReadOnly = true; - this.textCharset.Size = new System.Drawing.Size( 180, 20 ); + this.textCharset.Size = new System.Drawing.Size(180, 20); this.textCharset.TabIndex = 6; // // labelFinderTool // - this.labelFinderTool.Location = new System.Drawing.Point( 16, 36 ); + this.labelFinderTool.Location = new System.Drawing.Point(16, 36); this.labelFinderTool.Name = "labelFinderTool"; - this.labelFinderTool.Size = new System.Drawing.Size( 84, 16 ); + this.labelFinderTool.Size = new System.Drawing.Size(84, 16); this.labelFinderTool.TabIndex = 0; this.labelFinderTool.Text = "Finder Tool:"; // // buttonAbout // - this.buttonAbout.Anchor = ( (System.Windows.Forms.AnchorStyles)( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right ) ) ); - this.buttonAbout.Location = new System.Drawing.Point( 276, 12 ); + this.buttonAbout.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonAbout.Location = new System.Drawing.Point(276, 12); this.buttonAbout.Name = "buttonAbout"; - this.buttonAbout.Size = new System.Drawing.Size( 100, 32 ); + this.buttonAbout.Size = new System.Drawing.Size(100, 32); this.buttonAbout.TabIndex = 1; this.buttonAbout.Text = "&About"; - this.buttonAbout.Click += new System.EventHandler( this.buttonAbout_Click ); + this.buttonAbout.Click += new System.EventHandler(this.buttonAbout_Click); // // MainForm // this.AcceptButton = this.buttonTrayMe; - this.AutoScaleBaseSize = new System.Drawing.Size( 5, 13 ); + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.CancelButton = this.buttonClose; - this.ClientSize = new System.Drawing.Size( 386, 212 ); - this.Controls.Add( this.groupTrayMe ); - this.Controls.Add( this.buttonClose ); - this.Controls.Add( this.buttonHide ); - this.Controls.Add( this.buttonAbout ); + this.ClientSize = new System.Drawing.Size(386, 212); + this.Controls.Add(this.groupTrayMe); + this.Controls.Add(this.buttonClose); + this.Controls.Add(this.buttonHide); + this.Controls.Add(this.buttonAbout); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.Icon = ( (System.Drawing.Icon)( resources.GetObject( "$this.Icon" ) ) ); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.Name = "MainForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "TrayMe - Inactive"; this.TopMost = true; - this.Load += new System.EventHandler( this.MainForm_Load ); - this.Activated += new System.EventHandler( this.MainForm_Activated ); - this.groupTrayMe.ResumeLayout( false ); + this.Load += new System.EventHandler(this.MainForm_Load); + this.Activated += new System.EventHandler(this.MainForm_Activated); + this.groupTrayMe.ResumeLayout(false); this.groupTrayMe.PerformLayout(); - ( (System.ComponentModel.ISupportInitialize)( this.picTarget ) ).EndInit(); - this.ResumeLayout( false ); + ((System.ComponentModel.ISupportInitialize)(this.picTarget)).EndInit(); + this.ResumeLayout(false); } #endregion } -} \ No newline at end of file +} diff --git a/TrayMe/MainForm.cs b/TrayMe/MainForm.cs index 9abe002..33feba0 100644 --- a/TrayMe/MainForm.cs +++ b/TrayMe/MainForm.cs @@ -31,14 +31,14 @@ public MainForm() /// /// The source of the event. /// The instance containing the event data. - private void picTarget_MouseDown( object sender, System.Windows.Forms.MouseEventArgs e ) + private void picTarget_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { // Set capture image and cursor picTarget.Image = imageList.Images[1]; picTarget.Cursor = targetCursor; // Set capture - Win32.SetCapture( picTarget.Handle ); + Win32.SetCapture(picTarget.Handle); // Begin targeting isTargetingWindow = true; @@ -46,7 +46,7 @@ private void picTarget_MouseDown( object sender, System.Windows.Forms.MouseEvent // TODO: Put into function for mousemove & mousedown // Show info - ShowWindowInfo( picTarget.Handle, true ); + ShowWindowInfo(picTarget.Handle, true); } /// @@ -54,7 +54,7 @@ private void picTarget_MouseDown( object sender, System.Windows.Forms.MouseEvent /// /// The source of the event. /// The instance containing the event data. - private void picTarget_MouseUp( object sender, System.Windows.Forms.MouseEventArgs e ) + private void picTarget_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) { IntPtr hWnd; IntPtr hTemp; @@ -63,8 +63,8 @@ private void picTarget_MouseUp( object sender, System.Windows.Forms.MouseEventAr isTargetingWindow = false; // Unhighlight window - if( targetedWindowHandle != IntPtr.Zero ) - Win32Ex.HighlightWindow( targetedWindowHandle ); + if (targetedWindowHandle != IntPtr.Zero) + Win32Ex.HighlightWindow(targetedWindowHandle); targetedWindowHandle = IntPtr.Zero; // Reset capture image and cursor @@ -72,16 +72,16 @@ private void picTarget_MouseUp( object sender, System.Windows.Forms.MouseEventAr picTarget.Image = imageList.Images[0]; // Get screen coords from client coords and window handle - hWnd = Win32Ex.WindowFromPoint( picTarget.Handle, e.X, e.Y ); + hWnd = Win32Ex.WindowFromPoint(picTarget.Handle, e.X, e.Y); // Get owner - while( ( hTemp = Win32.GetParent( hWnd ) ) != IntPtr.Zero ) + while ((hTemp = Win32.GetParent(hWnd)) != IntPtr.Zero) hWnd = hTemp; - ShowWindowInfo( hWnd, true ); + ShowWindowInfo(hWnd, true); // Release capture - Win32.SetCapture( IntPtr.Zero ); + Win32.SetCapture(IntPtr.Zero); } /// @@ -89,7 +89,7 @@ private void picTarget_MouseUp( object sender, System.Windows.Forms.MouseEventAr /// /// The source of the event. /// The instance containing the event data. - private void picTarget_MouseMove( object sender, System.Windows.Forms.MouseEventArgs e ) + private void picTarget_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) { IntPtr hWnd; IntPtr hTemp; @@ -99,27 +99,27 @@ private void picTarget_MouseMove( object sender, System.Windows.Forms.MouseEvent pt.x = e.X; pt.y = e.Y; - Win32.ClientToScreen( picTarget.Handle, ref pt ); + Win32.ClientToScreen(picTarget.Handle, ref pt); // Make sure targeting before highlighting windows - if( !isTargetingWindow ) + if (!isTargetingWindow) return; // Get screen coords from client coords and window handle - hWnd = Win32Ex.WindowFromPoint( picTarget.Handle, e.X, e.Y ); + hWnd = Win32Ex.WindowFromPoint(picTarget.Handle, e.X, e.Y); // Get real window - if( hWnd != IntPtr.Zero ) + if (hWnd != IntPtr.Zero) { hTemp = IntPtr.Zero; - while( true ) + while (true) { - Win32.MapWindowPoints( hTemp, hWnd, ref pt, 1 ); - hTemp = (IntPtr)Win32.ChildWindowFromPoint( hWnd, pt.x, pt.y ); - if( hTemp == IntPtr.Zero ) + Win32.MapWindowPoints(hTemp, hWnd, ref pt, 1); + hTemp = (IntPtr)Win32.ChildWindowFromPoint(hWnd, pt.x, pt.y); + if (hTemp == IntPtr.Zero) break; - if( hWnd == hTemp ) + if (hWnd == hTemp) break; hWnd = hTemp; } @@ -136,14 +136,14 @@ private void picTarget_MouseMove( object sender, System.Windows.Forms.MouseEvent } // Get owner - while( ( hTemp = Win32.GetParent( hWnd ) ) != IntPtr.Zero ) + while ((hTemp = Win32.GetParent(hWnd)) != IntPtr.Zero) hWnd = hTemp; // Show info - ShowWindowInfo( hWnd, true ); + ShowWindowInfo(hWnd, true); // Highlight valid window - HighlightValidWindow( hWnd, Handle ); + HighlightValidWindow(hWnd, Handle); } @@ -156,7 +156,7 @@ private void picTarget_MouseMove( object sender, System.Windows.Forms.MouseEvent /// /// The source of the event. /// The instance containing the event data. - private void menuTrayMenuExit_Click( object sender, System.EventArgs e ) + private void menuTrayMenuExit_Click(object sender, System.EventArgs e) { Close(); } @@ -166,7 +166,7 @@ private void menuTrayMenuExit_Click( object sender, System.EventArgs e ) /// /// The source of the event. /// The instance containing the event data. - private void menuTrayMenuStatus_Click( object sender, System.EventArgs e ) + private void menuTrayMenuStatus_Click(object sender, System.EventArgs e) { ShowTrayStatus(); } @@ -176,7 +176,7 @@ private void menuTrayMenuStatus_Click( object sender, System.EventArgs e ) /// /// The source of the event. /// The instance containing the event data. - private void notifyIcon_DoubleClick( object sender, System.EventArgs e ) + private void notifyIcon_DoubleClick(object sender, System.EventArgs e) { ShowTrayStatus(); } @@ -188,20 +188,20 @@ private void notifyIcon_DoubleClick( object sender, System.EventArgs e ) /// /// The source of the event. /// The instance containing the event data. - private void MainForm_Load( object sender, System.EventArgs e ) + private void MainForm_Load(object sender, System.EventArgs e) { try { - using( MemoryStream ms = new MemoryStream( Properties.Resources.curTarget ) ) - targetCursor = new Cursor( ms ); + using (MemoryStream ms = new MemoryStream(Properties.Resources.curTarget)) + targetCursor = new Cursor(ms); } - catch( Exception x ) + catch (Exception x) { // Show error - MessageBox.Show( this, "Could not load the \"Target\" cursor." + Environment.NewLine + Environment.NewLine + x.ToString(), "TrayMe Error", MessageBoxButtons.OK, MessageBoxIcon.Error ); + MessageBox.Show(this, "Could not load the \"Target\" cursor." + Environment.NewLine + Environment.NewLine + x.ToString(), "TrayMe Error", MessageBoxButtons.OK, MessageBoxIcon.Error); // Attempt to use backup cursor - if( targetCursor == null ) + if (targetCursor == null) targetCursor = Cursors.Cross; } @@ -218,9 +218,9 @@ private void MainForm_Load( object sender, System.EventArgs e ) /// /// The source of the event. /// The instance containing the event data. - private void MainForm_Activated( object sender, System.EventArgs e ) + private void MainForm_Activated(object sender, System.EventArgs e) { - if( !notifyIcon.Visible ) + if (!notifyIcon.Visible) notifyIcon.Visible = true; } @@ -229,10 +229,10 @@ private void MainForm_Activated( object sender, System.EventArgs e ) /// /// The source of the event. /// The instance containing the event data. - private void buttonAbout_Click( object sender, System.EventArgs e ) + private void buttonAbout_Click(object sender, System.EventArgs e) { AboutForm about = new AboutForm(); - about.ShowDialog( this ); + about.ShowDialog(this); about.Dispose(); } @@ -241,9 +241,9 @@ private void buttonAbout_Click( object sender, System.EventArgs e ) /// /// The source of the event. /// The instance containing the event data. - private void buttonAttach_Click( object sender, System.EventArgs e ) + private void buttonAttach_Click(object sender, System.EventArgs e) { - if( IsAttached() ) + if (IsAttached()) DoDetach(); else DoAttach(); @@ -254,7 +254,7 @@ private void buttonAttach_Click( object sender, System.EventArgs e ) /// /// The source of the event. /// The instance containing the event data. - private void checkTopmost_CheckedChanged( object sender, System.EventArgs e ) + private void checkTopmost_CheckedChanged(object sender, System.EventArgs e) { TopMost = checkTopmost.Checked; } @@ -264,20 +264,20 @@ private void checkTopmost_CheckedChanged( object sender, System.EventArgs e ) /// /// The source of the event. /// The instance containing the event data. - private void textHandle_TextChanged( object sender, System.EventArgs e ) + private void textHandle_TextChanged(object sender, System.EventArgs e) { IntPtr hWnd; try { - hWnd = (IntPtr)Convert.ToInt32( textHandle.Text, 16 ); + hWnd = (IntPtr)Convert.ToInt32(textHandle.Text, 16); } catch { hWnd = IntPtr.Zero; } - ShowWindowInfo( hWnd, false ); + ShowWindowInfo(hWnd, false); } /// @@ -285,7 +285,7 @@ private void textHandle_TextChanged( object sender, System.EventArgs e ) /// /// The source of the event. /// The instance containing the event data. - private void buttonClose_Click( object sender, System.EventArgs e ) + private void buttonClose_Click(object sender, System.EventArgs e) { Close(); } @@ -295,7 +295,7 @@ private void buttonClose_Click( object sender, System.EventArgs e ) /// /// The source of the event. /// The instance containing the event data. - private void buttonHide_Click( object sender, System.EventArgs e ) + private void buttonHide_Click(object sender, System.EventArgs e) { Hide(); } @@ -305,7 +305,7 @@ private void buttonHide_Click( object sender, System.EventArgs e ) /// /// The source of the event. /// The instance containing the event data. - private void timerCheck_Tick( object sender, System.EventArgs e ) + private void timerCheck_Tick(object sender, System.EventArgs e) { UpdateStatus(); } @@ -320,7 +320,7 @@ private void timerCheck_Tick( object sender, System.EventArgs e ) /// true, if a window is currently attached; otherwise, false. public bool IsAttached() { - return ( new TrayMeClass() ).IsHooked(); + return (new TrayMeClass()).IsHooked(); } /// @@ -331,11 +331,11 @@ public bool DoDetach() { // Check for trayed window TrayMeClass trayMe = new TrayMeClass(); - if( trayMe.IsHooked() ) + if (trayMe.IsHooked()) { - if( trayMe.HookTrayWindow( IntPtr.Zero, IntPtr.Zero ) == true ) + if (trayMe.HookTrayWindow(IntPtr.Zero, IntPtr.Zero) == true) { - MessageBox.Show( this, "Could not unhook currently trayed window.", "TrayMe Error", MessageBoxButtons.OK, MessageBoxIcon.Error ); + MessageBox.Show(this, "Could not unhook currently trayed window.", "TrayMe Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; } @@ -354,26 +354,26 @@ public bool DoAttach() IntPtr hWnd; // Failsafe - if( !UpdateStatus() ) + if (!UpdateStatus()) return false; // Validate input try { - hWnd = (IntPtr)Convert.ToInt32( textHandle.Text, 16 ); + hWnd = (IntPtr)Convert.ToInt32(textHandle.Text, 16); } catch { hWnd = IntPtr.Zero; } - if( Win32.IsWindow( hWnd ) == 0 ) + if (Win32.IsWindow(hWnd) == 0) { - MessageBox.Show( this, "Please enter a valid handle.", "TrayMe", MessageBoxButtons.OK, MessageBoxIcon.Information ); + MessageBox.Show(this, "Please enter a valid handle.", "TrayMe", MessageBoxButtons.OK, MessageBoxIcon.Information); return false; } // Attach new window - return DoAttach( hWnd ); + return DoAttach(hWnd); } /// @@ -381,22 +381,22 @@ public bool DoAttach() /// /// The handle to the window to attach to. /// true if the window is now attached; otherwise, false. - public bool DoAttach( IntPtr hWnd ) + public bool DoAttach(IntPtr hWnd) { // Failsafe - if( !UpdateStatus() ) + if (!UpdateStatus()) return false; - if( hWnd == IntPtr.Zero ) + if (hWnd == IntPtr.Zero) return false; // Detach old window - if( !DoDetach() ) + if (!DoDetach()) return false; // Tray the window TrayMeClass trayMe = new TrayMeClass(); - if( !trayMe.HookTrayWindow( hWnd, Icon.Handle ) ) - MessageBox.Show( this, "Could not hook the window with the provided handle.", "TrayMe Error", MessageBoxButtons.OK, MessageBoxIcon.Error ); + if (!trayMe.HookTrayWindow(hWnd, Icon.Handle)) + MessageBox.Show(this, "Could not hook the window with the provided handle.", "TrayMe Error", MessageBoxButtons.OK, MessageBoxIcon.Error); // Update status UpdateStatus(); @@ -408,11 +408,11 @@ public bool DoAttach( IntPtr hWnd ) /// /// Shows the information of the window with the specified handle. /// - private void ShowWindowInfo( IntPtr hWnd, bool handle ) + private void ShowWindowInfo(IntPtr hWnd, bool handle) { - if( ( Win32.IsWindow( hWnd ) == 0 ) || ( Win32Ex.IsRelativeWindow( hWnd, Handle, true ) ) ) + if ((Win32.IsWindow(hWnd) == 0) || (Win32Ex.IsRelativeWindow(hWnd, Handle, true))) { - if( handle ) + if (handle) textHandle.Text = ""; textCaption.Text = ""; textCharset.Text = ""; @@ -420,28 +420,28 @@ private void ShowWindowInfo( IntPtr hWnd, bool handle ) } // Set window information - if( handle ) - textHandle.Text = Convert.ToString( hWnd.ToInt32(), 16 ).ToUpper().PadLeft( 8, '0' ); - textCaption.Text = Win32Ex.GetWindowText( hWnd ); - textCharset.Text = ( ( Win32.IsWindowUnicode( hWnd ) != 0 ) ? ( "Unicode" ) : ( "Ansi" ) ); + if (handle) + textHandle.Text = Convert.ToString(hWnd.ToInt32(), 16).ToUpper().PadLeft(8, '0'); + textCaption.Text = Win32Ex.GetWindowText(hWnd); + textCharset.Text = ((Win32.IsWindowUnicode(hWnd) != 0) ? ("Unicode") : ("Ansi")); } /// /// Highlights the specified window, if valid. /// - private void HighlightValidWindow( IntPtr hWnd, IntPtr hOwner ) + private void HighlightValidWindow(IntPtr hWnd, IntPtr hOwner) { // Check for valid highlight - if( targetedWindowHandle == hWnd ) + if (targetedWindowHandle == hWnd) return; // Check for relative - if( Win32Ex.IsRelativeWindow( hWnd, hOwner, true ) ) + if (Win32Ex.IsRelativeWindow(hWnd, hOwner, true)) { // Unhighlight last window - if( targetedWindowHandle != IntPtr.Zero ) + if (targetedWindowHandle != IntPtr.Zero) { - Win32Ex.HighlightWindow( targetedWindowHandle ); + Win32Ex.HighlightWindow(targetedWindowHandle); targetedWindowHandle = IntPtr.Zero; } @@ -449,13 +449,13 @@ private void HighlightValidWindow( IntPtr hWnd, IntPtr hOwner ) } // Unhighlight last window - Win32Ex.HighlightWindow( targetedWindowHandle ); + Win32Ex.HighlightWindow(targetedWindowHandle); // Set as current target targetedWindowHandle = hWnd; // Highlight window - Win32Ex.HighlightWindow( hWnd ); + Win32Ex.HighlightWindow(hWnd); } /// @@ -467,9 +467,9 @@ private bool UpdateStatus() try { - if( trayMe.IsHooked() ) + if (trayMe.IsHooked()) { - if( !isWindowTrayed ) + if (!isWindowTrayed) { buttonTrayMe.Text = "Un-&Tray Me"; isWindowTrayed = true; @@ -477,29 +477,29 @@ private bool UpdateStatus() } else { - if( isWindowTrayed ) + if (isWindowTrayed) { buttonTrayMe.Text = "&Tray Me!"; isWindowTrayed = false; } } - if( !buttonTrayMe.Enabled ) + if (!buttonTrayMe.Enabled) buttonTrayMe.Enabled = true; return true; } - catch( DllNotFoundException ) + catch (DllNotFoundException) { - if( buttonTrayMe.Enabled ) + if (buttonTrayMe.Enabled) { buttonTrayMe.Enabled = false; buttonTrayMe.Text = "Missing Dll"; } } - catch( EntryPointNotFoundException ) + catch (EntryPointNotFoundException) { - if( buttonTrayMe.Enabled ) + if (buttonTrayMe.Enabled) { buttonTrayMe.Enabled = false; buttonTrayMe.Text = "Bad Dll"; diff --git a/TrayMe/Program.cs b/TrayMe/Program.cs index ba40391..73652b8 100644 --- a/TrayMe/Program.cs +++ b/TrayMe/Program.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; +using System.Diagnostics; using System.IO; using System.Text; using System.Windows.Forms; -using System.Diagnostics; namespace TrayMe { @@ -18,17 +18,17 @@ internal static class Program /// The main entry point for the application. /// [STAThread] - public static void Main( string[] args ) + public static void Main(string[] args) { Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault( true ); + Application.SetCompatibleTextRenderingDefault(true); // TODO: Load custom settings IntPtr hWndInitial = IntPtr.Zero; // Attach to app - if( args.Length > 0 ) + if (args.Length > 0) { bool noExit = false; bool show = false; @@ -36,15 +36,15 @@ public static void Main( string[] args ) // Get cmdline options int i = 0; - for( i = 0; i < args.Length; i++ ) + for (i = 0; i < args.Length; i++) { - if( args[i].Length == 0 ) + if (args[i].Length == 0) continue; - if( args[i][0] == '-' ) + if (args[i][0] == '-') { // Get individual options - switch( args[i].ToLower() ) + switch (args[i].ToLower()) { case "-h": ShowHelp(); @@ -66,37 +66,38 @@ public static void Main( string[] args ) else { string s = args[i]; - while( Path.GetExtension( s ).ToLower() == ".lnk" ) - s = ( new System.ShellShortcut.ShellShortcut( s ) ).Path; - if( s == "" ) + while (Path.GetExtension(s).ToLower() == ".lnk") + s = (new System.ShellShortcut.ShellShortcut(s)).Path; + + if (s == "") continue; - if( Path.GetFullPath( s ).ToLower() == Path.GetFullPath( Application.ExecutablePath ).ToLower() ) + if (Path.GetFullPath(s).ToLower() == Path.GetFullPath(Application.ExecutablePath).ToLower()) { - if( !quiet ) - MessageBox.Show( "Cannot tray self.", "TrayMe", MessageBoxButtons.OK, MessageBoxIcon.Error ); + if (!quiet) + MessageBox.Show("Cannot tray self.", "TrayMe", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { // Start app process - ProcessStartInfo startInfo = new ProcessStartInfo( s, ( ( ( i + 1 ) < args.Length ) ? ( string.Join( " ", args, ( i + 1 ), ( args.Length - 1 ) ) ) : ( "" ) ).Trim() ); - if( !show ) + ProcessStartInfo startInfo = new ProcessStartInfo(s, (((i + 1) < args.Length) ? (string.Join(" ", args, (i + 1), (args.Length - 1))) : ("")).Trim()); + if (!show) startInfo.WindowStyle = ProcessWindowStyle.Minimized; startInfo.UseShellExecute = true; startInfo.CreateNoWindow = false; Process process = null; try { - process = Process.Start( startInfo ); + process = Process.Start(startInfo); } - catch( Win32Exception ) + catch (Win32Exception) { } - if( process == null ) + if (process == null) { - if( !quiet ) - MessageBox.Show( "Application could not be started.", "TrayMe", MessageBoxButtons.OK, MessageBoxIcon.Error ); + if (!quiet) + MessageBox.Show("Application could not be started.", "TrayMe", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { @@ -105,31 +106,31 @@ public static void Main( string[] args ) process.Refresh(); // Attach to app's main window - if( process.HasExited ) + if (process.HasExited) { - if( !quiet ) - MessageBox.Show( "Application exited before it could be trayed.", "TrayMe", MessageBoxButtons.OK, MessageBoxIcon.Information ); + if (!quiet) + MessageBox.Show("Application exited before it could be trayed.", "TrayMe", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { IntPtr hWnd = process.MainWindowHandle; - if( hWnd == IntPtr.Zero ) + if (hWnd == IntPtr.Zero) { - if( !quiet ) - MessageBox.Show( "Could not find application's main window.", "TrayMe", MessageBoxButtons.OK, MessageBoxIcon.Error ); + if (!quiet) + MessageBox.Show("Could not find application's main window.", "TrayMe", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { hWndInitial = hWnd; - if( !show ) + if (!show) { Win32.WINDOWPLACEMENT wp = new Win32.WINDOWPLACEMENT(); - Win32.GetWindowPlacement( hWnd, ref wp ); + Win32.GetWindowPlacement(hWnd, ref wp); // Hide (close) window only if still minimized - if( ( wp.showCmd == Win32.SW_MINIMIZE ) || ( wp.showCmd == Win32.SW_SHOWMINIMIZED ) ) - Win32.SendMessage( hWnd, Win32.WM_CLOSE, 0, 0 ); + if ((wp.showCmd == Win32.SW_MINIMIZE) || (wp.showCmd == Win32.SW_SHOWMINIMIZED)) + Win32.SendMessage(hWnd, Win32.WM_CLOSE, 0, 0); } } } @@ -137,7 +138,7 @@ public static void Main( string[] args ) } // Exit if done - if( !noExit ) + if (!noExit) return; break; @@ -145,11 +146,11 @@ public static void Main( string[] args ) } } - using( MainForm form = new MainForm() ) + using (MainForm form = new MainForm()) { - if( hWndInitial != IntPtr.Zero ) - form.DoAttach( hWndInitial ); - Application.Run( form ); + if (hWndInitial != IntPtr.Zero) + form.DoAttach(hWndInitial); + Application.Run(form); } } @@ -160,21 +161,21 @@ public static void ShowHelp() { StringBuilder sb = new StringBuilder(); - sb.Append( "Usage:" ); - sb.Append( Path.GetFileName( Application.ExecutablePath ) ); - sb.AppendLine( " [options] target cmd" ); + sb.Append("Usage:"); + sb.Append(Path.GetFileName(Application.ExecutablePath)); + sb.AppendLine(" [options] target cmd"); sb.AppendLine(); - sb.AppendLine( "Options:" ); - sb.AppendLine( " -h -- displays this help message." ); - sb.AppendLine( " -s -- show window; do not close to tray." ); - sb.AppendLine( " -q -- quiet mode; display no command line errors." ); - sb.AppendLine( " -x -- do not exit when trayed by command line." ); + sb.AppendLine("Options:"); + sb.AppendLine(" -h -- displays this help message."); + sb.AppendLine(" -s -- show window; do not close to tray."); + sb.AppendLine(" -q -- quiet mode; display no command line errors."); + sb.AppendLine(" -x -- do not exit when trayed by command line."); sb.AppendLine(); - sb.AppendLine( "target -- the target application to tray." ); - sb.AppendLine( "cmd -- the command line to be passed to the target." ); + sb.AppendLine("target -- the target application to tray."); + sb.AppendLine("cmd -- the command line to be passed to the target."); - MessageBox.Show( sb.ToString(), "TrayMe Command Line Help", MessageBoxButtons.OK, MessageBoxIcon.Information ); + MessageBox.Show(sb.ToString(), "TrayMe Command Line Help", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } diff --git a/TrayMe/ShellShortcut.cs b/TrayMe/ShellShortcut.cs index e6ce6a5..668fe62 100644 --- a/TrayMe/ShellShortcut.cs +++ b/TrayMe/ShellShortcut.cs @@ -322,7 +322,7 @@ public class ShellShortcut : IDisposable /// Path to new or existing shortcut file (.lnk). /// /// - public ShellShortcut( string linkPath ) + public ShellShortcut(string linkPath) { IPersistFile pf; @@ -334,10 +334,10 @@ public ShellShortcut( string linkPath ) m_Link = (IShellLinkA)new ShellLink(); #endif - if( File.Exists( linkPath ) ) + if (File.Exists(linkPath)) { pf = (IPersistFile)m_Link; - pf.Load( linkPath, 0 ); + pf.Load(linkPath, 0); } } @@ -347,9 +347,9 @@ public ShellShortcut( string linkPath ) // public void Dispose() { - if( m_Link != null ) + if (m_Link != null) { - Marshal.ReleaseComObject( m_Link ); + Marshal.ReleaseComObject(m_Link); m_Link = null; } } @@ -361,13 +361,13 @@ public string Arguments { get { - StringBuilder sb = new StringBuilder( INFOTIPSIZE ); - m_Link.GetArguments( sb, sb.Capacity ); + StringBuilder sb = new StringBuilder(INFOTIPSIZE); + m_Link.GetArguments(sb, sb.Capacity); return sb.ToString(); } set { - m_Link.SetArguments( value ); + m_Link.SetArguments(value); } } @@ -378,13 +378,13 @@ public string Description { get { - StringBuilder sb = new StringBuilder( INFOTIPSIZE ); - m_Link.GetDescription( sb, sb.Capacity ); + StringBuilder sb = new StringBuilder(INFOTIPSIZE); + m_Link.GetDescription(sb, sb.Capacity); return sb.ToString(); } set { - m_Link.SetDescription( value ); + m_Link.SetDescription(value); } } @@ -395,13 +395,13 @@ public string WorkingDirectory { get { - StringBuilder sb = new StringBuilder( MAX_PATH ); - m_Link.GetWorkingDirectory( sb, sb.Capacity ); + StringBuilder sb = new StringBuilder(MAX_PATH); + m_Link.GetWorkingDirectory(sb, sb.Capacity); return sb.ToString(); } set { - m_Link.SetWorkingDirectory( value ); + m_Link.SetWorkingDirectory(value); } } @@ -422,14 +422,14 @@ public string Path #else WIN32_FIND_DATAA wfd = new WIN32_FIND_DATAA(); #endif - StringBuilder sb = new StringBuilder( MAX_PATH ); + StringBuilder sb = new StringBuilder(MAX_PATH); - m_Link.GetPath( sb, sb.Capacity, out wfd, SLGP_FLAGS.SLGP_UNCPRIORITY ); + m_Link.GetPath(sb, sb.Capacity, out wfd, SLGP_FLAGS.SLGP_UNCPRIORITY); return sb.ToString(); } set { - m_Link.SetPath( value ); + m_Link.SetPath(value); } } @@ -443,14 +443,14 @@ public string IconPath { get { - StringBuilder sb = new StringBuilder( MAX_PATH ); + StringBuilder sb = new StringBuilder(MAX_PATH); int nIconIdx; - m_Link.GetIconLocation( sb, sb.Capacity, out nIconIdx ); + m_Link.GetIconLocation(sb, sb.Capacity, out nIconIdx); return sb.ToString(); } set { - m_Link.SetIconLocation( value, IconIndex ); + m_Link.SetIconLocation(value, IconIndex); } } @@ -465,14 +465,14 @@ public int IconIndex { get { - StringBuilder sb = new StringBuilder( MAX_PATH ); + StringBuilder sb = new StringBuilder(MAX_PATH); int nIconIdx; - m_Link.GetIconLocation( sb, sb.Capacity, out nIconIdx ); + m_Link.GetIconLocation(sb, sb.Capacity, out nIconIdx); return nIconIdx; } set { - m_Link.SetIconLocation( IconPath, value ); + m_Link.SetIconLocation(IconPath, value); } } @@ -485,23 +485,23 @@ public Icon Icon { get { - StringBuilder sb = new StringBuilder( MAX_PATH ); + StringBuilder sb = new StringBuilder(MAX_PATH); int nIconIdx; IntPtr hIcon, hInst; Icon ico, clone; - m_Link.GetIconLocation( sb, sb.Capacity, out nIconIdx ); - hInst = Marshal.GetHINSTANCE( this.GetType().Module ); - hIcon = Native.ExtractIcon( hInst, sb.ToString(), nIconIdx ); - if( hIcon == IntPtr.Zero ) + m_Link.GetIconLocation(sb, sb.Capacity, out nIconIdx); + hInst = Marshal.GetHINSTANCE(this.GetType().Module); + hIcon = Native.ExtractIcon(hInst, sb.ToString(), nIconIdx); + if (hIcon == IntPtr.Zero) return null; // Return a cloned Icon, because we have to free the original ourselves. - ico = Icon.FromHandle( hIcon ); + ico = Icon.FromHandle(hIcon); clone = (Icon)ico.Clone(); ico.Dispose(); - Native.DestroyIcon( hIcon ); + Native.DestroyIcon(hIcon); return clone; } } @@ -516,9 +516,9 @@ public ProcessWindowStyle WindowStyle get { int nWS; - m_Link.GetShowCmd( out nWS ); + m_Link.GetShowCmd(out nWS); - switch( nWS ) + switch (nWS) { case SW_SHOWMINIMIZED: case SW_SHOWMINNOACTIVE: @@ -535,7 +535,7 @@ public ProcessWindowStyle WindowStyle { int nWS; - switch( value ) + switch (value) { case ProcessWindowStyle.Normal: nWS = SW_SHOWNORMAL; @@ -550,10 +550,10 @@ public ProcessWindowStyle WindowStyle break; default: // ProcessWindowStyle.Hidden - throw new ArgumentException( "Unsupported ProcessWindowStyle value." ); + throw new ArgumentException("Unsupported ProcessWindowStyle value."); } - m_Link.SetShowCmd( nWS ); + m_Link.SetShowCmd(nWS); } } @@ -568,7 +568,7 @@ public Keys Hotkey short wHotkey; int dwHotkey; - m_Link.GetHotkey( out wHotkey ); + m_Link.GetHotkey(out wHotkey); // // Convert from IShellLink 16-bit format to Keys enumeration 32-bit value @@ -577,15 +577,15 @@ public Keys Hotkey // MM = Modifier (Alt, Control, Shift) // VK = Virtual key code // - dwHotkey = ( ( wHotkey & 0xFF00 ) << 8 ) | ( wHotkey & 0xFF ); + dwHotkey = ((wHotkey & 0xFF00) << 8) | (wHotkey & 0xFF); return (Keys)dwHotkey; } set { short wHotkey; - if( ( value & Keys.Modifiers ) == 0 ) - throw new ArgumentException( "Hotkey must include a modifier key." ); + if ((value & Keys.Modifiers) == 0) + throw new ArgumentException("Hotkey must include a modifier key."); // // Convert from Keys enumeration 32-bit value to IShellLink 16-bit format @@ -594,8 +594,8 @@ public Keys Hotkey // MM = Modifier (Alt, Control, Shift) // VK = Virtual key code // - wHotkey = unchecked( (short)( ( (int)( value & Keys.Modifiers ) >> 8 ) | (int)( value & Keys.KeyCode ) ) ); - m_Link.SetHotkey( wHotkey ); + wHotkey = unchecked((short)(((int)(value & Keys.Modifiers) >> 8) | (int)(value & Keys.KeyCode))); + m_Link.SetHotkey(wHotkey); } } @@ -606,7 +606,7 @@ public Keys Hotkey public void Save() { IPersistFile pf = (IPersistFile)m_Link; - pf.Save( m_sPath, true ); + pf.Save(m_sPath, true); } /// @@ -627,11 +627,11 @@ public object ShellLink #region Native Win32 API functions private class Native { - [DllImport( "shell32.dll", CharSet = CharSet.Auto )] - public static extern IntPtr ExtractIcon( IntPtr hInst, string lpszExeFileName, int nIconIndex ); + [DllImport("shell32.dll", CharSet = CharSet.Auto)] + public static extern IntPtr ExtractIcon(IntPtr hInst, string lpszExeFileName, int nIconIndex); - [DllImport( "user32.dll" )] - public static extern bool DestroyIcon( IntPtr hIcon ); + [DllImport("user32.dll")] + public static extern bool DestroyIcon(IntPtr hIcon); } #endregion diff --git a/TrayMe/TrayMe.cs b/TrayMe/TrayMe.cs index ac61c82..27764ad 100644 --- a/TrayMe/TrayMe.cs +++ b/TrayMe/TrayMe.cs @@ -20,34 +20,34 @@ public class TrayMeClass /// public bool IsHooked() { - return ( IsSubclassed() != 0 ); + return (IsSubclassed() != 0); } // Hooks (subclasses) the window /// /// Hooks (subclasses) the specified window. /// - public bool HookTrayWindow( IntPtr hWnd, IntPtr hIcon ) + public bool HookTrayWindow(IntPtr hWnd, IntPtr hIcon) { - if( IsSubclassed() == 0 ) + if (IsSubclassed() == 0) { - InjectDll( hWnd ); + InjectDll(hWnd); } else { UnmapDll(); } - return ( IsSubclassed() != 0 ); + return (IsSubclassed() != 0); } - [DllImport( "TrayMe.dll", EntryPoint = "IsSubclassed", SetLastError = false, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Winapi )] + [DllImport("TrayMe.dll", EntryPoint = "IsSubclassed", SetLastError = false, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)] private static extern int IsSubclassed(); - [DllImport( "TrayMe.dll", EntryPoint = "InjectDll", SetLastError = false, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Winapi )] - private static extern int InjectDll( IntPtr hWnd ); + [DllImport("TrayMe.dll", EntryPoint = "InjectDll", SetLastError = false, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)] + private static extern int InjectDll(IntPtr hWnd); - [DllImport( "TrayMe.dll", EntryPoint = "UnmapDll", SetLastError = false, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Winapi )] + [DllImport("TrayMe.dll", EntryPoint = "UnmapDll", SetLastError = false, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)] private static extern int UnmapDll(); } } diff --git a/TrayMe/Win32.cs b/TrayMe/Win32.cs index 67b5223..6525edb 100644 --- a/TrayMe/Win32.cs +++ b/TrayMe/Win32.cs @@ -36,11 +36,11 @@ public enum ShowWindowCommands : int } // Callback delegate function declarations - public delegate int WndProc( System.IntPtr hWnd, int uMsg, int wParam, int lParam ); + public delegate int WndProc(System.IntPtr hWnd, int uMsg, int wParam, int lParam); // Type definitions for Windows' basic types. - public const int ANYSIZE_ARRAY = unchecked( (int)( 1 ) ); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int ANYSIZE_ARRAY = unchecked((int)(1)); + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct RECT { public int left; @@ -49,7 +49,7 @@ public struct RECT public int bottom; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct RECTL { public int left; @@ -58,35 +58,35 @@ public struct RECTL public int bottom; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct POINTAPI { public int x; public int y; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct POINTL { public int x; public int y; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SIZE { public int cx; public int cy; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct POINTS { public int x; public int y; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MSG { public IntPtr hwnd; @@ -98,42 +98,42 @@ public struct MSG } - public const int DELETE = unchecked( (int)( 0x10000 ) ); - public const int READ_CONTROL = unchecked( (int)( 0x20000 ) ); - public const int WRITE_DAC = unchecked( (int)( 0x40000 ) ); - public const int WRITE_OWNER = unchecked( (int)( 0x80000 ) ); - public const int SYNCHRONIZE = unchecked( (int)( 0x100000 ) ); + public const int DELETE = unchecked((int)(0x10000)); + public const int READ_CONTROL = unchecked((int)(0x20000)); + public const int WRITE_DAC = unchecked((int)(0x40000)); + public const int WRITE_OWNER = unchecked((int)(0x80000)); + public const int SYNCHRONIZE = unchecked((int)(0x100000)); - public const int STANDARD_RIGHTS_READ = unchecked( (int)( ( READ_CONTROL ) ) ); - public const int STANDARD_RIGHTS_WRITE = unchecked( (int)( ( READ_CONTROL ) ) ); - public const int STANDARD_RIGHTS_EXECUTE = unchecked( (int)( ( READ_CONTROL ) ) ); - public const int STANDARD_RIGHTS_REQUIRED = unchecked( (int)( 0xF0000 ) ); - public const int STANDARD_RIGHTS_ALL = unchecked( (int)( 0x1F0000 ) ); + public const int STANDARD_RIGHTS_READ = unchecked((int)((READ_CONTROL))); + public const int STANDARD_RIGHTS_WRITE = unchecked((int)((READ_CONTROL))); + public const int STANDARD_RIGHTS_EXECUTE = unchecked((int)((READ_CONTROL))); + public const int STANDARD_RIGHTS_REQUIRED = unchecked((int)(0xF0000)); + public const int STANDARD_RIGHTS_ALL = unchecked((int)(0x1F0000)); - public const int SPECIFIC_RIGHTS_ALL = unchecked( (int)( 0xFFFF ) ); + public const int SPECIFIC_RIGHTS_ALL = unchecked((int)(0xFFFF)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SID_IDENTIFIER_AUTHORITY { public int Value; } - public const int SID_REVISION = unchecked( (int)( ( 1 ) ) );// Current revision level - public const int SID_MAX_SUB_AUTHORITIES = unchecked( (int)( ( 15 ) ) ); - public const int SID_RECOMMENDED_SUB_AUTHORITIES = unchecked( (int)( ( 1 ) ) );// Will change to around 6 in a future release. + public const int SID_REVISION = unchecked((int)((1)));// Current revision level + public const int SID_MAX_SUB_AUTHORITIES = unchecked((int)((15))); + public const int SID_RECOMMENDED_SUB_AUTHORITIES = unchecked((int)((1)));// Will change to around 6 in a future release. - public const int SIDTYPEUSER = unchecked( (int)( 1 ) ); - public const int SIDTYPEGROUP = unchecked( (int)( 2 ) ); - public const int SIDTYPEDOMAIN = unchecked( (int)( 3 ) ); - public const int SIDTYPEALIAS = unchecked( (int)( 4 ) ); - public const int SIDTYPEWELLKNOWNGROUP = unchecked( (int)( 5 ) ); - public const int SIDTYPEDELETEDACCOUNT = unchecked( (int)( 6 ) ); - public const int SIDTYPEINVALID = unchecked( (int)( 7 ) ); - public const int SIDTYPEUNKNOWN = unchecked( (int)( 8 ) ); + public const int SIDTYPEUSER = unchecked((int)(1)); + public const int SIDTYPEGROUP = unchecked((int)(2)); + public const int SIDTYPEDOMAIN = unchecked((int)(3)); + public const int SIDTYPEALIAS = unchecked((int)(4)); + public const int SIDTYPEWELLKNOWNGROUP = unchecked((int)(5)); + public const int SIDTYPEDELETEDACCOUNT = unchecked((int)(6)); + public const int SIDTYPEINVALID = unchecked((int)(7)); + public const int SIDTYPEUNKNOWN = unchecked((int)(8)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SID_AND_ATTRIBUTES { public int Sid; @@ -153,12 +153,12 @@ public struct SID_AND_ATTRIBUTES // (Non-unique IDs) S-1-4 // // // // /////////////////////////////////////////////////////////////////////////// - public const int SECURITY_NULL_RID = unchecked( (int)( 0x0 ) ); - public const int SECURITY_WORLD_RID = unchecked( (int)( 0x0 ) ); - public const int SECURITY_LOCAL_RID = unchecked( (int)( 0x0 ) ); + public const int SECURITY_NULL_RID = unchecked((int)(0x0)); + public const int SECURITY_WORLD_RID = unchecked((int)(0x0)); + public const int SECURITY_LOCAL_RID = unchecked((int)(0x0)); - public const int SECURITY_CREATOR_OWNER_RID = unchecked( (int)( 0x0 ) ); - public const int SECURITY_CREATOR_GROUP_RID = unchecked( (int)( 0x1 ) ); + public const int SECURITY_CREATOR_OWNER_RID = unchecked((int)(0x0)); + public const int SECURITY_CREATOR_GROUP_RID = unchecked((int)(0x1)); // /////////////////////////////////////////////////////////////////////////// @@ -182,16 +182,16 @@ public struct SID_AND_ATTRIBUTES // // // /////////////////////////////////////////////////////////////////////////// - public const int SECURITY_DIALUP_RID = unchecked( (int)( 0x1 ) ); - public const int SECURITY_NETWORK_RID = unchecked( (int)( 0x2 ) ); - public const int SECURITY_BATCH_RID = unchecked( (int)( 0x3 ) ); - public const int SECURITY_INTERACTIVE_RID = unchecked( (int)( 0x4 ) ); - public const int SECURITY_SERVICE_RID = unchecked( (int)( 0x6 ) ); - public const int SECURITY_ANONYMOUS_LOGON_RID = unchecked( (int)( 0x7 ) ); - public const int SECURITY_LOGON_IDS_RID = unchecked( (int)( 0x5 ) ); - public const int SECURITY_LOCAL_SYSTEM_RID = unchecked( (int)( 0x12 ) ); - public const int SECURITY_NT_NON_UNIQUE = unchecked( (int)( 0x15 ) ); - public const int SECURITY_BUILTIN_DOMAIN_RID = unchecked( (int)( 0x20 ) ); + public const int SECURITY_DIALUP_RID = unchecked((int)(0x1)); + public const int SECURITY_NETWORK_RID = unchecked((int)(0x2)); + public const int SECURITY_BATCH_RID = unchecked((int)(0x3)); + public const int SECURITY_INTERACTIVE_RID = unchecked((int)(0x4)); + public const int SECURITY_SERVICE_RID = unchecked((int)(0x6)); + public const int SECURITY_ANONYMOUS_LOGON_RID = unchecked((int)(0x7)); + public const int SECURITY_LOGON_IDS_RID = unchecked((int)(0x5)); + public const int SECURITY_LOCAL_SYSTEM_RID = unchecked((int)(0x12)); + public const int SECURITY_NT_NON_UNIQUE = unchecked((int)(0x15)); + public const int SECURITY_BUILTIN_DOMAIN_RID = unchecked((int)(0x20)); // /////////////////////////////////////////////////////////////////////////// @@ -200,23 +200,23 @@ public struct SID_AND_ATTRIBUTES // // // /////////////////////////////////////////////////////////////////////////// - public const int DOMAIN_USER_RID_ADMIN = unchecked( (int)( 0x1F4 ) ); - public const int DOMAIN_USER_RID_GUEST = unchecked( (int)( 0x1F5 ) ); + public const int DOMAIN_USER_RID_ADMIN = unchecked((int)(0x1F4)); + public const int DOMAIN_USER_RID_GUEST = unchecked((int)(0x1F5)); - public const int DOMAIN_GROUP_RID_ADMINS = unchecked( (int)( 0x200 ) ); - public const int DOMAIN_GROUP_RID_USERS = unchecked( (int)( 0x201 ) ); - public const int DOMAIN_GROUP_RID_GUESTS = unchecked( (int)( 0x202 ) ); + public const int DOMAIN_GROUP_RID_ADMINS = unchecked((int)(0x200)); + public const int DOMAIN_GROUP_RID_USERS = unchecked((int)(0x201)); + public const int DOMAIN_GROUP_RID_GUESTS = unchecked((int)(0x202)); - public const int DOMAIN_ALIAS_RID_ADMINS = unchecked( (int)( 0x220 ) ); - public const int DOMAIN_ALIAS_RID_USERS = unchecked( (int)( 0x221 ) ); - public const int DOMAIN_ALIAS_RID_GUESTS = unchecked( (int)( 0x222 ) ); - public const int DOMAIN_ALIAS_RID_POWER_USERS = unchecked( (int)( 0x223 ) ); - public const int DOMAIN_ALIAS_RID_ACCOUNT_OPS = unchecked( (int)( 0x224 ) ); - public const int DOMAIN_ALIAS_RID_SYSTEM_OPS = unchecked( (int)( 0x225 ) ); - public const int DOMAIN_ALIAS_RID_PRINT_OPS = unchecked( (int)( 0x226 ) ); - public const int DOMAIN_ALIAS_RID_BACKUP_OPS = unchecked( (int)( 0x227 ) ); - public const int DOMAIN_ALIAS_RID_REPLICATOR = unchecked( (int)( 0x228 ) ); + public const int DOMAIN_ALIAS_RID_ADMINS = unchecked((int)(0x220)); + public const int DOMAIN_ALIAS_RID_USERS = unchecked((int)(0x221)); + public const int DOMAIN_ALIAS_RID_GUESTS = unchecked((int)(0x222)); + public const int DOMAIN_ALIAS_RID_POWER_USERS = unchecked((int)(0x223)); + public const int DOMAIN_ALIAS_RID_ACCOUNT_OPS = unchecked((int)(0x224)); + public const int DOMAIN_ALIAS_RID_SYSTEM_OPS = unchecked((int)(0x225)); + public const int DOMAIN_ALIAS_RID_PRINT_OPS = unchecked((int)(0x226)); + public const int DOMAIN_ALIAS_RID_BACKUP_OPS = unchecked((int)(0x227)); + public const int DOMAIN_ALIAS_RID_REPLICATOR = unchecked((int)(0x228)); // Allocate the System Luid. The first 1000 LUIDs are reserved. @@ -232,11 +232,11 @@ public struct SID_AND_ATTRIBUTES // Group attributes - public const int SE_GROUP_MANDATORY = unchecked( (int)( 0x1 ) ); - public const int SE_GROUP_ENABLED_BY_DEFAULT = unchecked( (int)( 0x2 ) ); - public const int SE_GROUP_ENABLED = unchecked( (int)( 0x4 ) ); - public const int SE_GROUP_OWNER = unchecked( (int)( 0x8 ) ); - public const int SE_GROUP_LOGON_ID = unchecked( (int)( 0xC0000000 ) ); + public const int SE_GROUP_MANDATORY = unchecked((int)(0x1)); + public const int SE_GROUP_ENABLED_BY_DEFAULT = unchecked((int)(0x2)); + public const int SE_GROUP_ENABLED = unchecked((int)(0x4)); + public const int SE_GROUP_OWNER = unchecked((int)(0x8)); + public const int SE_GROUP_LOGON_ID = unchecked((int)(0xC0000000)); // User attributes @@ -246,54 +246,54 @@ public struct SID_AND_ATTRIBUTES // Kernel Section // ---------------- - public const int FILE_BEGIN = unchecked( (int)( 0 ) ); - public const int FILE_CURRENT = unchecked( (int)( 1 ) ); - public const int FILE_END = unchecked( (int)( 2 ) ); - - public const int FILE_FLAG_WRITE_THROUGH = unchecked( (int)( 0x80000000 ) ); - public const int FILE_FLAG_OVERLAPPED = unchecked( (int)( 0x40000000 ) ); - public const int FILE_FLAG_NO_BUFFERING = unchecked( (int)( 0x20000000 ) ); - public const int FILE_FLAG_RANDOM_ACCESS = unchecked( (int)( 0x10000000 ) ); - public const int FILE_FLAG_SEQUENTIAL_SCAN = unchecked( (int)( 0x8000000 ) ); - public const int FILE_FLAG_DELETE_ON_CLOSE = unchecked( (int)( 0x4000000 ) ); - public const int FILE_FLAG_BACKUP_SEMANTICS = unchecked( (int)( 0x2000000 ) ); - public const int FILE_FLAG_POSIX_SEMANTICS = unchecked( (int)( 0x1000000 ) ); - - public const int CREATE_NEW = unchecked( (int)( 1 ) ); - public const int CREATE_ALWAYS = unchecked( (int)( 2 ) ); - public const int OPEN_EXISTING = unchecked( (int)( 3 ) ); - public const int OPEN_ALWAYS = unchecked( (int)( 4 ) ); - public const int TRUNCATE_EXISTING = unchecked( (int)( 5 ) ); + public const int FILE_BEGIN = unchecked((int)(0)); + public const int FILE_CURRENT = unchecked((int)(1)); + public const int FILE_END = unchecked((int)(2)); + + public const int FILE_FLAG_WRITE_THROUGH = unchecked((int)(0x80000000)); + public const int FILE_FLAG_OVERLAPPED = unchecked((int)(0x40000000)); + public const int FILE_FLAG_NO_BUFFERING = unchecked((int)(0x20000000)); + public const int FILE_FLAG_RANDOM_ACCESS = unchecked((int)(0x10000000)); + public const int FILE_FLAG_SEQUENTIAL_SCAN = unchecked((int)(0x8000000)); + public const int FILE_FLAG_DELETE_ON_CLOSE = unchecked((int)(0x4000000)); + public const int FILE_FLAG_BACKUP_SEMANTICS = unchecked((int)(0x2000000)); + public const int FILE_FLAG_POSIX_SEMANTICS = unchecked((int)(0x1000000)); + + public const int CREATE_NEW = unchecked((int)(1)); + public const int CREATE_ALWAYS = unchecked((int)(2)); + public const int OPEN_EXISTING = unchecked((int)(3)); + public const int OPEN_ALWAYS = unchecked((int)(4)); + public const int TRUNCATE_EXISTING = unchecked((int)(5)); // Define the dwOpenMode values for CreateNamedPipe - public const int PIPE_ACCESS_INBOUND = unchecked( (int)( 0x1 ) ); - public const int PIPE_ACCESS_OUTBOUND = unchecked( (int)( 0x2 ) ); - public const int PIPE_ACCESS_DUPLEX = unchecked( (int)( 0x3 ) ); + public const int PIPE_ACCESS_INBOUND = unchecked((int)(0x1)); + public const int PIPE_ACCESS_OUTBOUND = unchecked((int)(0x2)); + public const int PIPE_ACCESS_DUPLEX = unchecked((int)(0x3)); // Define the Named Pipe End flags for GetNamedPipeInfo - public const int PIPE_CLIENT_END = unchecked( (int)( 0x0 ) ); - public const int PIPE_SERVER_END = unchecked( (int)( 0x1 ) ); + public const int PIPE_CLIENT_END = unchecked((int)(0x0)); + public const int PIPE_SERVER_END = unchecked((int)(0x1)); // Define the dwPipeMode values for CreateNamedPipe - public const int PIPE_WAIT = unchecked( (int)( 0x0 ) ); - public const int PIPE_NOWAIT = unchecked( (int)( 0x1 ) ); - public const int PIPE_READMODE_BYTE = unchecked( (int)( 0x0 ) ); - public const int PIPE_READMODE_MESSAGE = unchecked( (int)( 0x2 ) ); - public const int PIPE_TYPE_BYTE = unchecked( (int)( 0x0 ) ); - public const int PIPE_TYPE_MESSAGE = unchecked( (int)( 0x4 ) ); + public const int PIPE_WAIT = unchecked((int)(0x0)); + public const int PIPE_NOWAIT = unchecked((int)(0x1)); + public const int PIPE_READMODE_BYTE = unchecked((int)(0x0)); + public const int PIPE_READMODE_MESSAGE = unchecked((int)(0x2)); + public const int PIPE_TYPE_BYTE = unchecked((int)(0x0)); + public const int PIPE_TYPE_MESSAGE = unchecked((int)(0x4)); // Define the well known values for CreateNamedPipe nMaxInstances - public const int PIPE_UNLIMITED_INSTANCES = unchecked( (int)( 255 ) ); + public const int PIPE_UNLIMITED_INSTANCES = unchecked((int)(255)); // Define the Security Quality of Service bits to be passed // into CreateFile - public const int SECURITY_CONTEXT_TRACKING = unchecked( (int)( 0x40000 ) ); - public const int SECURITY_EFFECTIVE_ONLY = unchecked( (int)( 0x80000 ) ); + public const int SECURITY_CONTEXT_TRACKING = unchecked((int)(0x40000)); + public const int SECURITY_EFFECTIVE_ONLY = unchecked((int)(0x80000)); - public const int SECURITY_SQOS_PRESENT = unchecked( (int)( 0x100000 ) ); - public const int SECURITY_VALID_SQOS_FLAGS = unchecked( (int)( 0x1F0000 ) ); + public const int SECURITY_SQOS_PRESENT = unchecked((int)(0x100000)); + public const int SECURITY_VALID_SQOS_FLAGS = unchecked((int)(0x1F0000)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct OVERLAPPED { public int Internal; @@ -303,7 +303,7 @@ public struct OVERLAPPED public IntPtr hEvent; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SECURITY_ATTRIBUTES { public int nLength; @@ -311,7 +311,7 @@ public struct SECURITY_ATTRIBUTES public int bInheritHandle; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PROCESS_INFORMATION { public IntPtr hProcess; @@ -320,14 +320,14 @@ public struct PROCESS_INFORMATION public int dwThreadId; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct FILETIME { public int dwLowDateTime; public int dwHighDateTime; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SYSTEMTIME { public int wYear; @@ -341,84 +341,84 @@ public struct SYSTEMTIME } // Serial provider type. - public const int SP_SERIALCOMM = unchecked( (int)( 0x1 ) ); + public const int SP_SERIALCOMM = unchecked((int)(0x1)); // Provider SubTypes - public const int PST_UNSPECIFIED = unchecked( (int)( 0x0 ) ); - public const int PST_RS232 = unchecked( (int)( 0x1 ) ); - public const int PST_PARALLELPORT = unchecked( (int)( 0x2 ) ); - public const int PST_RS422 = unchecked( (int)( 0x3 ) ); - public const int PST_RS423 = unchecked( (int)( 0x4 ) ); - public const int PST_RS449 = unchecked( (int)( 0x5 ) ); - public const int PST_FAX = unchecked( (int)( 0x21 ) ); - public const int PST_SCANNER = unchecked( (int)( 0x22 ) ); - public const int PST_NETWORK_BRIDGE = unchecked( (int)( 0x100 ) ); - public const int PST_LAT = unchecked( (int)( 0x101 ) ); - public const int PST_TCPIP_TELNET = unchecked( (int)( 0x102 ) ); - public const int PST_X25 = unchecked( (int)( 0x103 ) ); + public const int PST_UNSPECIFIED = unchecked((int)(0x0)); + public const int PST_RS232 = unchecked((int)(0x1)); + public const int PST_PARALLELPORT = unchecked((int)(0x2)); + public const int PST_RS422 = unchecked((int)(0x3)); + public const int PST_RS423 = unchecked((int)(0x4)); + public const int PST_RS449 = unchecked((int)(0x5)); + public const int PST_FAX = unchecked((int)(0x21)); + public const int PST_SCANNER = unchecked((int)(0x22)); + public const int PST_NETWORK_BRIDGE = unchecked((int)(0x100)); + public const int PST_LAT = unchecked((int)(0x101)); + public const int PST_TCPIP_TELNET = unchecked((int)(0x102)); + public const int PST_X25 = unchecked((int)(0x103)); // Provider capabilities flags. - public const int PCF_DTRDSR = unchecked( (int)( 0x1 ) ); - public const int PCF_RTSCTS = unchecked( (int)( 0x2 ) ); - public const int PCF_RLSD = unchecked( (int)( 0x4 ) ); - public const int PCF_PARITY_CHECK = unchecked( (int)( 0x8 ) ); - public const int PCF_XONXOFF = unchecked( (int)( 0x10 ) ); - public const int PCF_SETXCHAR = unchecked( (int)( 0x20 ) ); - public const int PCF_TOTALTIMEOUTS = unchecked( (int)( 0x40 ) ); - public const int PCF_INTTIMEOUTS = unchecked( (int)( 0x80 ) ); - public const int PCF_SPECIALCHARS = unchecked( (int)( 0x100 ) ); - public const int PCF_16BITMODE = unchecked( (int)( 0x200 ) ); + public const int PCF_DTRDSR = unchecked((int)(0x1)); + public const int PCF_RTSCTS = unchecked((int)(0x2)); + public const int PCF_RLSD = unchecked((int)(0x4)); + public const int PCF_PARITY_CHECK = unchecked((int)(0x8)); + public const int PCF_XONXOFF = unchecked((int)(0x10)); + public const int PCF_SETXCHAR = unchecked((int)(0x20)); + public const int PCF_TOTALTIMEOUTS = unchecked((int)(0x40)); + public const int PCF_INTTIMEOUTS = unchecked((int)(0x80)); + public const int PCF_SPECIALCHARS = unchecked((int)(0x100)); + public const int PCF_16BITMODE = unchecked((int)(0x200)); // Comm provider settable parameters. - public const int SP_PARITY = unchecked( (int)( 0x1 ) ); - public const int SP_BAUD = unchecked( (int)( 0x2 ) ); - public const int SP_DATABITS = unchecked( (int)( 0x4 ) ); - public const int SP_STOPBITS = unchecked( (int)( 0x8 ) ); - public const int SP_HANDSHAKING = unchecked( (int)( 0x10 ) ); - public const int SP_PARITY_CHECK = unchecked( (int)( 0x20 ) ); - public const int SP_RLSD = unchecked( (int)( 0x40 ) ); + public const int SP_PARITY = unchecked((int)(0x1)); + public const int SP_BAUD = unchecked((int)(0x2)); + public const int SP_DATABITS = unchecked((int)(0x4)); + public const int SP_STOPBITS = unchecked((int)(0x8)); + public const int SP_HANDSHAKING = unchecked((int)(0x10)); + public const int SP_PARITY_CHECK = unchecked((int)(0x20)); + public const int SP_RLSD = unchecked((int)(0x40)); // Settable baud rates in the provider. - public const int BAUD_075 = unchecked( (int)( 0x1 ) ); - public const int BAUD_110 = unchecked( (int)( 0x2 ) ); - public const int BAUD_134_5 = unchecked( (int)( 0x4 ) ); - public const int BAUD_150 = unchecked( (int)( 0x8 ) ); - public const int BAUD_300 = unchecked( (int)( 0x10 ) ); - public const int BAUD_600 = unchecked( (int)( 0x20 ) ); - public const int BAUD_1200 = unchecked( (int)( 0x40 ) ); - public const int BAUD_1800 = unchecked( (int)( 0x80 ) ); - public const int BAUD_2400 = unchecked( (int)( 0x100 ) ); - public const int BAUD_4800 = unchecked( (int)( 0x200 ) ); - public const int BAUD_7200 = unchecked( (int)( 0x400 ) ); - public const int BAUD_9600 = unchecked( (int)( 0x800 ) ); - public const int BAUD_14400 = unchecked( (int)( 0x1000 ) ); - public const int BAUD_19200 = unchecked( (int)( 0x2000 ) ); - public const int BAUD_38400 = unchecked( (int)( 0x4000 ) ); - public const int BAUD_56K = unchecked( (int)( 0x8000 ) ); - public const int BAUD_128K = unchecked( (int)( 0x10000 ) ); - public const int BAUD_115200 = unchecked( (int)( 0x20000 ) ); - public const int BAUD_57600 = unchecked( (int)( 0x40000 ) ); - public const int BAUD_USER = unchecked( (int)( 0x10000000 ) ); + public const int BAUD_075 = unchecked((int)(0x1)); + public const int BAUD_110 = unchecked((int)(0x2)); + public const int BAUD_134_5 = unchecked((int)(0x4)); + public const int BAUD_150 = unchecked((int)(0x8)); + public const int BAUD_300 = unchecked((int)(0x10)); + public const int BAUD_600 = unchecked((int)(0x20)); + public const int BAUD_1200 = unchecked((int)(0x40)); + public const int BAUD_1800 = unchecked((int)(0x80)); + public const int BAUD_2400 = unchecked((int)(0x100)); + public const int BAUD_4800 = unchecked((int)(0x200)); + public const int BAUD_7200 = unchecked((int)(0x400)); + public const int BAUD_9600 = unchecked((int)(0x800)); + public const int BAUD_14400 = unchecked((int)(0x1000)); + public const int BAUD_19200 = unchecked((int)(0x2000)); + public const int BAUD_38400 = unchecked((int)(0x4000)); + public const int BAUD_56K = unchecked((int)(0x8000)); + public const int BAUD_128K = unchecked((int)(0x10000)); + public const int BAUD_115200 = unchecked((int)(0x20000)); + public const int BAUD_57600 = unchecked((int)(0x40000)); + public const int BAUD_USER = unchecked((int)(0x10000000)); // Settable Data Bits - public const int DATABITS_5 = unchecked( (int)( 0x1 ) ); - public const int DATABITS_6 = unchecked( (int)( 0x2 ) ); - public const int DATABITS_7 = unchecked( (int)( 0x4 ) ); - public const int DATABITS_8 = unchecked( (int)( 0x8 ) ); - public const int DATABITS_16 = unchecked( (int)( 0x10 ) ); - public const int DATABITS_16X = unchecked( (int)( 0x20 ) ); + public const int DATABITS_5 = unchecked((int)(0x1)); + public const int DATABITS_6 = unchecked((int)(0x2)); + public const int DATABITS_7 = unchecked((int)(0x4)); + public const int DATABITS_8 = unchecked((int)(0x8)); + public const int DATABITS_16 = unchecked((int)(0x10)); + public const int DATABITS_16X = unchecked((int)(0x20)); // Settable Stop and Parity bits. - public const int STOPBITS_10 = unchecked( (int)( 0x1 ) ); - public const int STOPBITS_15 = unchecked( (int)( 0x2 ) ); - public const int STOPBITS_20 = unchecked( (int)( 0x4 ) ); - public const int PARITY_NONE = unchecked( (int)( 0x100 ) ); - public const int PARITY_ODD = unchecked( (int)( 0x200 ) ); - public const int PARITY_EVEN = unchecked( (int)( 0x400 ) ); - public const int PARITY_MARK = unchecked( (int)( 0x800 ) ); - public const int PARITY_SPACE = unchecked( (int)( 0x1000 ) ); - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int STOPBITS_10 = unchecked((int)(0x1)); + public const int STOPBITS_15 = unchecked((int)(0x2)); + public const int STOPBITS_20 = unchecked((int)(0x4)); + public const int PARITY_NONE = unchecked((int)(0x100)); + public const int PARITY_ODD = unchecked((int)(0x200)); + public const int PARITY_EVEN = unchecked((int)(0x400)); + public const int PARITY_MARK = unchecked((int)(0x800)); + public const int PARITY_SPACE = unchecked((int)(0x1000)); + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct COMMPROP { public int wPacketLength; @@ -454,7 +454,7 @@ public struct COMMPROP // cbOutQue As Long //End Type - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct COMSTAT { public int fBitFields;//See Comment in Win32API.Txt @@ -474,15 +474,15 @@ public struct COMSTAT // fReserved 8 reserved (25 bits) // DTR Control Flow Values. - public const int DTR_CONTROL_DISABLE = unchecked( (int)( 0x0 ) ); - public const int DTR_CONTROL_ENABLE = unchecked( (int)( 0x1 ) ); - public const int DTR_CONTROL_HANDSHAKE = unchecked( (int)( 0x2 ) ); + public const int DTR_CONTROL_DISABLE = unchecked((int)(0x0)); + public const int DTR_CONTROL_ENABLE = unchecked((int)(0x1)); + public const int DTR_CONTROL_HANDSHAKE = unchecked((int)(0x2)); // RTS Control Flow Values - public const int RTS_CONTROL_DISABLE = unchecked( (int)( 0x0 ) ); - public const int RTS_CONTROL_ENABLE = unchecked( (int)( 0x1 ) ); - public const int RTS_CONTROL_HANDSHAKE = unchecked( (int)( 0x2 ) ); - public const int RTS_CONTROL_TOGGLE = unchecked( (int)( 0x3 ) ); + public const int RTS_CONTROL_DISABLE = unchecked((int)(0x0)); + public const int RTS_CONTROL_ENABLE = unchecked((int)(0x1)); + public const int RTS_CONTROL_HANDSHAKE = unchecked((int)(0x2)); + public const int RTS_CONTROL_TOGGLE = unchecked((int)(0x3)); //Type DCB // DCBlength As Long @@ -514,7 +514,7 @@ public struct COMSTAT // EvtChar As Byte //End Type - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DCB { public int DCBlength; @@ -551,7 +551,7 @@ public struct DCB // fAbortOnError 15 abort reads/writes on error // fDummy2 16 reserved - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct COMMTIMEOUTS { public int ReadIntervalTimeout; @@ -561,7 +561,7 @@ public struct COMMTIMEOUTS public int WriteTotalTimeoutConstant; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SYSTEM_INFO { public int dwOemID; @@ -576,29 +576,29 @@ public struct SYSTEM_INFO } // Global Memory Flags - public const int GMEM_FIXED = unchecked( (int)( 0x0 ) ); - public const int GMEM_MOVEABLE = unchecked( (int)( 0x2 ) ); - public const int GMEM_NOCOMPACT = unchecked( (int)( 0x10 ) ); - public const int GMEM_NODISCARD = unchecked( (int)( 0x20 ) ); - public const int GMEM_ZEROINIT = unchecked( (int)( 0x40 ) ); - public const int GMEM_MODIFY = unchecked( (int)( 0x80 ) ); - public const int GMEM_DISCARDABLE = unchecked( (int)( 0x100 ) ); - public const int GMEM_NOT_BANKED = unchecked( (int)( 0x1000 ) ); - public const int GMEM_SHARE = unchecked( (int)( 0x2000 ) ); - public const int GMEM_DDESHARE = unchecked( (int)( 0x2000 ) ); - public const int GMEM_NOTIFY = unchecked( (int)( 0x4000 ) ); - public const int GMEM_LOWER = unchecked( (int)( GMEM_NOT_BANKED ) ); - public const int GMEM_VALID_FLAGS = unchecked( (int)( 0x7F72 ) ); - public const int GMEM_INVALID_HANDLE = unchecked( (int)( 0x8000 ) ); - - public const int GHND = unchecked( (int)( ( GMEM_MOVEABLE | GMEM_ZEROINIT ) ) ); - public const int GPTR = unchecked( (int)( ( GMEM_FIXED | GMEM_ZEROINIT ) ) ); + public const int GMEM_FIXED = unchecked((int)(0x0)); + public const int GMEM_MOVEABLE = unchecked((int)(0x2)); + public const int GMEM_NOCOMPACT = unchecked((int)(0x10)); + public const int GMEM_NODISCARD = unchecked((int)(0x20)); + public const int GMEM_ZEROINIT = unchecked((int)(0x40)); + public const int GMEM_MODIFY = unchecked((int)(0x80)); + public const int GMEM_DISCARDABLE = unchecked((int)(0x100)); + public const int GMEM_NOT_BANKED = unchecked((int)(0x1000)); + public const int GMEM_SHARE = unchecked((int)(0x2000)); + public const int GMEM_DDESHARE = unchecked((int)(0x2000)); + public const int GMEM_NOTIFY = unchecked((int)(0x4000)); + public const int GMEM_LOWER = unchecked((int)(GMEM_NOT_BANKED)); + public const int GMEM_VALID_FLAGS = unchecked((int)(0x7F72)); + public const int GMEM_INVALID_HANDLE = unchecked((int)(0x8000)); + + public const int GHND = unchecked((int)((GMEM_MOVEABLE | GMEM_ZEROINIT))); + public const int GPTR = unchecked((int)((GMEM_FIXED | GMEM_ZEROINIT))); // Flags returned by GlobalFlags (in addition to GMEM_DISCARDABLE) - public const int GMEM_DISCARDED = unchecked( (int)( 0x4000 ) ); - public const int GMEM_LOCKCOUNT = unchecked( (int)( 0xFF ) ); + public const int GMEM_DISCARDED = unchecked((int)(0x4000)); + public const int GMEM_LOCKCOUNT = unchecked((int)(0xFF)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MEMORYSTATUS { public int dwLength; @@ -612,64 +612,64 @@ public struct MEMORYSTATUS } // Local Memory Flags - public const int LMEM_FIXED = unchecked( (int)( 0x0 ) ); - public const int LMEM_MOVEABLE = unchecked( (int)( 0x2 ) ); - public const int LMEM_NOCOMPACT = unchecked( (int)( 0x10 ) ); - public const int LMEM_NODISCARD = unchecked( (int)( 0x20 ) ); - public const int LMEM_ZEROINIT = unchecked( (int)( 0x40 ) ); - public const int LMEM_MODIFY = unchecked( (int)( 0x80 ) ); - public const int LMEM_DISCARDABLE = unchecked( (int)( 0xF00 ) ); - public const int LMEM_VALID_FLAGS = unchecked( (int)( 0xF72 ) ); - public const int LMEM_INVALID_HANDLE = unchecked( (int)( 0x8000 ) ); - - public const int LHND = unchecked( (int)( ( LMEM_MOVEABLE + LMEM_ZEROINIT ) ) ); - public const int LPTR = unchecked( (int)( ( LMEM_FIXED + LMEM_ZEROINIT ) ) ); - - public const int NONZEROLHND = unchecked( (int)( ( LMEM_MOVEABLE ) ) ); - public const int NONZEROLPTR = unchecked( (int)( ( LMEM_FIXED ) ) ); + public const int LMEM_FIXED = unchecked((int)(0x0)); + public const int LMEM_MOVEABLE = unchecked((int)(0x2)); + public const int LMEM_NOCOMPACT = unchecked((int)(0x10)); + public const int LMEM_NODISCARD = unchecked((int)(0x20)); + public const int LMEM_ZEROINIT = unchecked((int)(0x40)); + public const int LMEM_MODIFY = unchecked((int)(0x80)); + public const int LMEM_DISCARDABLE = unchecked((int)(0xF00)); + public const int LMEM_VALID_FLAGS = unchecked((int)(0xF72)); + public const int LMEM_INVALID_HANDLE = unchecked((int)(0x8000)); + + public const int LHND = unchecked((int)((LMEM_MOVEABLE + LMEM_ZEROINIT))); + public const int LPTR = unchecked((int)((LMEM_FIXED + LMEM_ZEROINIT))); + + public const int NONZEROLHND = unchecked((int)((LMEM_MOVEABLE))); + public const int NONZEROLPTR = unchecked((int)((LMEM_FIXED))); // Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE) - public const int LMEM_DISCARDED = unchecked( (int)( 0x4000 ) ); - public const int LMEM_LOCKCOUNT = unchecked( (int)( 0xFF ) ); + public const int LMEM_DISCARDED = unchecked((int)(0x4000)); + public const int LMEM_LOCKCOUNT = unchecked((int)(0xFF)); // dwCreationFlag values - public const int DEBUG_PROCESS = unchecked( (int)( 0x1 ) ); - public const int DEBUG_ONLY_THIS_PROCESS = unchecked( (int)( 0x2 ) ); + public const int DEBUG_PROCESS = unchecked((int)(0x1)); + public const int DEBUG_ONLY_THIS_PROCESS = unchecked((int)(0x2)); - public const int CREATE_SUSPENDED = unchecked( (int)( 0x4 ) ); + public const int CREATE_SUSPENDED = unchecked((int)(0x4)); - public const int DETACHED_PROCESS = unchecked( (int)( 0x8 ) ); + public const int DETACHED_PROCESS = unchecked((int)(0x8)); - public const int CREATE_NEW_CONSOLE = unchecked( (int)( 0x10 ) ); + public const int CREATE_NEW_CONSOLE = unchecked((int)(0x10)); - public const int NORMAL_PRIORITY_CLASS = unchecked( (int)( 0x20 ) ); - public const int IDLE_PRIORITY_CLASS = unchecked( (int)( 0x40 ) ); - public const int HIGH_PRIORITY_CLASS = unchecked( (int)( 0x80 ) ); - public const int REALTIME_PRIORITY_CLASS = unchecked( (int)( 0x100 ) ); + public const int NORMAL_PRIORITY_CLASS = unchecked((int)(0x20)); + public const int IDLE_PRIORITY_CLASS = unchecked((int)(0x40)); + public const int HIGH_PRIORITY_CLASS = unchecked((int)(0x80)); + public const int REALTIME_PRIORITY_CLASS = unchecked((int)(0x100)); - public const int CREATE_NEW_PROCESS_GROUP = unchecked( (int)( 0x200 ) ); + public const int CREATE_NEW_PROCESS_GROUP = unchecked((int)(0x200)); - public const int CREATE_NO_WINDOW = unchecked( (int)( 0x8000000 ) ); + public const int CREATE_NO_WINDOW = unchecked((int)(0x8000000)); - public const int PROFILE_USER = unchecked( (int)( 0x10000000 ) ); - public const int PROFILE_KERNEL = unchecked( (int)( 0x20000000 ) ); - public const int PROFILE_SERVER = unchecked( (int)( 0x40000000 ) ); + public const int PROFILE_USER = unchecked((int)(0x10000000)); + public const int PROFILE_KERNEL = unchecked((int)(0x20000000)); + public const int PROFILE_SERVER = unchecked((int)(0x40000000)); - public const int MAXLONG = unchecked( (int)( 0x7FFFFFFF ) ); - public const int THREAD_BASE_PRIORITY_MIN = unchecked( (int)( -2 ) ); - public const int THREAD_BASE_PRIORITY_MAX = unchecked( (int)( 2 ) ); - public const int THREAD_BASE_PRIORITY_LOWRT = unchecked( (int)( 15 ) ); - public const int THREAD_BASE_PRIORITY_IDLE = unchecked( (int)( -15 ) ); - public const int THREAD_PRIORITY_LOWEST = unchecked( (int)( THREAD_BASE_PRIORITY_MIN ) ); - public const int THREAD_PRIORITY_BELOW_NORMAL = unchecked( (int)( ( THREAD_PRIORITY_LOWEST + 1 ) ) ); - public const int THREAD_PRIORITY_NORMAL = unchecked( (int)( 0 ) ); - public const int THREAD_PRIORITY_HIGHEST = unchecked( (int)( THREAD_BASE_PRIORITY_MAX ) ); - public const int THREAD_PRIORITY_ABOVE_NORMAL = unchecked( (int)( ( THREAD_PRIORITY_HIGHEST - 1 ) ) ); - public const int THREAD_PRIORITY_ERROR_RETURN = unchecked( (int)( ( MAXLONG ) ) ); + public const int MAXLONG = unchecked((int)(0x7FFFFFFF)); + public const int THREAD_BASE_PRIORITY_MIN = unchecked((int)(-2)); + public const int THREAD_BASE_PRIORITY_MAX = unchecked((int)(2)); + public const int THREAD_BASE_PRIORITY_LOWRT = unchecked((int)(15)); + public const int THREAD_BASE_PRIORITY_IDLE = unchecked((int)(-15)); + public const int THREAD_PRIORITY_LOWEST = unchecked((int)(THREAD_BASE_PRIORITY_MIN)); + public const int THREAD_PRIORITY_BELOW_NORMAL = unchecked((int)((THREAD_PRIORITY_LOWEST + 1))); + public const int THREAD_PRIORITY_NORMAL = unchecked((int)(0)); + public const int THREAD_PRIORITY_HIGHEST = unchecked((int)(THREAD_BASE_PRIORITY_MAX)); + public const int THREAD_PRIORITY_ABOVE_NORMAL = unchecked((int)((THREAD_PRIORITY_HIGHEST - 1))); + public const int THREAD_PRIORITY_ERROR_RETURN = unchecked((int)((MAXLONG))); - public const int THREAD_PRIORITY_TIME_CRITICAL = unchecked( (int)( THREAD_BASE_PRIORITY_LOWRT ) ); - public const int THREAD_PRIORITY_IDLE = unchecked( (int)( THREAD_BASE_PRIORITY_IDLE ) ); + public const int THREAD_PRIORITY_TIME_CRITICAL = unchecked((int)(THREAD_BASE_PRIORITY_LOWRT)); + public const int THREAD_PRIORITY_IDLE = unchecked((int)(THREAD_BASE_PRIORITY_IDLE)); // ++ BUILD Version: 0093 Increment this if a change has global effects @@ -685,21 +685,21 @@ public struct MEMORYSTATUS // defined by NT, but exposed through the Win32 API. // Revision History: - public const int APPLICATION_ERROR_MASK = unchecked( (int)( 0x20000000 ) ); - public const int ERROR_SEVERITY_SUCCESS = unchecked( (int)( 0x0 ) ); - public const int ERROR_SEVERITY_INFORMATIONAL = unchecked( (int)( 0x40000000 ) ); - public const int ERROR_SEVERITY_WARNING = unchecked( (int)( 0x80000000 ) ); - public const int ERROR_SEVERITY_ERROR = unchecked( (int)( 0xC0000000 ) ); - - - public const int MINCHAR = unchecked( (int)( 0x80 ) ); - public const int MAXCHAR = unchecked( (int)( 0x7F ) ); - public const int MINSHORT = unchecked( (int)( 0x8000 ) ); - public const int MAXSHORT = unchecked( (int)( 0x7FFF ) ); - public const int MINLONG = unchecked( (int)( 0x80000000 ) ); - public const int MAXBYTE = unchecked( (int)( 0xFF ) ); - public const int MAXWORD = unchecked( (int)( 0xFFFF ) ); - public const int MAXDWORD = unchecked( (int)( 0xFFFF ) ); + public const int APPLICATION_ERROR_MASK = unchecked((int)(0x20000000)); + public const int ERROR_SEVERITY_SUCCESS = unchecked((int)(0x0)); + public const int ERROR_SEVERITY_INFORMATIONAL = unchecked((int)(0x40000000)); + public const int ERROR_SEVERITY_WARNING = unchecked((int)(0x80000000)); + public const int ERROR_SEVERITY_ERROR = unchecked((int)(0xC0000000)); + + + public const int MINCHAR = unchecked((int)(0x80)); + public const int MAXCHAR = unchecked((int)(0x7F)); + public const int MINSHORT = unchecked((int)(0x8000)); + public const int MAXSHORT = unchecked((int)(0x7FFF)); + public const int MINLONG = unchecked((int)(0x80000000)); + public const int MAXBYTE = unchecked((int)(0xFF)); + public const int MAXWORD = unchecked((int)(0xFFFF)); + public const int MAXDWORD = unchecked((int)(0xFFFF)); // // Calculate the byte offset of a field in a structure of type type. // * Language IDs. @@ -716,34 +716,34 @@ public struct MEMORYSTATUS // // * Primary language IDs. // */ - public const int LANG_NEUTRAL = unchecked( (int)( 0x0 ) ); - - public const int LANG_BULGARIAN = unchecked( (int)( 0x2 ) ); - public const int LANG_CHINESE = unchecked( (int)( 0x4 ) ); - public const int LANG_CROATIAN = unchecked( (int)( 0x1A ) ); - public const int LANG_CZECH = unchecked( (int)( 0x5 ) ); - public const int LANG_DANISH = unchecked( (int)( 0x6 ) ); - public const int LANG_DUTCH = unchecked( (int)( 0x13 ) ); - public const int LANG_ENGLISH = unchecked( (int)( 0x9 ) ); - public const int LANG_FINNISH = unchecked( (int)( 0xB ) ); - public const int LANG_FRENCH = unchecked( (int)( 0xC ) ); - public const int LANG_GERMAN = unchecked( (int)( 0x7 ) ); - public const int LANG_GREEK = unchecked( (int)( 0x8 ) ); - public const int LANG_HUNGARIAN = unchecked( (int)( 0xE ) ); - public const int LANG_ICELANDIC = unchecked( (int)( 0xF ) ); - public const int LANG_ITALIAN = unchecked( (int)( 0x10 ) ); - public const int LANG_JAPANESE = unchecked( (int)( 0x11 ) ); - public const int LANG_KOREAN = unchecked( (int)( 0x12 ) ); - public const int LANG_NORWEGIAN = unchecked( (int)( 0x14 ) ); - public const int LANG_POLISH = unchecked( (int)( 0x15 ) ); - public const int LANG_PORTUGUESE = unchecked( (int)( 0x16 ) ); - public const int LANG_ROMANIAN = unchecked( (int)( 0x18 ) ); - public const int LANG_RUSSIAN = unchecked( (int)( 0x19 ) ); - public const int LANG_SLOVAK = unchecked( (int)( 0x1B ) ); - public const int LANG_SLOVENIAN = unchecked( (int)( 0x24 ) ); - public const int LANG_SPANISH = unchecked( (int)( 0xA ) ); - public const int LANG_SWEDISH = unchecked( (int)( 0x1D ) ); - public const int LANG_TURKISH = unchecked( (int)( 0x1F ) ); + public const int LANG_NEUTRAL = unchecked((int)(0x0)); + + public const int LANG_BULGARIAN = unchecked((int)(0x2)); + public const int LANG_CHINESE = unchecked((int)(0x4)); + public const int LANG_CROATIAN = unchecked((int)(0x1A)); + public const int LANG_CZECH = unchecked((int)(0x5)); + public const int LANG_DANISH = unchecked((int)(0x6)); + public const int LANG_DUTCH = unchecked((int)(0x13)); + public const int LANG_ENGLISH = unchecked((int)(0x9)); + public const int LANG_FINNISH = unchecked((int)(0xB)); + public const int LANG_FRENCH = unchecked((int)(0xC)); + public const int LANG_GERMAN = unchecked((int)(0x7)); + public const int LANG_GREEK = unchecked((int)(0x8)); + public const int LANG_HUNGARIAN = unchecked((int)(0xE)); + public const int LANG_ICELANDIC = unchecked((int)(0xF)); + public const int LANG_ITALIAN = unchecked((int)(0x10)); + public const int LANG_JAPANESE = unchecked((int)(0x11)); + public const int LANG_KOREAN = unchecked((int)(0x12)); + public const int LANG_NORWEGIAN = unchecked((int)(0x14)); + public const int LANG_POLISH = unchecked((int)(0x15)); + public const int LANG_PORTUGUESE = unchecked((int)(0x16)); + public const int LANG_ROMANIAN = unchecked((int)(0x18)); + public const int LANG_RUSSIAN = unchecked((int)(0x19)); + public const int LANG_SLOVAK = unchecked((int)(0x1B)); + public const int LANG_SLOVENIAN = unchecked((int)(0x24)); + public const int LANG_SPANISH = unchecked((int)(0xA)); + public const int LANG_SWEDISH = unchecked((int)(0x1D)); + public const int LANG_TURKISH = unchecked((int)(0x1F)); // // * Sublanguage IDs. @@ -752,53 +752,53 @@ public struct MEMORYSTATUS // * language ID that sublanguage ID can be combined with to form a // * valid language ID. // */ - public const int SUBLANG_NEUTRAL = unchecked( (int)( 0x0 ) );// language neutral - public const int SUBLANG_DEFAULT = unchecked( (int)( 0x1 ) );// user default - public const int SUBLANG_SYS_DEFAULT = unchecked( (int)( 0x2 ) );// system default - - public const int SUBLANG_CHINESE_TRADITIONAL = unchecked( (int)( 0x1 ) );// Chinese (Taiwan) - public const int SUBLANG_CHINESE_SIMPLIFIED = unchecked( (int)( 0x2 ) );// Chinese (PR China) - public const int SUBLANG_CHINESE_HONGKONG = unchecked( (int)( 0x3 ) );// Chinese (Hong Kong) - public const int SUBLANG_CHINESE_SINGAPORE = unchecked( (int)( 0x4 ) );// Chinese (Singapore) - public const int SUBLANG_DUTCH = unchecked( (int)( 0x1 ) );// Dutch - public const int SUBLANG_DUTCH_BELGIAN = unchecked( (int)( 0x2 ) );// Dutch (Belgian) - public const int SUBLANG_ENGLISH_US = unchecked( (int)( 0x1 ) );// English (USA) - public const int SUBLANG_ENGLISH_UK = unchecked( (int)( 0x2 ) );// English (UK) - public const int SUBLANG_ENGLISH_AUS = unchecked( (int)( 0x3 ) );// English (Australian) - public const int SUBLANG_ENGLISH_CAN = unchecked( (int)( 0x4 ) );// English (Canadian) - public const int SUBLANG_ENGLISH_NZ = unchecked( (int)( 0x5 ) );// English (New Zealand) - public const int SUBLANG_ENGLISH_EIRE = unchecked( (int)( 0x6 ) );// English (Irish) - public const int SUBLANG_FRENCH = unchecked( (int)( 0x1 ) );// French - public const int SUBLANG_FRENCH_BELGIAN = unchecked( (int)( 0x2 ) );// French (Belgian) - public const int SUBLANG_FRENCH_CANADIAN = unchecked( (int)( 0x3 ) );// French (Canadian) - public const int SUBLANG_FRENCH_SWISS = unchecked( (int)( 0x4 ) );// French (Swiss) - public const int SUBLANG_GERMAN = unchecked( (int)( 0x1 ) );// German - public const int SUBLANG_GERMAN_SWISS = unchecked( (int)( 0x2 ) );// German (Swiss) - public const int SUBLANG_GERMAN_AUSTRIAN = unchecked( (int)( 0x3 ) );// German (Austrian) - public const int SUBLANG_ITALIAN = unchecked( (int)( 0x1 ) );// Italian - public const int SUBLANG_ITALIAN_SWISS = unchecked( (int)( 0x2 ) );// Italian (Swiss) - public const int SUBLANG_NORWEGIAN_BOKMAL = unchecked( (int)( 0x1 ) );// Norwegian (Bokma - public const int SUBLANG_NORWEGIAN_NYNORSK = unchecked( (int)( 0x2 ) );// Norwegian (Nynorsk) - public const int SUBLANG_PORTUGUESE = unchecked( (int)( 0x2 ) );// Portuguese - public const int SUBLANG_PORTUGUESE_BRAZILIAN = unchecked( (int)( 0x1 ) );// Portuguese (Brazilian) - public const int SUBLANG_SPANISH = unchecked( (int)( 0x1 ) );// Spanish (Castilian) - public const int SUBLANG_SPANISH_MEXICAN = unchecked( (int)( 0x2 ) );// Spanish (Mexican) - public const int SUBLANG_SPANISH_MODERN = unchecked( (int)( 0x3 ) );// Spanish (Modern) + public const int SUBLANG_NEUTRAL = unchecked((int)(0x0));// language neutral + public const int SUBLANG_DEFAULT = unchecked((int)(0x1));// user default + public const int SUBLANG_SYS_DEFAULT = unchecked((int)(0x2));// system default + + public const int SUBLANG_CHINESE_TRADITIONAL = unchecked((int)(0x1));// Chinese (Taiwan) + public const int SUBLANG_CHINESE_SIMPLIFIED = unchecked((int)(0x2));// Chinese (PR China) + public const int SUBLANG_CHINESE_HONGKONG = unchecked((int)(0x3));// Chinese (Hong Kong) + public const int SUBLANG_CHINESE_SINGAPORE = unchecked((int)(0x4));// Chinese (Singapore) + public const int SUBLANG_DUTCH = unchecked((int)(0x1));// Dutch + public const int SUBLANG_DUTCH_BELGIAN = unchecked((int)(0x2));// Dutch (Belgian) + public const int SUBLANG_ENGLISH_US = unchecked((int)(0x1));// English (USA) + public const int SUBLANG_ENGLISH_UK = unchecked((int)(0x2));// English (UK) + public const int SUBLANG_ENGLISH_AUS = unchecked((int)(0x3));// English (Australian) + public const int SUBLANG_ENGLISH_CAN = unchecked((int)(0x4));// English (Canadian) + public const int SUBLANG_ENGLISH_NZ = unchecked((int)(0x5));// English (New Zealand) + public const int SUBLANG_ENGLISH_EIRE = unchecked((int)(0x6));// English (Irish) + public const int SUBLANG_FRENCH = unchecked((int)(0x1));// French + public const int SUBLANG_FRENCH_BELGIAN = unchecked((int)(0x2));// French (Belgian) + public const int SUBLANG_FRENCH_CANADIAN = unchecked((int)(0x3));// French (Canadian) + public const int SUBLANG_FRENCH_SWISS = unchecked((int)(0x4));// French (Swiss) + public const int SUBLANG_GERMAN = unchecked((int)(0x1));// German + public const int SUBLANG_GERMAN_SWISS = unchecked((int)(0x2));// German (Swiss) + public const int SUBLANG_GERMAN_AUSTRIAN = unchecked((int)(0x3));// German (Austrian) + public const int SUBLANG_ITALIAN = unchecked((int)(0x1));// Italian + public const int SUBLANG_ITALIAN_SWISS = unchecked((int)(0x2));// Italian (Swiss) + public const int SUBLANG_NORWEGIAN_BOKMAL = unchecked((int)(0x1));// Norwegian (Bokma + public const int SUBLANG_NORWEGIAN_NYNORSK = unchecked((int)(0x2));// Norwegian (Nynorsk) + public const int SUBLANG_PORTUGUESE = unchecked((int)(0x2));// Portuguese + public const int SUBLANG_PORTUGUESE_BRAZILIAN = unchecked((int)(0x1));// Portuguese (Brazilian) + public const int SUBLANG_SPANISH = unchecked((int)(0x1));// Spanish (Castilian) + public const int SUBLANG_SPANISH_MEXICAN = unchecked((int)(0x2));// Spanish (Mexican) + public const int SUBLANG_SPANISH_MODERN = unchecked((int)(0x3));// Spanish (Modern) // // * Sorting IDs. // * // */ - public const int SORT_DEFAULT = unchecked( (int)( 0x0 ) );// sorting default + public const int SORT_DEFAULT = unchecked((int)(0x0));// sorting default - public const int SORT_JAPANESE_XJIS = unchecked( (int)( 0x0 ) );// Japanese0xJIS order - public const int SORT_JAPANESE_UNICODE = unchecked( (int)( 0x1 ) );// Japanese Unicode order + public const int SORT_JAPANESE_XJIS = unchecked((int)(0x0));// Japanese0xJIS order + public const int SORT_JAPANESE_UNICODE = unchecked((int)(0x1));// Japanese Unicode order - public const int SORT_CHINESE_BIG5 = unchecked( (int)( 0x0 ) );// Chinese BIG5 order - public const int SORT_CHINESE_UNICODE = unchecked( (int)( 0x1 ) );// Chinese Unicode order + public const int SORT_CHINESE_BIG5 = unchecked((int)(0x0));// Chinese BIG5 order + public const int SORT_CHINESE_UNICODE = unchecked((int)(0x1));// Chinese Unicode order - public const int SORT_KOREAN_KSC = unchecked( (int)( 0x0 ) );// Korean KSC order - public const int SORT_KOREAN_UNICODE = unchecked( (int)( 0x1 ) );// Korean Unicode order + public const int SORT_KOREAN_KSC = unchecked((int)(0x0));// Korean KSC order + public const int SORT_KOREAN_UNICODE = unchecked((int)(0x1));// Korean Unicode order // The FILE_READ_DATA and FILE_WRITE_DATA constants are also defined in // devioctl.h as FILE_READ_ACCESS and FILE_WRITE_ACCESS. The values for these @@ -807,69 +807,69 @@ public struct MEMORYSTATUS // both DOS and NT. // - public const int FILE_READ_DATA = unchecked( (int)( ( 0x1 ) ) );// file pipe - public const int FILE_LIST_DIRECTORY = unchecked( (int)( ( 0x1 ) ) );// directory + public const int FILE_READ_DATA = unchecked((int)((0x1)));// file pipe + public const int FILE_LIST_DIRECTORY = unchecked((int)((0x1)));// directory - public const int FILE_WRITE_DATA = unchecked( (int)( ( 0x2 ) ) );// file pipe - public const int FILE_ADD_FILE = unchecked( (int)( ( 0x2 ) ) );// directory + public const int FILE_WRITE_DATA = unchecked((int)((0x2)));// file pipe + public const int FILE_ADD_FILE = unchecked((int)((0x2)));// directory - public const int FILE_APPEND_DATA = unchecked( (int)( ( 0x4 ) ) );// file - public const int FILE_ADD_SUBDIRECTORY = unchecked( (int)( ( 0x4 ) ) );// directory - public const int FILE_CREATE_PIPE_INSTANCE = unchecked( (int)( ( 0x4 ) ) );// named pipe + public const int FILE_APPEND_DATA = unchecked((int)((0x4)));// file + public const int FILE_ADD_SUBDIRECTORY = unchecked((int)((0x4)));// directory + public const int FILE_CREATE_PIPE_INSTANCE = unchecked((int)((0x4)));// named pipe - public const int FILE_READ_EA = unchecked( (int)( ( 0x8 ) ) );// file directory - public const int FILE_READ_PROPERTIES = unchecked( (int)( FILE_READ_EA ) ); + public const int FILE_READ_EA = unchecked((int)((0x8)));// file directory + public const int FILE_READ_PROPERTIES = unchecked((int)(FILE_READ_EA)); - public const int FILE_WRITE_EA = unchecked( (int)( ( 0x10 ) ) );// file directory - public const int FILE_WRITE_PROPERTIES = unchecked( (int)( FILE_WRITE_EA ) ); + public const int FILE_WRITE_EA = unchecked((int)((0x10)));// file directory + public const int FILE_WRITE_PROPERTIES = unchecked((int)(FILE_WRITE_EA)); - public const int FILE_EXECUTE = unchecked( (int)( ( 0x20 ) ) );// file - public const int FILE_TRAVERSE = unchecked( (int)( ( 0x20 ) ) );// directory + public const int FILE_EXECUTE = unchecked((int)((0x20)));// file + public const int FILE_TRAVERSE = unchecked((int)((0x20)));// directory - public const int FILE_DELETE_CHILD = unchecked( (int)( ( 0x40 ) ) );// directory + public const int FILE_DELETE_CHILD = unchecked((int)((0x40)));// directory - public const int FILE_READ_ATTRIBUTES = unchecked( (int)( ( 0x80 ) ) );// all + public const int FILE_READ_ATTRIBUTES = unchecked((int)((0x80)));// all - public const int FILE_WRITE_ATTRIBUTES = unchecked( (int)( ( 0x100 ) ) );// all + public const int FILE_WRITE_ATTRIBUTES = unchecked((int)((0x100)));// all - public const int FILE_ALL_ACCESS = unchecked( (int)( ( STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF ) ) ); + public const int FILE_ALL_ACCESS = unchecked((int)((STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF))); - public const int FILE_GENERIC_READ = unchecked( (int)( ( STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE ) ) ); + public const int FILE_GENERIC_READ = unchecked((int)((STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE))); - public const int FILE_GENERIC_WRITE = unchecked( (int)( ( STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE ) ) ); + public const int FILE_GENERIC_WRITE = unchecked((int)((STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE))); - public const int FILE_GENERIC_EXECUTE = unchecked( (int)( ( STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE ) ) ); + public const int FILE_GENERIC_EXECUTE = unchecked((int)((STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE))); - public const int FILE_SHARE_READ = unchecked( (int)( 0x1 ) ); - public const int FILE_SHARE_WRITE = unchecked( (int)( 0x2 ) ); - public const int FILE_ATTRIBUTE_READONLY = unchecked( (int)( 0x1 ) ); - public const int FILE_ATTRIBUTE_HIDDEN = unchecked( (int)( 0x2 ) ); - public const int FILE_ATTRIBUTE_SYSTEM = unchecked( (int)( 0x4 ) ); - public const int FILE_ATTRIBUTE_DIRECTORY = unchecked( (int)( 0x10 ) ); - public const int FILE_ATTRIBUTE_ARCHIVE = unchecked( (int)( 0x20 ) ); - public const int FILE_ATTRIBUTE_NORMAL = unchecked( (int)( 0x80 ) ); - public const int FILE_ATTRIBUTE_TEMPORARY = unchecked( (int)( 0x100 ) ); - public const int FILE_ATTRIBUTE_COMPRESSED = unchecked( (int)( 0x800 ) ); - public const int FILE_NOTIFY_CHANGE_FILE_NAME = unchecked( (int)( 0x1 ) ); - public const int FILE_NOTIFY_CHANGE_DIR_NAME = unchecked( (int)( 0x2 ) ); - public const int FILE_NOTIFY_CHANGE_ATTRIBUTES = unchecked( (int)( 0x4 ) ); - public const int FILE_NOTIFY_CHANGE_SIZE = unchecked( (int)( 0x8 ) ); - public const int FILE_NOTIFY_CHANGE_LAST_WRITE = unchecked( (int)( 0x10 ) ); - public const int FILE_NOTIFY_CHANGE_SECURITY = unchecked( (int)( 0x100 ) ); - public const int MAILSLOT_NO_MESSAGE = unchecked( (int)( ( -1 ) ) ); - public const int MAILSLOT_WAIT_FOREVER = unchecked( (int)( ( -1 ) ) ); - public const int FILE_CASE_SENSITIVE_SEARCH = unchecked( (int)( 0x1 ) ); - public const int FILE_CASE_PRESERVED_NAMES = unchecked( (int)( 0x2 ) ); - public const int FILE_UNICODE_ON_DISK = unchecked( (int)( 0x4 ) ); - public const int FILE_PERSISTENT_ACLS = unchecked( (int)( 0x8 ) ); - public const int FILE_FILE_COMPRESSION = unchecked( (int)( 0x10 ) ); - public const int FILE_VOLUME_IS_COMPRESSED = unchecked( (int)( 0x8000 ) ); - public const int IO_COMPLETION_MODIFY_STATE = unchecked( (int)( 0x2 ) ); - public const int IO_COMPLETION_ALL_ACCESS = unchecked( (int)( ( STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3 ) ) ); - public const int DUPLICATE_CLOSE_SOURCE = unchecked( (int)( 0x1 ) ); - public const int DUPLICATE_SAME_ACCESS = unchecked( (int)( 0x2 ) ); + public const int FILE_SHARE_READ = unchecked((int)(0x1)); + public const int FILE_SHARE_WRITE = unchecked((int)(0x2)); + public const int FILE_ATTRIBUTE_READONLY = unchecked((int)(0x1)); + public const int FILE_ATTRIBUTE_HIDDEN = unchecked((int)(0x2)); + public const int FILE_ATTRIBUTE_SYSTEM = unchecked((int)(0x4)); + public const int FILE_ATTRIBUTE_DIRECTORY = unchecked((int)(0x10)); + public const int FILE_ATTRIBUTE_ARCHIVE = unchecked((int)(0x20)); + public const int FILE_ATTRIBUTE_NORMAL = unchecked((int)(0x80)); + public const int FILE_ATTRIBUTE_TEMPORARY = unchecked((int)(0x100)); + public const int FILE_ATTRIBUTE_COMPRESSED = unchecked((int)(0x800)); + public const int FILE_NOTIFY_CHANGE_FILE_NAME = unchecked((int)(0x1)); + public const int FILE_NOTIFY_CHANGE_DIR_NAME = unchecked((int)(0x2)); + public const int FILE_NOTIFY_CHANGE_ATTRIBUTES = unchecked((int)(0x4)); + public const int FILE_NOTIFY_CHANGE_SIZE = unchecked((int)(0x8)); + public const int FILE_NOTIFY_CHANGE_LAST_WRITE = unchecked((int)(0x10)); + public const int FILE_NOTIFY_CHANGE_SECURITY = unchecked((int)(0x100)); + public const int MAILSLOT_NO_MESSAGE = unchecked((int)((-1))); + public const int MAILSLOT_WAIT_FOREVER = unchecked((int)((-1))); + public const int FILE_CASE_SENSITIVE_SEARCH = unchecked((int)(0x1)); + public const int FILE_CASE_PRESERVED_NAMES = unchecked((int)(0x2)); + public const int FILE_UNICODE_ON_DISK = unchecked((int)(0x4)); + public const int FILE_PERSISTENT_ACLS = unchecked((int)(0x8)); + public const int FILE_FILE_COMPRESSION = unchecked((int)(0x10)); + public const int FILE_VOLUME_IS_COMPRESSED = unchecked((int)(0x8000)); + public const int IO_COMPLETION_MODIFY_STATE = unchecked((int)(0x2)); + public const int IO_COMPLETION_ALL_ACCESS = unchecked((int)((STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3))); + public const int DUPLICATE_CLOSE_SOURCE = unchecked((int)(0x1)); + public const int DUPLICATE_SAME_ACCESS = unchecked((int)(0x2)); // ////////////////////////////////////////////////////////////////////// // // @@ -917,23 +917,23 @@ public struct MEMORYSTATUS // AccessSystemAcl access type - public const int ACCESS_SYSTEM_SECURITY = unchecked( (int)( 0x1000000 ) ); + public const int ACCESS_SYSTEM_SECURITY = unchecked((int)(0x1000000)); // MaximumAllowed access type - public const int MAXIMUM_ALLOWED = unchecked( (int)( 0x2000000 ) ); + public const int MAXIMUM_ALLOWED = unchecked((int)(0x2000000)); // These are the generic rights. - public const int GENERIC_READ = unchecked( (int)( 0x80000000 ) ); - public const int GENERIC_WRITE = unchecked( (int)( 0x40000000 ) ); - public const int GENERIC_EXECUTE = unchecked( (int)( 0x20000000 ) ); - public const int GENERIC_ALL = unchecked( (int)( 0x10000000 ) ); + public const int GENERIC_READ = unchecked((int)(0x80000000)); + public const int GENERIC_WRITE = unchecked((int)(0x40000000)); + public const int GENERIC_EXECUTE = unchecked((int)(0x20000000)); + public const int GENERIC_ALL = unchecked((int)(0x10000000)); // Define the generic mapping array. This is used to denote the // mapping of each generic access right to a specific access mask. - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct GENERIC_MAPPING { public int GenericRead; @@ -949,7 +949,7 @@ public struct GENERIC_MAPPING // // // ////////////////////////////////////////////////////////////////////// // - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct LUID { public int LowPart; @@ -957,7 +957,7 @@ public struct LUID } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct LUID_AND_ATTRIBUTES { public LUID pLuid; @@ -986,15 +986,15 @@ public struct LUID_AND_ATTRIBUTES // begin_ntddk begin_ntifs // This is the *current* ACL revision - public const int ACL_REVISION = unchecked( (int)( ( 2 ) ) ); + public const int ACL_REVISION = unchecked((int)((2))); // This is the history of ACL revisions. Add a new one whenever // ACL_REVISION is updated - public const int ACL_REVISION1 = unchecked( (int)( ( 1 ) ) ); - public const int ACL_REVISION2 = unchecked( (int)( ( 2 ) ) ); + public const int ACL_REVISION1 = unchecked((int)((1))); + public const int ACL_REVISION2 = unchecked((int)((2))); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ACL { public byte AclRevision; @@ -1019,7 +1019,7 @@ public struct ACL // // AceFlags are the Ace flags for audit and inheritance, defined Integerly. - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ACE_HEADER { public byte AceType; @@ -1030,19 +1030,19 @@ public struct ACE_HEADER // The following are the predefined ace types that go into the AceType // field of an Ace header. - public const int ACCESS_ALLOWED_ACE_TYPE = unchecked( (int)( 0x0 ) ); - public const int ACCESS_DENIED_ACE_TYPE = unchecked( (int)( 0x1 ) ); - public const int SYSTEM_AUDIT_ACE_TYPE = unchecked( (int)( 0x2 ) ); - public const int SYSTEM_ALARM_ACE_TYPE = unchecked( (int)( 0x3 ) ); + public const int ACCESS_ALLOWED_ACE_TYPE = unchecked((int)(0x0)); + public const int ACCESS_DENIED_ACE_TYPE = unchecked((int)(0x1)); + public const int SYSTEM_AUDIT_ACE_TYPE = unchecked((int)(0x2)); + public const int SYSTEM_ALARM_ACE_TYPE = unchecked((int)(0x3)); // The following are the inherit flags that go into the AceFlags field // of an Ace header. - public const int OBJECT_INHERIT_ACE = unchecked( (int)( 0x1 ) ); - public const int CONTAINER_INHERIT_ACE = unchecked( (int)( 0x2 ) ); - public const int NO_PROPAGATE_INHERIT_ACE = unchecked( (int)( 0x4 ) ); - public const int INHERIT_ONLY_ACE = unchecked( (int)( 0x8 ) ); - public const int VALID_INHERIT_FLAGS = unchecked( (int)( 0xF ) ); + public const int OBJECT_INHERIT_ACE = unchecked((int)(0x1)); + public const int CONTAINER_INHERIT_ACE = unchecked((int)(0x2)); + public const int NO_PROPAGATE_INHERIT_ACE = unchecked((int)(0x4)); + public const int INHERIT_ONLY_ACE = unchecked((int)(0x8)); + public const int VALID_INHERIT_FLAGS = unchecked((int)(0xF)); // The following are the currently defined ACE flags that go into the @@ -1059,8 +1059,8 @@ public struct ACE_HEADER // // These control the signaling of audit and alarms for success or failure. - public const int SUCCESSFUL_ACCESS_ACE_FLAG = unchecked( (int)( 0x40 ) ); - public const int FAILED_ACCESS_ACE_FLAG = unchecked( (int)( 0x80 ) ); + public const int SUCCESSFUL_ACCESS_ACE_FLAG = unchecked((int)(0x40)); + public const int FAILED_ACCESS_ACE_FLAG = unchecked((int)(0x80)); // @@ -1077,7 +1077,7 @@ public struct ACE_HEADER // which structure is appropriate to use for casting. - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ACCESS_ALLOWED_ACE { public ACE_HEADER Header; @@ -1085,7 +1085,7 @@ public struct ACCESS_ALLOWED_ACE public int SidStart; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ACCESS_DENIED_ACE { public ACE_HEADER Header; @@ -1094,7 +1094,7 @@ public struct ACCESS_DENIED_ACE } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SYSTEM_AUDIT_ACE { public ACE_HEADER Header; @@ -1102,7 +1102,7 @@ public struct SYSTEM_AUDIT_ACE public int SidStart; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SYSTEM_ALARM_ACE { public ACE_HEADER Header; @@ -1115,14 +1115,14 @@ public struct SYSTEM_ALARM_ACE // the user. // - public const int ACLREVISIONINFORMATION = unchecked( (int)( 1 ) ); - public const int ACLSIZEINFORMATION = unchecked( (int)( 2 ) ); + public const int ACLREVISIONINFORMATION = unchecked((int)(1)); + public const int ACLSIZEINFORMATION = unchecked((int)(2)); // // This record is returned/sent if the user is requesting/setting the // AclRevisionInformation // - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ACL_REVISION_INFORMATION { public int AclRevision; @@ -1132,7 +1132,7 @@ public struct ACL_REVISION_INFORMATION // This record is returned if the user is requesting AclSizeInformation // - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ACL_SIZE_INFORMATION { public int AceCount; @@ -1155,8 +1155,8 @@ public struct ACL_SIZE_INFORMATION // Current security descriptor revision value // - public const int SECURITY_DESCRIPTOR_REVISION = unchecked( (int)( ( 1 ) ) ); - public const int SECURITY_DESCRIPTOR_REVISION1 = unchecked( (int)( ( 1 ) ) ); + public const int SECURITY_DESCRIPTOR_REVISION = unchecked((int)((1))); + public const int SECURITY_DESCRIPTOR_REVISION1 = unchecked((int)((1))); // end_ntddk @@ -1166,17 +1166,17 @@ public struct ACL_SIZE_INFORMATION // (sizeof(SECURITY_DESCRIPTOR) ) // - public const int SECURITY_DESCRIPTOR_MIN_LENGTH = unchecked( (int)( ( 20 ) ) ); + public const int SECURITY_DESCRIPTOR_MIN_LENGTH = unchecked((int)((20))); - public const int SE_OWNER_DEFAULTED = unchecked( (int)( 0x1 ) ); - public const int SE_GROUP_DEFAULTED = unchecked( (int)( 0x2 ) ); - public const int SE_DACL_PRESENT = unchecked( (int)( 0x4 ) ); - public const int SE_DACL_DEFAULTED = unchecked( (int)( 0x8 ) ); - public const int SE_SACL_PRESENT = unchecked( (int)( 0x10 ) ); - public const int SE_SACL_DEFAULTED = unchecked( (int)( 0x20 ) ); - public const int SE_SELF_RELATIVE = unchecked( (int)( 0x8000 ) ); + public const int SE_OWNER_DEFAULTED = unchecked((int)(0x1)); + public const int SE_GROUP_DEFAULTED = unchecked((int)(0x2)); + public const int SE_DACL_PRESENT = unchecked((int)(0x4)); + public const int SE_DACL_DEFAULTED = unchecked((int)(0x8)); + public const int SE_SACL_PRESENT = unchecked((int)(0x10)); + public const int SE_SACL_DEFAULTED = unchecked((int)(0x20)); + public const int SE_SELF_RELATIVE = unchecked((int)(0x8000)); // // Where: @@ -1235,7 +1235,7 @@ public struct ACL_SIZE_INFORMATION // // - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SECURITY_DESCRIPTOR { public byte Revision; @@ -1298,15 +1298,15 @@ public struct SECURITY_DESCRIPTOR // Privilege attributes // - public const int SE_PRIVILEGE_ENABLED_BY_DEFAULT = unchecked( (int)( 0x1 ) ); - public const int SE_PRIVILEGE_ENABLED = unchecked( (int)( 0x2 ) ); - public const int SE_PRIVILEGE_USED_FOR_ACCESS = unchecked( (int)( 0x80000000 ) ); + public const int SE_PRIVILEGE_ENABLED_BY_DEFAULT = unchecked((int)(0x1)); + public const int SE_PRIVILEGE_ENABLED = unchecked((int)(0x2)); + public const int SE_PRIVILEGE_USED_FOR_ACCESS = unchecked((int)(0x80000000)); // // Privilege Set Control flags // - public const int PRIVILEGE_SET_ALL_NECESSARY = unchecked( (int)( ( 1 ) ) ); + public const int PRIVILEGE_SET_ALL_NECESSARY = unchecked((int)((1))); // // Privilege Set - This is defined for a privilege set of one. @@ -1317,7 +1317,7 @@ public struct SECURITY_DESCRIPTOR // structure (defined in se.h) // - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PRIVILEGE_SET { public int PrivilegeCount; @@ -1332,30 +1332,30 @@ public struct PRIVILEGE_SET // // // ////////////////////////////////////////////////////////////////////// - public const string SE_CREATE_TOKEN_NAME = unchecked( (string)( "SECREATETOKENPRIVILEGE" ) ); - public const string SE_ASSIGNPRIMARYTOKEN_NAME = unchecked( (string)( "SEASSIGNPRIMARYTOKENPRIVILEGE" ) ); - public const string SE_LOCK_MEMORY_NAME = unchecked( (string)( "SELOCKMEMORYPRIVILEGE" ) ); - public const string SE_INCREASE_QUOTA_NAME = unchecked( (string)( "SEINCREASEQUOTAPRIVILEGE" ) ); - public const string SE_UNSOLICITED_INPUT_NAME = unchecked( (string)( "SEUNSOLICITEDINPUTPRIVILEGE" ) ); - public const string SE_MACHINE_ACCOUNT_NAME = unchecked( (string)( "SEMACHINEACCOUNTPRIVILEGE" ) ); - public const string SE_TCB_NAME = unchecked( (string)( "SETCBPRIVILEGE" ) ); - public const string SE_SECURITY_NAME = unchecked( (string)( "SESECURITYPRIVILEGE" ) ); - public const string SE_TAKE_OWNERSHIP_NAME = unchecked( (string)( "SETAKEOWNERSHIPPRIVILEGE" ) ); - public const string SE_LOAD_DRIVER_NAME = unchecked( (string)( "SELOADDRIVERPRIVILEGE" ) ); - public const string SE_SYSTEM_PROFILE_NAME = unchecked( (string)( "SESYSTEMPROFILEPRIVILEGE" ) ); - public const string SE_SYSTEMTIME_NAME = unchecked( (string)( "SESYSTEMTIMEPRIVILEGE" ) ); - public const string SE_PROF_SINGLE_PROCESS_NAME = unchecked( (string)( "SEPROFILESINGLEPROCESSPRIVILEGE" ) ); - public const string SE_INC_BASE_PRIORITY_NAME = unchecked( (string)( "SEINCREASEBASEPRIORITYPRIVILEGE" ) ); - public const string SE_CREATE_PAGEFILE_NAME = unchecked( (string)( "SECREATEPAGEFILEPRIVILEGE" ) ); - public const string SE_CREATE_PERMANENT_NAME = unchecked( (string)( "SECREATEPERMANENTPRIVILEGE" ) ); - public const string SE_BACKUP_NAME = unchecked( (string)( "SEBACKUPPRIVILEGE" ) ); - public const string SE_RESTORE_NAME = unchecked( (string)( "SERESTOREPRIVILEGE" ) ); - public const string SE_SHUTDOWN_NAME = unchecked( (string)( "SESHUTDOWNPRIVILEGE" ) ); - public const string SE_DEBUG_NAME = unchecked( (string)( "SEDEBUGPRIVILEGE" ) ); - public const string SE_AUDIT_NAME = unchecked( (string)( "SEAUDITPRIVILEGE" ) ); - public const string SE_SYSTEM_ENVIRONMENT_NAME = unchecked( (string)( "SESYSTEMENVIRONMENTPRIVILEGE" ) ); - public const string SE_CHANGE_NOTIFY_NAME = unchecked( (string)( "SECHANGENOTIFYPRIVILEGE" ) ); - public const string SE_REMOTE_SHUTDOWN_NAME = unchecked( (string)( "SEREMOTESHUTDOWNPRIVILEGE" ) ); + public const string SE_CREATE_TOKEN_NAME = unchecked((string)("SECREATETOKENPRIVILEGE")); + public const string SE_ASSIGNPRIMARYTOKEN_NAME = unchecked((string)("SEASSIGNPRIMARYTOKENPRIVILEGE")); + public const string SE_LOCK_MEMORY_NAME = unchecked((string)("SELOCKMEMORYPRIVILEGE")); + public const string SE_INCREASE_QUOTA_NAME = unchecked((string)("SEINCREASEQUOTAPRIVILEGE")); + public const string SE_UNSOLICITED_INPUT_NAME = unchecked((string)("SEUNSOLICITEDINPUTPRIVILEGE")); + public const string SE_MACHINE_ACCOUNT_NAME = unchecked((string)("SEMACHINEACCOUNTPRIVILEGE")); + public const string SE_TCB_NAME = unchecked((string)("SETCBPRIVILEGE")); + public const string SE_SECURITY_NAME = unchecked((string)("SESECURITYPRIVILEGE")); + public const string SE_TAKE_OWNERSHIP_NAME = unchecked((string)("SETAKEOWNERSHIPPRIVILEGE")); + public const string SE_LOAD_DRIVER_NAME = unchecked((string)("SELOADDRIVERPRIVILEGE")); + public const string SE_SYSTEM_PROFILE_NAME = unchecked((string)("SESYSTEMPROFILEPRIVILEGE")); + public const string SE_SYSTEMTIME_NAME = unchecked((string)("SESYSTEMTIMEPRIVILEGE")); + public const string SE_PROF_SINGLE_PROCESS_NAME = unchecked((string)("SEPROFILESINGLEPROCESSPRIVILEGE")); + public const string SE_INC_BASE_PRIORITY_NAME = unchecked((string)("SEINCREASEBASEPRIORITYPRIVILEGE")); + public const string SE_CREATE_PAGEFILE_NAME = unchecked((string)("SECREATEPAGEFILEPRIVILEGE")); + public const string SE_CREATE_PERMANENT_NAME = unchecked((string)("SECREATEPERMANENTPRIVILEGE")); + public const string SE_BACKUP_NAME = unchecked((string)("SEBACKUPPRIVILEGE")); + public const string SE_RESTORE_NAME = unchecked((string)("SERESTOREPRIVILEGE")); + public const string SE_SHUTDOWN_NAME = unchecked((string)("SESHUTDOWNPRIVILEGE")); + public const string SE_DEBUG_NAME = unchecked((string)("SEDEBUGPRIVILEGE")); + public const string SE_AUDIT_NAME = unchecked((string)("SEAUDITPRIVILEGE")); + public const string SE_SYSTEM_ENVIRONMENT_NAME = unchecked((string)("SESYSTEMENVIRONMENTPRIVILEGE")); + public const string SE_CHANGE_NOTIFY_NAME = unchecked((string)("SECHANGENOTIFYPRIVILEGE")); + public const string SE_REMOTE_SHUTDOWN_NAME = unchecked((string)("SEREMOTESHUTDOWNPRIVILEGE")); // ////////////////////////////////////////////////////////////////// @@ -1374,8 +1374,8 @@ public struct PRIVILEGE_SET // 0 to something else, fix the Windows CreateFile call. // - public const int SECURITYANONYMOUS = unchecked( (int)( 1 ) ); - public const int SECURITYIDENTIFICATION = unchecked( (int)( 2 ) ); + public const int SECURITYANONYMOUS = unchecked((int)(1)); + public const int SECURITYIDENTIFICATION = unchecked((int)(2)); //////////////////////////////////////////////////////////////////////// // // @@ -1384,67 +1384,67 @@ public struct PRIVILEGE_SET // ////////////////////////////////////////////////////////////////////// // Reg Data Types... - public const int REG_NONE = unchecked( (int)( 0 ) );// No value type - public const int REG_SZ = unchecked( (int)( 1 ) );// Unicode nul terminated string - public const int REG_EXPAND_SZ = unchecked( (int)( 2 ) );// Unicode nul terminated string - public const int REG_BINARY = unchecked( (int)( 3 ) );// Free form binary - public const int REG_DWORD = unchecked( (int)( 4 ) );// 32-bit number - public const int REG_DWORD_LITTLE_ENDIAN = unchecked( (int)( 4 ) );// 32-bit number (same as REG_DWORD) - public const int REG_DWORD_BIG_ENDIAN = unchecked( (int)( 5 ) );// 32-bit number - public const int REG_LINK = unchecked( (int)( 6 ) );// Symbolic Link (unicode) - public const int REG_MULTI_SZ = unchecked( (int)( 7 ) );// Multiple Unicode strings - public const int REG_RESOURCE_LIST = unchecked( (int)( 8 ) );// Resource list in the resource map - public const int REG_FULL_RESOURCE_DESCRIPTOR = unchecked( (int)( 9 ) );// Resource list in the hardware description - public const int REG_RESOURCE_REQUIREMENTS_LIST = unchecked( (int)( 10 ) ); - public const int REG_CREATED_NEW_KEY = unchecked( (int)( 0x1 ) );// New Registry Key created - public const int REG_OPENED_EXISTING_KEY = unchecked( (int)( 0x2 ) );// Existing Key opened - public const int REG_WHOLE_HIVE_VOLATILE = unchecked( (int)( 0x1 ) );// Restore whole hive volatile - public const int REG_REFRESH_HIVE = unchecked( (int)( 0x2 ) );// Unwind changes to last flush - public const int REG_NOTIFY_CHANGE_NAME = unchecked( (int)( 0x1 ) );// Create or delete (child) - public const int REG_NOTIFY_CHANGE_ATTRIBUTES = unchecked( (int)( 0x2 ) ); - public const int REG_NOTIFY_CHANGE_LAST_SET = unchecked( (int)( 0x4 ) );// Time stamp - public const int REG_NOTIFY_CHANGE_SECURITY = unchecked( (int)( 0x8 ) ); - public const int REG_LEGAL_CHANGE_FILTER = unchecked( (int)( ( REG_NOTIFY_CHANGE_NAME | REG_NOTIFY_CHANGE_ATTRIBUTES | REG_NOTIFY_CHANGE_LAST_SET | REG_NOTIFY_CHANGE_SECURITY ) ) ); - public const int REG_LEGAL_OPTION = unchecked( (int)( ( REG_OPTION_RESERVED | REG_OPTION_NON_VOLATILE | REG_OPTION_VOLATILE | REG_OPTION_CREATE_LINK | REG_OPTION_BACKUP_RESTORE ) ) ); + public const int REG_NONE = unchecked((int)(0));// No value type + public const int REG_SZ = unchecked((int)(1));// Unicode nul terminated string + public const int REG_EXPAND_SZ = unchecked((int)(2));// Unicode nul terminated string + public const int REG_BINARY = unchecked((int)(3));// Free form binary + public const int REG_DWORD = unchecked((int)(4));// 32-bit number + public const int REG_DWORD_LITTLE_ENDIAN = unchecked((int)(4));// 32-bit number (same as REG_DWORD) + public const int REG_DWORD_BIG_ENDIAN = unchecked((int)(5));// 32-bit number + public const int REG_LINK = unchecked((int)(6));// Symbolic Link (unicode) + public const int REG_MULTI_SZ = unchecked((int)(7));// Multiple Unicode strings + public const int REG_RESOURCE_LIST = unchecked((int)(8));// Resource list in the resource map + public const int REG_FULL_RESOURCE_DESCRIPTOR = unchecked((int)(9));// Resource list in the hardware description + public const int REG_RESOURCE_REQUIREMENTS_LIST = unchecked((int)(10)); + public const int REG_CREATED_NEW_KEY = unchecked((int)(0x1));// New Registry Key created + public const int REG_OPENED_EXISTING_KEY = unchecked((int)(0x2));// Existing Key opened + public const int REG_WHOLE_HIVE_VOLATILE = unchecked((int)(0x1));// Restore whole hive volatile + public const int REG_REFRESH_HIVE = unchecked((int)(0x2));// Unwind changes to last flush + public const int REG_NOTIFY_CHANGE_NAME = unchecked((int)(0x1));// Create or delete (child) + public const int REG_NOTIFY_CHANGE_ATTRIBUTES = unchecked((int)(0x2)); + public const int REG_NOTIFY_CHANGE_LAST_SET = unchecked((int)(0x4));// Time stamp + public const int REG_NOTIFY_CHANGE_SECURITY = unchecked((int)(0x8)); + public const int REG_LEGAL_CHANGE_FILTER = unchecked((int)((REG_NOTIFY_CHANGE_NAME | REG_NOTIFY_CHANGE_ATTRIBUTES | REG_NOTIFY_CHANGE_LAST_SET | REG_NOTIFY_CHANGE_SECURITY))); + public const int REG_LEGAL_OPTION = unchecked((int)((REG_OPTION_RESERVED | REG_OPTION_NON_VOLATILE | REG_OPTION_VOLATILE | REG_OPTION_CREATE_LINK | REG_OPTION_BACKUP_RESTORE))); // Reg Create Type Values... - public const int REG_OPTION_RESERVED = unchecked( (int)( 0 ) );// Parameter is reserved - public const int REG_OPTION_NON_VOLATILE = unchecked( (int)( 0 ) );// Key is preserved when system is rebooted - public const int REG_OPTION_VOLATILE = unchecked( (int)( 1 ) );// Key is not preserved when system is rebooted - public const int REG_OPTION_CREATE_LINK = unchecked( (int)( 2 ) );// Created key is a symbolic link - public const int REG_OPTION_BACKUP_RESTORE = unchecked( (int)( 4 ) );// open for backup or restore + public const int REG_OPTION_RESERVED = unchecked((int)(0));// Parameter is reserved + public const int REG_OPTION_NON_VOLATILE = unchecked((int)(0));// Key is preserved when system is rebooted + public const int REG_OPTION_VOLATILE = unchecked((int)(1));// Key is not preserved when system is rebooted + public const int REG_OPTION_CREATE_LINK = unchecked((int)(2));// Created key is a symbolic link + public const int REG_OPTION_BACKUP_RESTORE = unchecked((int)(4));// open for backup or restore // Reg Key Security Options // Const READ_CONTROL = &H20000 - public const int KEY_QUERY_VALUE = unchecked( (int)( 0x1 ) ); - public const int KEY_SET_VALUE = unchecked( (int)( 0x2 ) ); - public const int KEY_CREATE_SUB_KEY = unchecked( (int)( 0x4 ) ); - public const int KEY_ENUMERATE_SUB_KEYS = unchecked( (int)( 0x8 ) ); - public const int KEY_NOTIFY = unchecked( (int)( 0x10 ) ); - public const int KEY_CREATE_LINK = unchecked( (int)( 0x20 ) ); - public const int KEY_READ = unchecked( (int)( ( ( STANDARD_RIGHTS_READ | KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY ) & ( ~SYNCHRONIZE ) ) ) ); - public const int KEY_WRITE = unchecked( (int)( ( ( STANDARD_RIGHTS_WRITE | KEY_SET_VALUE | KEY_CREATE_SUB_KEY ) & ( ~SYNCHRONIZE ) ) ) ); - public const int KEY_ALL_ACCESS = unchecked( (int)( ( ( STANDARD_RIGHTS_ALL | KEY_QUERY_VALUE | KEY_SET_VALUE | KEY_CREATE_SUB_KEY | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY | KEY_CREATE_LINK ) & ( ~SYNCHRONIZE ) ) ) ); + public const int KEY_QUERY_VALUE = unchecked((int)(0x1)); + public const int KEY_SET_VALUE = unchecked((int)(0x2)); + public const int KEY_CREATE_SUB_KEY = unchecked((int)(0x4)); + public const int KEY_ENUMERATE_SUB_KEYS = unchecked((int)(0x8)); + public const int KEY_NOTIFY = unchecked((int)(0x10)); + public const int KEY_CREATE_LINK = unchecked((int)(0x20)); + public const int KEY_READ = unchecked((int)(((STANDARD_RIGHTS_READ | KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY) & (~SYNCHRONIZE)))); + public const int KEY_WRITE = unchecked((int)(((STANDARD_RIGHTS_WRITE | KEY_SET_VALUE | KEY_CREATE_SUB_KEY) & (~SYNCHRONIZE)))); + public const int KEY_ALL_ACCESS = unchecked((int)(((STANDARD_RIGHTS_ALL | KEY_QUERY_VALUE | KEY_SET_VALUE | KEY_CREATE_SUB_KEY | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY | KEY_CREATE_LINK) & (~SYNCHRONIZE)))); //Const STANDARD_RIGHTS_READ = (READ_CONTROL) //Const STANDARD_RIGHTS_WRITE = (READ_CONTROL) - public const int KEY_EXECUTE = unchecked( (int)( ( ( KEY_READ ) & ( ~SYNCHRONIZE ) ) ) ); + public const int KEY_EXECUTE = unchecked((int)(((KEY_READ) & (~SYNCHRONIZE)))); // end winnt.txt // Debug APIs - public const int EXCEPTION_DEBUG_EVENT = unchecked( (int)( 1 ) ); - public const int CREATE_THREAD_DEBUG_EVENT = unchecked( (int)( 2 ) ); - public const int CREATE_PROCESS_DEBUG_EVENT = unchecked( (int)( 3 ) ); - public const int EXIT_THREAD_DEBUG_EVENT = unchecked( (int)( 4 ) ); - public const int EXIT_PROCESS_DEBUG_EVENT = unchecked( (int)( 5 ) ); - public const int LOAD_DLL_DEBUG_EVENT = unchecked( (int)( 6 ) ); - public const int UNLOAD_DLL_DEBUG_EVENT = unchecked( (int)( 7 ) ); - public const int OUTPUT_DEBUG_STRING_EVENT = unchecked( (int)( 8 ) ); - public const int RIP_EVENT = unchecked( (int)( 9 ) ); - - public const int EXCEPTION_MAXIMUM_PARAMETERS = unchecked( (int)( 15 ) ); - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int EXCEPTION_DEBUG_EVENT = unchecked((int)(1)); + public const int CREATE_THREAD_DEBUG_EVENT = unchecked((int)(2)); + public const int CREATE_PROCESS_DEBUG_EVENT = unchecked((int)(3)); + public const int EXIT_THREAD_DEBUG_EVENT = unchecked((int)(4)); + public const int EXIT_PROCESS_DEBUG_EVENT = unchecked((int)(5)); + public const int LOAD_DLL_DEBUG_EVENT = unchecked((int)(6)); + public const int UNLOAD_DLL_DEBUG_EVENT = unchecked((int)(7)); + public const int OUTPUT_DEBUG_STRING_EVENT = unchecked((int)(8)); + public const int RIP_EVENT = unchecked((int)(9)); + + public const int EXCEPTION_MAXIMUM_PARAMETERS = unchecked((int)(15)); + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EXCEPTION_RECORD { public int ExceptionCode; @@ -1455,14 +1455,14 @@ public struct EXCEPTION_RECORD public int ExceptionInformation; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EXCEPTION_DEBUG_INFO { public EXCEPTION_RECORD pExceptionRecord; public int dwFirstChance; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CREATE_THREAD_DEBUG_INFO { public IntPtr hThread; @@ -1470,7 +1470,7 @@ public struct CREATE_THREAD_DEBUG_INFO public IntPtr lpStartAddress; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CREATE_PROCESS_DEBUG_INFO { public IntPtr hFile; @@ -1485,19 +1485,19 @@ public struct CREATE_PROCESS_DEBUG_INFO public int fUnicode; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EXIT_THREAD_DEBUG_INFO { public int dwExitCode; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EXIT_PROCESS_DEBUG_INFO { public int dwExitCode; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct LOAD_DLL_DEBUG_INFO { public IntPtr hFile; @@ -1508,13 +1508,13 @@ public struct LOAD_DLL_DEBUG_INFO public int fUnicode; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct UNLOAD_DLL_DEBUG_INFO { public IntPtr lpBaseOfDll; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct OUTPUT_DEBUG_STRING_INFO { public string lpDebugStringData; @@ -1522,7 +1522,7 @@ public struct OUTPUT_DEBUG_STRING_INFO public int nDebugStringLength; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct RIP_INFO { public int dwError; @@ -1530,193 +1530,193 @@ public struct RIP_INFO } // GetDriveType return values - public const int DRIVE_REMOVABLE = unchecked( (int)( 2 ) ); - public const int DRIVE_FIXED = unchecked( (int)( 3 ) ); - public const int DRIVE_REMOTE = unchecked( (int)( 4 ) ); - public const int DRIVE_CDROM = unchecked( (int)( 5 ) ); - public const int DRIVE_RAMDISK = unchecked( (int)( 6 ) ); - - public const int FILE_TYPE_UNKNOWN = unchecked( (int)( 0x0 ) ); - public const int FILE_TYPE_DISK = unchecked( (int)( 0x1 ) ); - public const int FILE_TYPE_CHAR = unchecked( (int)( 0x2 ) ); - public const int FILE_TYPE_PIPE = unchecked( (int)( 0x3 ) ); - public const int FILE_TYPE_REMOTE = unchecked( (int)( 0x8000 ) ); - - public const int STD_INPUT_HANDLE = unchecked( (int)( -10 ) ); - public const int STD_OUTPUT_HANDLE = unchecked( (int)( -11 ) ); - public const int STD_ERROR_HANDLE = unchecked( (int)( -12 ) ); - - public const int NOPARITY = unchecked( (int)( 0 ) ); - public const int ODDPARITY = unchecked( (int)( 1 ) ); - public const int EVENPARITY = unchecked( (int)( 2 ) ); - public const int MARKPARITY = unchecked( (int)( 3 ) ); - public const int SPACEPARITY = unchecked( (int)( 4 ) ); - - public const int ONESTOPBIT = unchecked( (int)( 0 ) ); - public const int ONE5STOPBITS = unchecked( (int)( 1 ) ); - public const int TWOSTOPBITS = unchecked( (int)( 2 ) ); - - public const int IGNORE = unchecked( (int)( 0 ) );// Ignore signal - public const int INFINITE = unchecked( (int)( 0xFFFF ) );// Infinite timeout + public const int DRIVE_REMOVABLE = unchecked((int)(2)); + public const int DRIVE_FIXED = unchecked((int)(3)); + public const int DRIVE_REMOTE = unchecked((int)(4)); + public const int DRIVE_CDROM = unchecked((int)(5)); + public const int DRIVE_RAMDISK = unchecked((int)(6)); + + public const int FILE_TYPE_UNKNOWN = unchecked((int)(0x0)); + public const int FILE_TYPE_DISK = unchecked((int)(0x1)); + public const int FILE_TYPE_CHAR = unchecked((int)(0x2)); + public const int FILE_TYPE_PIPE = unchecked((int)(0x3)); + public const int FILE_TYPE_REMOTE = unchecked((int)(0x8000)); + + public const int STD_INPUT_HANDLE = unchecked((int)(-10)); + public const int STD_OUTPUT_HANDLE = unchecked((int)(-11)); + public const int STD_ERROR_HANDLE = unchecked((int)(-12)); + + public const int NOPARITY = unchecked((int)(0)); + public const int ODDPARITY = unchecked((int)(1)); + public const int EVENPARITY = unchecked((int)(2)); + public const int MARKPARITY = unchecked((int)(3)); + public const int SPACEPARITY = unchecked((int)(4)); + + public const int ONESTOPBIT = unchecked((int)(0)); + public const int ONE5STOPBITS = unchecked((int)(1)); + public const int TWOSTOPBITS = unchecked((int)(2)); + + public const int IGNORE = unchecked((int)(0));// Ignore signal + public const int INFINITE = unchecked((int)(0xFFFF));// Infinite timeout // Comm Baud Rate indices - public const int CBR_110 = unchecked( (int)( 110 ) ); - public const int CBR_300 = unchecked( (int)( 300 ) ); - public const int CBR_600 = unchecked( (int)( 600 ) ); - public const int CBR_1200 = unchecked( (int)( 1200 ) ); - public const int CBR_2400 = unchecked( (int)( 2400 ) ); - public const int CBR_4800 = unchecked( (int)( 4800 ) ); - public const int CBR_9600 = unchecked( (int)( 9600 ) ); - public const int CBR_14400 = unchecked( (int)( 14400 ) ); - public const int CBR_19200 = unchecked( (int)( 19200 ) ); - public const int CBR_38400 = unchecked( (int)( 38400 ) ); - public const int CBR_56000 = unchecked( (int)( 56000 ) ); - public const int CBR_57600 = unchecked( (int)( 57600 ) ); - public const int CBR_115200 = unchecked( (int)( 115200 ) ); - public const int CBR_128000 = unchecked( (int)( 128000 ) ); - public const int CBR_256000 = unchecked( (int)( 256000 ) ); + public const int CBR_110 = unchecked((int)(110)); + public const int CBR_300 = unchecked((int)(300)); + public const int CBR_600 = unchecked((int)(600)); + public const int CBR_1200 = unchecked((int)(1200)); + public const int CBR_2400 = unchecked((int)(2400)); + public const int CBR_4800 = unchecked((int)(4800)); + public const int CBR_9600 = unchecked((int)(9600)); + public const int CBR_14400 = unchecked((int)(14400)); + public const int CBR_19200 = unchecked((int)(19200)); + public const int CBR_38400 = unchecked((int)(38400)); + public const int CBR_56000 = unchecked((int)(56000)); + public const int CBR_57600 = unchecked((int)(57600)); + public const int CBR_115200 = unchecked((int)(115200)); + public const int CBR_128000 = unchecked((int)(128000)); + public const int CBR_256000 = unchecked((int)(256000)); // Error Flags - public const int CE_RXOVER = unchecked( (int)( 0x1 ) );// Receive Queue overflow - public const int CE_OVERRUN = unchecked( (int)( 0x2 ) );// Receive Overrun Error - public const int CE_RXPARITY = unchecked( (int)( 0x4 ) );// Receive Parity Error - public const int CE_FRAME = unchecked( (int)( 0x8 ) );// Receive Framing error - public const int CE_BREAK = unchecked( (int)( 0x10 ) );// Break Detected - public const int CE_TXFULL = unchecked( (int)( 0x100 ) );// TX Queue is full - public const int CE_PTO = unchecked( (int)( 0x200 ) );// LPTx Timeout - public const int CE_IOE = unchecked( (int)( 0x400 ) );// LPTx I/O Error - public const int CE_DNS = unchecked( (int)( 0x800 ) );// LPTx Device not selected - public const int CE_OOP = unchecked( (int)( 0x1000 ) );// LPTx Out-Of-Paper - public const int CE_MODE = unchecked( (int)( 0x8000 ) );// Requested mode unsupported - - public const int IE_BADID = unchecked( (int)( ( -1 ) ) );// Invalid or unsupported id - public const int IE_OPEN = unchecked( (int)( ( -2 ) ) );// Device Already Open - public const int IE_NOPEN = unchecked( (int)( ( -3 ) ) );// Device Not Open - public const int IE_MEMORY = unchecked( (int)( ( -4 ) ) );// Unable to allocate queues - public const int IE_DEFAULT = unchecked( (int)( ( -5 ) ) );// Error in default parameters - public const int IE_HARDWARE = unchecked( (int)( ( -10 ) ) );// Hardware Not Present - public const int IE_BYTESIZE = unchecked( (int)( ( -11 ) ) );// Illegal Byte Size - public const int IE_BAUDRATE = unchecked( (int)( ( -12 ) ) );// Unsupported BaudRate + public const int CE_RXOVER = unchecked((int)(0x1));// Receive Queue overflow + public const int CE_OVERRUN = unchecked((int)(0x2));// Receive Overrun Error + public const int CE_RXPARITY = unchecked((int)(0x4));// Receive Parity Error + public const int CE_FRAME = unchecked((int)(0x8));// Receive Framing error + public const int CE_BREAK = unchecked((int)(0x10));// Break Detected + public const int CE_TXFULL = unchecked((int)(0x100));// TX Queue is full + public const int CE_PTO = unchecked((int)(0x200));// LPTx Timeout + public const int CE_IOE = unchecked((int)(0x400));// LPTx I/O Error + public const int CE_DNS = unchecked((int)(0x800));// LPTx Device not selected + public const int CE_OOP = unchecked((int)(0x1000));// LPTx Out-Of-Paper + public const int CE_MODE = unchecked((int)(0x8000));// Requested mode unsupported + + public const int IE_BADID = unchecked((int)((-1)));// Invalid or unsupported id + public const int IE_OPEN = unchecked((int)((-2)));// Device Already Open + public const int IE_NOPEN = unchecked((int)((-3)));// Device Not Open + public const int IE_MEMORY = unchecked((int)((-4)));// Unable to allocate queues + public const int IE_DEFAULT = unchecked((int)((-5)));// Error in default parameters + public const int IE_HARDWARE = unchecked((int)((-10)));// Hardware Not Present + public const int IE_BYTESIZE = unchecked((int)((-11)));// Illegal Byte Size + public const int IE_BAUDRATE = unchecked((int)((-12)));// Unsupported BaudRate // Events - public const int EV_RXCHAR = unchecked( (int)( 0x1 ) );// Any Character received - public const int EV_RXFLAG = unchecked( (int)( 0x2 ) );// Received certain character - public const int EV_TXEMPTY = unchecked( (int)( 0x4 ) );// Transmitt Queue Empty - public const int EV_CTS = unchecked( (int)( 0x8 ) );// CTS changed state - public const int EV_DSR = unchecked( (int)( 0x10 ) );// DSR changed state - public const int EV_RLSD = unchecked( (int)( 0x20 ) );// RLSD changed state - public const int EV_BREAK = unchecked( (int)( 0x40 ) );// BREAK received - public const int EV_ERR = unchecked( (int)( 0x80 ) );// Line status error occurred - public const int EV_RING = unchecked( (int)( 0x100 ) );// Ring signal detected - public const int EV_PERR = unchecked( (int)( 0x200 ) );// Printer error occured - public const int EV_RX80FULL = unchecked( (int)( 0x400 ) );// Receive buffer is 80 percent full - public const int EV_EVENT1 = unchecked( (int)( 0x800 ) );// Provider specific event 1 - public const int EV_EVENT2 = unchecked( (int)( 0x1000 ) );// Provider specific event 2 + public const int EV_RXCHAR = unchecked((int)(0x1));// Any Character received + public const int EV_RXFLAG = unchecked((int)(0x2));// Received certain character + public const int EV_TXEMPTY = unchecked((int)(0x4));// Transmitt Queue Empty + public const int EV_CTS = unchecked((int)(0x8));// CTS changed state + public const int EV_DSR = unchecked((int)(0x10));// DSR changed state + public const int EV_RLSD = unchecked((int)(0x20));// RLSD changed state + public const int EV_BREAK = unchecked((int)(0x40));// BREAK received + public const int EV_ERR = unchecked((int)(0x80));// Line status error occurred + public const int EV_RING = unchecked((int)(0x100));// Ring signal detected + public const int EV_PERR = unchecked((int)(0x200));// Printer error occured + public const int EV_RX80FULL = unchecked((int)(0x400));// Receive buffer is 80 percent full + public const int EV_EVENT1 = unchecked((int)(0x800));// Provider specific event 1 + public const int EV_EVENT2 = unchecked((int)(0x1000));// Provider specific event 2 // Escape Functions - public const int SETXOFF = unchecked( (int)( 1 ) );// Simulate XOFF received - public const int SETXON = unchecked( (int)( 2 ) );// Simulate XON received - public const int SETRTS = unchecked( (int)( 3 ) );// Set RTS high - public const int CLRRTS = unchecked( (int)( 4 ) );// Set RTS low - public const int SETDTR = unchecked( (int)( 5 ) );// Set DTR high - public const int CLRDTR = unchecked( (int)( 6 ) );// Set DTR low - public const int RESETDEV = unchecked( (int)( 7 ) );// Reset device if possible - public const int SETBREAK = unchecked( (int)( 8 ) );//Set the device break line - public const int CLRBREAK = unchecked( (int)( 9 ) );// Clear the device break line + public const int SETXOFF = unchecked((int)(1));// Simulate XOFF received + public const int SETXON = unchecked((int)(2));// Simulate XON received + public const int SETRTS = unchecked((int)(3));// Set RTS high + public const int CLRRTS = unchecked((int)(4));// Set RTS low + public const int SETDTR = unchecked((int)(5));// Set DTR high + public const int CLRDTR = unchecked((int)(6));// Set DTR low + public const int RESETDEV = unchecked((int)(7));// Reset device if possible + public const int SETBREAK = unchecked((int)(8));//Set the device break line + public const int CLRBREAK = unchecked((int)(9));// Clear the device break line // PURGE function flags. - public const int PURGE_TXABORT = unchecked( (int)( 0x1 ) );// Kill the pending/current writes to the comm port. - public const int PURGE_RXABORT = unchecked( (int)( 0x2 ) );// Kill the pending/current reads to the comm port. - public const int PURGE_TXCLEAR = unchecked( (int)( 0x4 ) );// Kill the transmit queue if there. - public const int PURGE_RXCLEAR = unchecked( (int)( 0x8 ) );// Kill the typeahead buffer if there. + public const int PURGE_TXABORT = unchecked((int)(0x1));// Kill the pending/current writes to the comm port. + public const int PURGE_RXABORT = unchecked((int)(0x2));// Kill the pending/current reads to the comm port. + public const int PURGE_TXCLEAR = unchecked((int)(0x4));// Kill the transmit queue if there. + public const int PURGE_RXCLEAR = unchecked((int)(0x8));// Kill the typeahead buffer if there. - public const int LPTX = unchecked( (int)( 0x80 ) );// Set if ID is for LPT device + public const int LPTX = unchecked((int)(0x80));// Set if ID is for LPT device // Modem Status Flags - public const int MS_CTS_ON = unchecked( (int)( 0x10 ) ); - public const int MS_DSR_ON = unchecked( (int)( 0x20 ) ); - public const int MS_RING_ON = unchecked( (int)( 0x40 ) ); - public const int MS_RLSD_ON = unchecked( (int)( 0x80 ) ); + public const int MS_CTS_ON = unchecked((int)(0x10)); + public const int MS_DSR_ON = unchecked((int)(0x20)); + public const int MS_RING_ON = unchecked((int)(0x40)); + public const int MS_RLSD_ON = unchecked((int)(0x80)); // WaitSoundState() Constants - public const int S_QUEUEEMPTY = unchecked( (int)( 0 ) ); - public const int S_THRESHOLD = unchecked( (int)( 1 ) ); - public const int S_ALLTHRESHOLD = unchecked( (int)( 2 ) ); + public const int S_QUEUEEMPTY = unchecked((int)(0)); + public const int S_THRESHOLD = unchecked((int)(1)); + public const int S_ALLTHRESHOLD = unchecked((int)(2)); // Accent Modes - public const int S_NORMAL = unchecked( (int)( 0 ) ); - public const int S_LEGATO = unchecked( (int)( 1 ) ); - public const int S_STACCATO = unchecked( (int)( 2 ) ); + public const int S_NORMAL = unchecked((int)(0)); + public const int S_LEGATO = unchecked((int)(1)); + public const int S_STACCATO = unchecked((int)(2)); // SetSoundNoise() Sources - public const int S_PERIOD512 = unchecked( (int)( 0 ) );// Freq = N/512 high pitch, less coarse hiss - public const int S_PERIOD1024 = unchecked( (int)( 1 ) );// Freq = N/1024 - public const int S_PERIOD2048 = unchecked( (int)( 2 ) );// Freq = N/2048 low pitch, more coarse hiss - public const int S_PERIODVOICE = unchecked( (int)( 3 ) );// Source is frequency from voice channel (3) - public const int S_WHITE512 = unchecked( (int)( 4 ) );// Freq = N/512 high pitch, less coarse hiss - public const int S_WHITE1024 = unchecked( (int)( 5 ) );// Freq = N/1024 - public const int S_WHITE2048 = unchecked( (int)( 6 ) );// Freq = N/2048 low pitch, more coarse hiss - public const int S_WHITEVOICE = unchecked( (int)( 7 ) );// Source is frequency from voice channel (3) - - public const int S_SERDVNA = unchecked( (int)( ( -1 ) ) );// Device not available - public const int S_SEROFM = unchecked( (int)( ( -2 ) ) );// Out of memory - public const int S_SERMACT = unchecked( (int)( ( -3 ) ) );// Music active - public const int S_SERQFUL = unchecked( (int)( ( -4 ) ) );// Queue full - public const int S_SERBDNT = unchecked( (int)( ( -5 ) ) );// Invalid note - public const int S_SERDLN = unchecked( (int)( ( -6 ) ) );// Invalid note length - public const int S_SERDCC = unchecked( (int)( ( -7 ) ) );// Invalid note count - public const int S_SERDTP = unchecked( (int)( ( -8 ) ) );// Invalid tempo - public const int S_SERDVL = unchecked( (int)( ( -9 ) ) );// Invalid volume - public const int S_SERDMD = unchecked( (int)( ( -10 ) ) );// Invalid mode - public const int S_SERDSH = unchecked( (int)( ( -11 ) ) );// Invalid shape - public const int S_SERDPT = unchecked( (int)( ( -12 ) ) );// Invalid pitch - public const int S_SERDFQ = unchecked( (int)( ( -13 ) ) );// Invalid frequency - public const int S_SERDDR = unchecked( (int)( ( -14 ) ) );// Invalid duration - public const int S_SERDSR = unchecked( (int)( ( -15 ) ) );// Invalid source - public const int S_SERDST = unchecked( (int)( ( -16 ) ) );// Invalid state - - public const int NMPWAIT_WAIT_FOREVER = unchecked( (int)( 0xFFFF ) ); - public const int NMPWAIT_NOWAIT = unchecked( (int)( 0x1 ) ); - public const int NMPWAIT_USE_DEFAULT_WAIT = unchecked( (int)( 0x0 ) ); - public const int FS_CASE_IS_PRESERVED = unchecked( (int)( FILE_CASE_PRESERVED_NAMES ) ); - public const int FS_CASE_SENSITIVE = unchecked( (int)( FILE_CASE_SENSITIVE_SEARCH ) ); - public const int FS_UNICODE_STORED_ON_DISK = unchecked( (int)( FILE_UNICODE_ON_DISK ) ); - public const int FS_PERSISTENT_ACLS = unchecked( (int)( FILE_PERSISTENT_ACLS ) ); - - public const int SECTION_QUERY = unchecked( (int)( 0x1 ) ); - public const int SECTION_MAP_WRITE = unchecked( (int)( 0x2 ) ); - public const int SECTION_MAP_READ = unchecked( (int)( 0x4 ) ); - public const int SECTION_MAP_EXECUTE = unchecked( (int)( 0x8 ) ); - public const int SECTION_EXTEND_SIZE = unchecked( (int)( 0x10 ) ); - public const int SECTION_ALL_ACCESS = unchecked( (int)( STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_WRITE | SECTION_MAP_READ | SECTION_MAP_EXECUTE | SECTION_EXTEND_SIZE ) ); - - public const int FILE_MAP_COPY = unchecked( (int)( SECTION_QUERY ) ); - public const int FILE_MAP_WRITE = unchecked( (int)( SECTION_MAP_WRITE ) ); - public const int FILE_MAP_READ = unchecked( (int)( SECTION_MAP_READ ) ); - public const int FILE_MAP_ALL_ACCESS = unchecked( (int)( SECTION_ALL_ACCESS ) ); + public const int S_PERIOD512 = unchecked((int)(0));// Freq = N/512 high pitch, less coarse hiss + public const int S_PERIOD1024 = unchecked((int)(1));// Freq = N/1024 + public const int S_PERIOD2048 = unchecked((int)(2));// Freq = N/2048 low pitch, more coarse hiss + public const int S_PERIODVOICE = unchecked((int)(3));// Source is frequency from voice channel (3) + public const int S_WHITE512 = unchecked((int)(4));// Freq = N/512 high pitch, less coarse hiss + public const int S_WHITE1024 = unchecked((int)(5));// Freq = N/1024 + public const int S_WHITE2048 = unchecked((int)(6));// Freq = N/2048 low pitch, more coarse hiss + public const int S_WHITEVOICE = unchecked((int)(7));// Source is frequency from voice channel (3) + + public const int S_SERDVNA = unchecked((int)((-1)));// Device not available + public const int S_SEROFM = unchecked((int)((-2)));// Out of memory + public const int S_SERMACT = unchecked((int)((-3)));// Music active + public const int S_SERQFUL = unchecked((int)((-4)));// Queue full + public const int S_SERBDNT = unchecked((int)((-5)));// Invalid note + public const int S_SERDLN = unchecked((int)((-6)));// Invalid note length + public const int S_SERDCC = unchecked((int)((-7)));// Invalid note count + public const int S_SERDTP = unchecked((int)((-8)));// Invalid tempo + public const int S_SERDVL = unchecked((int)((-9)));// Invalid volume + public const int S_SERDMD = unchecked((int)((-10)));// Invalid mode + public const int S_SERDSH = unchecked((int)((-11)));// Invalid shape + public const int S_SERDPT = unchecked((int)((-12)));// Invalid pitch + public const int S_SERDFQ = unchecked((int)((-13)));// Invalid frequency + public const int S_SERDDR = unchecked((int)((-14)));// Invalid duration + public const int S_SERDSR = unchecked((int)((-15)));// Invalid source + public const int S_SERDST = unchecked((int)((-16)));// Invalid state + + public const int NMPWAIT_WAIT_FOREVER = unchecked((int)(0xFFFF)); + public const int NMPWAIT_NOWAIT = unchecked((int)(0x1)); + public const int NMPWAIT_USE_DEFAULT_WAIT = unchecked((int)(0x0)); + public const int FS_CASE_IS_PRESERVED = unchecked((int)(FILE_CASE_PRESERVED_NAMES)); + public const int FS_CASE_SENSITIVE = unchecked((int)(FILE_CASE_SENSITIVE_SEARCH)); + public const int FS_UNICODE_STORED_ON_DISK = unchecked((int)(FILE_UNICODE_ON_DISK)); + public const int FS_PERSISTENT_ACLS = unchecked((int)(FILE_PERSISTENT_ACLS)); + + public const int SECTION_QUERY = unchecked((int)(0x1)); + public const int SECTION_MAP_WRITE = unchecked((int)(0x2)); + public const int SECTION_MAP_READ = unchecked((int)(0x4)); + public const int SECTION_MAP_EXECUTE = unchecked((int)(0x8)); + public const int SECTION_EXTEND_SIZE = unchecked((int)(0x10)); + public const int SECTION_ALL_ACCESS = unchecked((int)(STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_WRITE | SECTION_MAP_READ | SECTION_MAP_EXECUTE | SECTION_EXTEND_SIZE)); + + public const int FILE_MAP_COPY = unchecked((int)(SECTION_QUERY)); + public const int FILE_MAP_WRITE = unchecked((int)(SECTION_MAP_WRITE)); + public const int FILE_MAP_READ = unchecked((int)(SECTION_MAP_READ)); + public const int FILE_MAP_ALL_ACCESS = unchecked((int)(SECTION_ALL_ACCESS)); // OpenFile() Flags - public const int OF_READ = unchecked( (int)( 0x0 ) ); - public const int OF_WRITE = unchecked( (int)( 0x1 ) ); - public const int OF_READWRITE = unchecked( (int)( 0x2 ) ); - public const int OF_SHARE_COMPAT = unchecked( (int)( 0x0 ) ); - public const int OF_SHARE_EXCLUSIVE = unchecked( (int)( 0x10 ) ); - public const int OF_SHARE_DENY_WRITE = unchecked( (int)( 0x20 ) ); - public const int OF_SHARE_DENY_READ = unchecked( (int)( 0x30 ) ); - public const int OF_SHARE_DENY_NONE = unchecked( (int)( 0x40 ) ); - public const int OF_PARSE = unchecked( (int)( 0x100 ) ); - public const int OF_DELETE = unchecked( (int)( 0x200 ) ); - public const int OF_VERIFY = unchecked( (int)( 0x400 ) ); - public const int OF_CANCEL = unchecked( (int)( 0x800 ) ); - public const int OF_CREATE = unchecked( (int)( 0x1000 ) ); - public const int OF_PROMPT = unchecked( (int)( 0x2000 ) ); - public const int OF_EXIST = unchecked( (int)( 0x4000 ) ); - public const int OF_REOPEN = unchecked( (int)( 0x8000 ) ); - - public const int OFS_MAXPATHNAME = unchecked( (int)( 128 ) ); + public const int OF_READ = unchecked((int)(0x0)); + public const int OF_WRITE = unchecked((int)(0x1)); + public const int OF_READWRITE = unchecked((int)(0x2)); + public const int OF_SHARE_COMPAT = unchecked((int)(0x0)); + public const int OF_SHARE_EXCLUSIVE = unchecked((int)(0x10)); + public const int OF_SHARE_DENY_WRITE = unchecked((int)(0x20)); + public const int OF_SHARE_DENY_READ = unchecked((int)(0x30)); + public const int OF_SHARE_DENY_NONE = unchecked((int)(0x40)); + public const int OF_PARSE = unchecked((int)(0x100)); + public const int OF_DELETE = unchecked((int)(0x200)); + public const int OF_VERIFY = unchecked((int)(0x400)); + public const int OF_CANCEL = unchecked((int)(0x800)); + public const int OF_CREATE = unchecked((int)(0x1000)); + public const int OF_PROMPT = unchecked((int)(0x2000)); + public const int OF_EXIST = unchecked((int)(0x4000)); + public const int OF_REOPEN = unchecked((int)(0x8000)); + + public const int OFS_MAXPATHNAME = unchecked((int)(128)); // OpenFile() Structure - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct OFSTRUCT { public byte cBytes; @@ -1728,220 +1728,220 @@ public struct OFSTRUCT } - [DllImport( "kernel32", EntryPoint = "RtlMoveMemory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void CopyMemory( object Destination, object Source, int Length ); + [DllImport("kernel32", EntryPoint = "RtlMoveMemory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void CopyMemory(object Destination, object Source, int Length); - public const int PROCESSOR_INTEL_386 = unchecked( (int)( 386 ) ); - public const int PROCESSOR_INTEL_486 = unchecked( (int)( 486 ) ); - public const int PROCESSOR_INTEL_PENTIUM = unchecked( (int)( 586 ) ); - public const int PROCESSOR_MIPS_R4000 = unchecked( (int)( 4000 ) ); - public const int PROCESSOR_ALPHA_21064 = unchecked( (int)( 21064 ) ); - public const int PROCESSOR_ARCHITECTURE_INTEL = unchecked( (int)( 0 ) ); - public const int PROCESSOR_ARCHITECTURE_MIPS = unchecked( (int)( 1 ) ); - public const int PROCESSOR_ARCHITECTURE_ALPHA = unchecked( (int)( 2 ) ); - public const int PROCESSOR_ARCHITECTURE_PPC = unchecked( (int)( 3 ) ); - public const int PROCESSOR_ARCHITECTURE_UNKNOWN = unchecked( (int)( 0xFFFF ) ); + public const int PROCESSOR_INTEL_386 = unchecked((int)(386)); + public const int PROCESSOR_INTEL_486 = unchecked((int)(486)); + public const int PROCESSOR_INTEL_PENTIUM = unchecked((int)(586)); + public const int PROCESSOR_MIPS_R4000 = unchecked((int)(4000)); + public const int PROCESSOR_ALPHA_21064 = unchecked((int)(21064)); + public const int PROCESSOR_ARCHITECTURE_INTEL = unchecked((int)(0)); + public const int PROCESSOR_ARCHITECTURE_MIPS = unchecked((int)(1)); + public const int PROCESSOR_ARCHITECTURE_ALPHA = unchecked((int)(2)); + public const int PROCESSOR_ARCHITECTURE_PPC = unchecked((int)(3)); + public const int PROCESSOR_ARCHITECTURE_UNKNOWN = unchecked((int)(0xFFFF)); - [DllImport( "kernel32", EntryPoint = "GetTickCount", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetTickCount", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetCurrentTime(); // Flags for DrawFrameControl - public const int DFC_CAPTION = unchecked( (int)( 1 ) ); - public const int DFC_MENU = unchecked( (int)( 2 ) ); - public const int DFC_SCROLL = unchecked( (int)( 3 ) ); - public const int DFC_BUTTON = unchecked( (int)( 4 ) ); - public const int DFCS_CAPTIONCLOSE = unchecked( (int)( 0x0 ) ); - public const int DFCS_CAPTIONMIN = unchecked( (int)( 0x1 ) ); - public const int DFCS_CAPTIONMAX = unchecked( (int)( 0x2 ) ); - public const int DFCS_CAPTIONRESTORE = unchecked( (int)( 0x3 ) ); - public const int DFCS_CAPTIONHELP = unchecked( (int)( 0x4 ) ); - public const int DFCS_MENUARROW = unchecked( (int)( 0x0 ) ); - public const int DFCS_MENUCHECK = unchecked( (int)( 0x1 ) ); - public const int DFCS_MENUBULLET = unchecked( (int)( 0x2 ) ); - public const int DFCS_MENUARROWRIGHT = unchecked( (int)( 0x4 ) ); - public const int DFCS_SCROLLUP = unchecked( (int)( 0x0 ) ); - public const int DFCS_SCROLLDOWN = unchecked( (int)( 0x1 ) ); - public const int DFCS_SCROLLLEFT = unchecked( (int)( 0x2 ) ); - public const int DFCS_SCROLLRIGHT = unchecked( (int)( 0x3 ) ); - public const int DFCS_SCROLLCOMBOBOX = unchecked( (int)( 0x5 ) ); - public const int DFCS_SCROLLSIZEGRIP = unchecked( (int)( 0x8 ) ); - public const int DFCS_SCROLLSIZEGRIPRIGHT = unchecked( (int)( 0x10 ) ); - public const int DFCS_BUTTONCHECK = unchecked( (int)( 0x0 ) ); - public const int DFCS_BUTTONRADIOIMAGE = unchecked( (int)( 0x1 ) ); - public const int DFCS_BUTTONRADIOMASK = unchecked( (int)( 0x2 ) ); - public const int DFCS_BUTTONRADIO = unchecked( (int)( 0x4 ) ); - public const int DFCS_BUTTON3STATE = unchecked( (int)( 0x8 ) ); - public const int DFCS_BUTTONPUSH = unchecked( (int)( 0x10 ) ); - public const int DFCS_INACTIVE = unchecked( (int)( 0x100 ) ); - public const int DFCS_PUSHED = unchecked( (int)( 0x200 ) ); - public const int DFCS_CHECKED = unchecked( (int)( 0x400 ) ); - public const int DFCS_ADJUSTRECT = unchecked( (int)( 0x2000 ) ); - public const int DFCS_FLAT = unchecked( (int)( 0x4000 ) ); - public const int DFCS_MONO = unchecked( (int)( 0x8000 ) ); - - - [DllImport( "kernel32", EntryPoint = "InterlockedIncrement", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int InterlockedIncrement( IntPtr lpAddend ); - - [DllImport( "kernel32", EntryPoint = "InterlockedDecrement", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int InterlockedDecrement( IntPtr lpAddend ); - - [DllImport( "kernel32", EntryPoint = "InterlockedExchange", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int InterlockedExchange( int Target, int Value ); + public const int DFC_CAPTION = unchecked((int)(1)); + public const int DFC_MENU = unchecked((int)(2)); + public const int DFC_SCROLL = unchecked((int)(3)); + public const int DFC_BUTTON = unchecked((int)(4)); + public const int DFCS_CAPTIONCLOSE = unchecked((int)(0x0)); + public const int DFCS_CAPTIONMIN = unchecked((int)(0x1)); + public const int DFCS_CAPTIONMAX = unchecked((int)(0x2)); + public const int DFCS_CAPTIONRESTORE = unchecked((int)(0x3)); + public const int DFCS_CAPTIONHELP = unchecked((int)(0x4)); + public const int DFCS_MENUARROW = unchecked((int)(0x0)); + public const int DFCS_MENUCHECK = unchecked((int)(0x1)); + public const int DFCS_MENUBULLET = unchecked((int)(0x2)); + public const int DFCS_MENUARROWRIGHT = unchecked((int)(0x4)); + public const int DFCS_SCROLLUP = unchecked((int)(0x0)); + public const int DFCS_SCROLLDOWN = unchecked((int)(0x1)); + public const int DFCS_SCROLLLEFT = unchecked((int)(0x2)); + public const int DFCS_SCROLLRIGHT = unchecked((int)(0x3)); + public const int DFCS_SCROLLCOMBOBOX = unchecked((int)(0x5)); + public const int DFCS_SCROLLSIZEGRIP = unchecked((int)(0x8)); + public const int DFCS_SCROLLSIZEGRIPRIGHT = unchecked((int)(0x10)); + public const int DFCS_BUTTONCHECK = unchecked((int)(0x0)); + public const int DFCS_BUTTONRADIOIMAGE = unchecked((int)(0x1)); + public const int DFCS_BUTTONRADIOMASK = unchecked((int)(0x2)); + public const int DFCS_BUTTONRADIO = unchecked((int)(0x4)); + public const int DFCS_BUTTON3STATE = unchecked((int)(0x8)); + public const int DFCS_BUTTONPUSH = unchecked((int)(0x10)); + public const int DFCS_INACTIVE = unchecked((int)(0x100)); + public const int DFCS_PUSHED = unchecked((int)(0x200)); + public const int DFCS_CHECKED = unchecked((int)(0x400)); + public const int DFCS_ADJUSTRECT = unchecked((int)(0x2000)); + public const int DFCS_FLAT = unchecked((int)(0x4000)); + public const int DFCS_MONO = unchecked((int)(0x8000)); + + + [DllImport("kernel32", EntryPoint = "InterlockedIncrement", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int InterlockedIncrement(IntPtr lpAddend); + + [DllImport("kernel32", EntryPoint = "InterlockedDecrement", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int InterlockedDecrement(IntPtr lpAddend); + + [DllImport("kernel32", EntryPoint = "InterlockedExchange", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int InterlockedExchange(int Target, int Value); // Loader Routines - [DllImport( "kernel32", EntryPoint = "GetModuleFileName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetModuleFileName( IntPtr hModule, string lpFileName, int nSize ); + [DllImport("kernel32", EntryPoint = "GetModuleFileName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetModuleFileName(IntPtr hModule, string lpFileName, int nSize); - [DllImport( "kernel32", EntryPoint = "GetModuleHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetModuleHandle( string lpModuleName ); + [DllImport("kernel32", EntryPoint = "GetModuleHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetModuleHandle(string lpModuleName); - [DllImport( "kernel32", EntryPoint = "CreateProcess", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateProcess( string lpApplicationName, string lpCommandLine, ref SECURITY_ATTRIBUTES lpProcessAttributes, ref SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, int dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDriectory, ref STARTUPINFO lpStartupInfo, ref PROCESS_INFORMATION lpProcessInformation ); + [DllImport("kernel32", EntryPoint = "CreateProcess", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateProcess(string lpApplicationName, string lpCommandLine, ref SECURITY_ATTRIBUTES lpProcessAttributes, ref SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, int dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDriectory, ref STARTUPINFO lpStartupInfo, ref PROCESS_INFORMATION lpProcessInformation); - [DllImport( "kernel32", EntryPoint = "SetProcessShutdownParameters", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetProcessShutdownParameters( int dwLevel, int dwFlags ); + [DllImport("kernel32", EntryPoint = "SetProcessShutdownParameters", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetProcessShutdownParameters(int dwLevel, int dwFlags); - [DllImport( "kernel32", EntryPoint = "GetProcessShutdownParameters", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetProcessShutdownParameters( IntPtr lpdwLevel, IntPtr lpdwFlags ); + [DllImport("kernel32", EntryPoint = "GetProcessShutdownParameters", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetProcessShutdownParameters(IntPtr lpdwLevel, IntPtr lpdwFlags); - [DllImport( "kernel32", EntryPoint = "FatalAppExit", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void FatalAppExit( int uAction, string lpMessageText ); + [DllImport("kernel32", EntryPoint = "FatalAppExit", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void FatalAppExit(int uAction, string lpMessageText); - [DllImport( "kernel32", EntryPoint = "GetStartupInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void GetStartupInfo( ref STARTUPINFO lpStartupInfo ); + [DllImport("kernel32", EntryPoint = "GetStartupInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void GetStartupInfo(ref STARTUPINFO lpStartupInfo); - [DllImport( "kernel32", EntryPoint = "GetCommandLine", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetCommandLine", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern string GetCommandLine(); - [DllImport( "kernel32", EntryPoint = "GetEnvironmentVariable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetEnvironmentVariable( string lpName, string lpBuffer, int nSize ); + [DllImport("kernel32", EntryPoint = "GetEnvironmentVariable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetEnvironmentVariable(string lpName, string lpBuffer, int nSize); - [DllImport( "kernel32", EntryPoint = "SetEnvironmentVariable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetEnvironmentVariable( string lpName, string lpValue ); + [DllImport("kernel32", EntryPoint = "SetEnvironmentVariable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetEnvironmentVariable(string lpName, string lpValue); - [DllImport( "kernel32", EntryPoint = "ExpandEnvironmentStrings", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ExpandEnvironmentStrings( string lpSrc, string lpDst, int nSize ); + [DllImport("kernel32", EntryPoint = "ExpandEnvironmentStrings", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ExpandEnvironmentStrings(string lpSrc, string lpDst, int nSize); - [DllImport( "kernel32", EntryPoint = "LoadLibrary", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LoadLibrary( string lpLibFileName ); + [DllImport("kernel32", EntryPoint = "LoadLibrary", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LoadLibrary(string lpLibFileName); - [DllImport( "kernel32", EntryPoint = "LoadLibraryEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LoadLibraryEx( string lpLibFileName, IntPtr hFile, int dwFlags ); + [DllImport("kernel32", EntryPoint = "LoadLibraryEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LoadLibraryEx(string lpLibFileName, IntPtr hFile, int dwFlags); - public const int DONT_RESOLVE_DLL_REFERENCES = unchecked( (int)( 0x1 ) ); + public const int DONT_RESOLVE_DLL_REFERENCES = unchecked((int)(0x1)); - [DllImport( "kernel32", EntryPoint = "LoadModule", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LoadModule( string lpModuleName, IntPtr lpParameterBlock ); + [DllImport("kernel32", EntryPoint = "LoadModule", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LoadModule(string lpModuleName, IntPtr lpParameterBlock); - [DllImport( "kernel32", EntryPoint = "FreeLibrary", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FreeLibrary( IntPtr hLibModule ); + [DllImport("kernel32", EntryPoint = "FreeLibrary", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FreeLibrary(IntPtr hLibModule); - [DllImport( "kernel32", EntryPoint = "WinExec", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WinExec( string lpCmdLine, int nCmdShow ); + [DllImport("kernel32", EntryPoint = "WinExec", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WinExec(string lpCmdLine, int nCmdShow); - [DllImport( "kernel32", EntryPoint = "DebugBreak", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "DebugBreak", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern void DebugBreak(); - [DllImport( "kernel32", EntryPoint = "ContinueDebugEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ContinueDebugEvent( int dwProcessId, int dwThreadId, int dwContinueStatus ); + [DllImport("kernel32", EntryPoint = "ContinueDebugEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ContinueDebugEvent(int dwProcessId, int dwThreadId, int dwContinueStatus); - [DllImport( "kernel32", EntryPoint = "DebugActiveProcess", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DebugActiveProcess( int dwProcessId ); + [DllImport("kernel32", EntryPoint = "DebugActiveProcess", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DebugActiveProcess(int dwProcessId); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CRITICAL_SECTION { public int dummy; } - [DllImport( "kernel32", EntryPoint = "InitializeCriticalSection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void InitializeCriticalSection( ref CRITICAL_SECTION lpCriticalSection ); + [DllImport("kernel32", EntryPoint = "InitializeCriticalSection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void InitializeCriticalSection(ref CRITICAL_SECTION lpCriticalSection); - [DllImport( "kernel32", EntryPoint = "EnterCriticalSection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void EnterCriticalSection( ref CRITICAL_SECTION lpCriticalSection ); + [DllImport("kernel32", EntryPoint = "EnterCriticalSection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void EnterCriticalSection(ref CRITICAL_SECTION lpCriticalSection); - [DllImport( "kernel32", EntryPoint = "LeaveCriticalSection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void LeaveCriticalSection( ref CRITICAL_SECTION lpCriticalSection ); + [DllImport("kernel32", EntryPoint = "LeaveCriticalSection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void LeaveCriticalSection(ref CRITICAL_SECTION lpCriticalSection); - [DllImport( "kernel32", EntryPoint = "DeleteCriticalSection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void DeleteCriticalSection( ref CRITICAL_SECTION lpCriticalSection ); + [DllImport("kernel32", EntryPoint = "DeleteCriticalSection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void DeleteCriticalSection(ref CRITICAL_SECTION lpCriticalSection); - [DllImport( "kernel32", EntryPoint = "SetEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetEvent( IntPtr hEvent ); + [DllImport("kernel32", EntryPoint = "SetEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetEvent(IntPtr hEvent); - [DllImport( "kernel32", EntryPoint = "ResetEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ResetEvent( IntPtr hEvent ); + [DllImport("kernel32", EntryPoint = "ResetEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ResetEvent(IntPtr hEvent); - [DllImport( "kernel32", EntryPoint = "PulseEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PulseEvent( IntPtr hEvent ); + [DllImport("kernel32", EntryPoint = "PulseEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PulseEvent(IntPtr hEvent); - [DllImport( "kernel32", EntryPoint = "ReleaseSemaphore", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ReleaseSemaphore( IntPtr hSemaphore, int lReleaseCount, IntPtr lpPreviousCount ); + [DllImport("kernel32", EntryPoint = "ReleaseSemaphore", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ReleaseSemaphore(IntPtr hSemaphore, int lReleaseCount, IntPtr lpPreviousCount); - [DllImport( "kernel32", EntryPoint = "ReleaseMutex", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ReleaseMutex( IntPtr hMutex ); + [DllImport("kernel32", EntryPoint = "ReleaseMutex", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ReleaseMutex(IntPtr hMutex); - [DllImport( "kernel32", EntryPoint = "WaitForSingleObject", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WaitForSingleObject( IntPtr hHandle, int dwMilliseconds ); + [DllImport("kernel32", EntryPoint = "WaitForSingleObject", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WaitForSingleObject(IntPtr hHandle, int dwMilliseconds); - [DllImport( "kernel32", EntryPoint = "WaitForMultipleObjects", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WaitForMultipleObjects( int nCount, IntPtr lpHandles, int bWaitAll, int dwMilliseconds ); + [DllImport("kernel32", EntryPoint = "WaitForMultipleObjects", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WaitForMultipleObjects(int nCount, IntPtr lpHandles, int bWaitAll, int dwMilliseconds); - [DllImport( "kernel32", EntryPoint = "Sleep", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void Sleep( int dwMilliseconds ); + [DllImport("kernel32", EntryPoint = "Sleep", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void Sleep(int dwMilliseconds); - [DllImport( "kernel32", EntryPoint = "OutputDebugString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void OutputDebugString( string lpOutputString ); + [DllImport("kernel32", EntryPoint = "OutputDebugString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void OutputDebugString(string lpOutputString); - [DllImport( "kernel32", EntryPoint = "GetVersion", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetVersion", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetVersion(); - [DllImport( "kernel32", EntryPoint = "OpenFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenFile( string lpFileName, ref OFSTRUCT lpReOpenBuff, int wStyle ); + [DllImport("kernel32", EntryPoint = "OpenFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenFile(string lpFileName, ref OFSTRUCT lpReOpenBuff, int wStyle); // GetTempFileName() Flags // - public const int TF_FORCEDRIVE = unchecked( (int)( 0x80 ) ); + public const int TF_FORCEDRIVE = unchecked((int)(0x80)); - [DllImport( "kernel32", EntryPoint = "GetTempFileName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTempFileName( string lpszPath, string lpPrefixString, int wUnique, string lpTempFileName ); + [DllImport("kernel32", EntryPoint = "GetTempFileName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTempFileName(string lpszPath, string lpPrefixString, int wUnique, string lpTempFileName); - [DllImport( "kernel32", EntryPoint = "SetHandleCount", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetHandleCount( int wNumber ); + [DllImport("kernel32", EntryPoint = "SetHandleCount", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetHandleCount(int wNumber); - [DllImport( "kernel32", EntryPoint = "GetLogicalDrives", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetLogicalDrives", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetLogicalDrives(); - [DllImport( "kernel32", EntryPoint = "LockFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LockFile( IntPtr hFile, int dwFileOffsetLow, int dwFileOffsetHigh, int nNumberOfBytesToLockLow, int nNumberOfBytesToLockHigh ); + [DllImport("kernel32", EntryPoint = "LockFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LockFile(IntPtr hFile, int dwFileOffsetLow, int dwFileOffsetHigh, int nNumberOfBytesToLockLow, int nNumberOfBytesToLockHigh); - [DllImport( "kernel32", EntryPoint = "UnlockFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int UnlockFile( IntPtr hFile, int dwFileOffsetLow, int dwFileOffsetHigh, int nNumberOfBytesToUnlockLow, int nNumberOfBytesToUnlockHigh ); + [DllImport("kernel32", EntryPoint = "UnlockFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int UnlockFile(IntPtr hFile, int dwFileOffsetLow, int dwFileOffsetHigh, int nNumberOfBytesToUnlockLow, int nNumberOfBytesToUnlockHigh); - [DllImport( "kernel32", EntryPoint = "LockFileEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LockFileEx( IntPtr hFile, int dwFlags, int dwReserved, int nNumberOfBytesToLockLow, int nNumberOfBytesToLockHigh, ref OVERLAPPED lpOverlapped ); + [DllImport("kernel32", EntryPoint = "LockFileEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LockFileEx(IntPtr hFile, int dwFlags, int dwReserved, int nNumberOfBytesToLockLow, int nNumberOfBytesToLockHigh, ref OVERLAPPED lpOverlapped); - public const int LOCKFILE_FAIL_IMMEDIATELY = unchecked( (int)( 0x1 ) ); - public const int LOCKFILE_EXCLUSIVE_LOCK = unchecked( (int)( 0x2 ) ); + public const int LOCKFILE_FAIL_IMMEDIATELY = unchecked((int)(0x1)); + public const int LOCKFILE_EXCLUSIVE_LOCK = unchecked((int)(0x2)); - [DllImport( "kernel32", EntryPoint = "UnlockFileEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int UnlockFileEx( IntPtr hFile, int dwReserved, int nNumberOfBytesToUnlockLow, int nNumberOfBytesToUnlockHigh, ref OVERLAPPED lpOverlapped ); + [DllImport("kernel32", EntryPoint = "UnlockFileEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int UnlockFileEx(IntPtr hFile, int dwReserved, int nNumberOfBytesToUnlockLow, int nNumberOfBytesToUnlockHigh, ref OVERLAPPED lpOverlapped); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct BY_HANDLE_FILE_INFORMATION { public int dwFileAttributes; @@ -1957,118 +1957,118 @@ public struct BY_HANDLE_FILE_INFORMATION } - [DllImport( "kernel32", EntryPoint = "GetFileInformationByHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetFileInformationByHandle( IntPtr hFile, ref BY_HANDLE_FILE_INFORMATION lpFileInformation ); + [DllImport("kernel32", EntryPoint = "GetFileInformationByHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetFileInformationByHandle(IntPtr hFile, ref BY_HANDLE_FILE_INFORMATION lpFileInformation); - [DllImport( "kernel32", EntryPoint = "GetFileType", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetFileType( IntPtr hFile ); + [DllImport("kernel32", EntryPoint = "GetFileType", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetFileType(IntPtr hFile); - [DllImport( "kernel32", EntryPoint = "GetFileSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetFileSize( IntPtr hFile, IntPtr lpFileSizeHigh ); + [DllImport("kernel32", EntryPoint = "GetFileSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetFileSize(IntPtr hFile, IntPtr lpFileSizeHigh); - [DllImport( "kernel32", EntryPoint = "GetStdHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetStdHandle( int nStdHandle ); + [DllImport("kernel32", EntryPoint = "GetStdHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetStdHandle(int nStdHandle); - [DllImport( "kernel32", EntryPoint = "SetStdHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetStdHandle( int nStdHandle, int nHandle ); + [DllImport("kernel32", EntryPoint = "SetStdHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetStdHandle(int nStdHandle, int nHandle); - [DllImport( "kernel32", EntryPoint = "WriteFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WriteFile( IntPtr hFile, IntPtr lpBuffer, int nNumberOfBytesToWrite, IntPtr lpNumberOfBytesWritten, ref OVERLAPPED lpOverlapped ); + [DllImport("kernel32", EntryPoint = "WriteFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WriteFile(IntPtr hFile, IntPtr lpBuffer, int nNumberOfBytesToWrite, IntPtr lpNumberOfBytesWritten, ref OVERLAPPED lpOverlapped); - [DllImport( "kernel32", EntryPoint = "ReadFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ReadFile( IntPtr hFile, IntPtr lpBuffer, int nNumberOfBytesToRead, IntPtr lpNumberOfBytesRead, ref OVERLAPPED lpOverlapped ); + [DllImport("kernel32", EntryPoint = "ReadFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ReadFile(IntPtr hFile, IntPtr lpBuffer, int nNumberOfBytesToRead, IntPtr lpNumberOfBytesRead, ref OVERLAPPED lpOverlapped); - [DllImport( "kernel32", EntryPoint = "FlushFileBuffers", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FlushFileBuffers( IntPtr hFile ); + [DllImport("kernel32", EntryPoint = "FlushFileBuffers", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FlushFileBuffers(IntPtr hFile); - [DllImport( "kernel32", EntryPoint = "DeviceIoControl", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeviceIoControl( IntPtr hDevice, int dwIoControlCode, IntPtr lpInBuffer, int nInBufferSize, IntPtr lpOutBuffer, int nOutBufferSize, IntPtr lpBytesReturned, ref OVERLAPPED lpOverlapped ); + [DllImport("kernel32", EntryPoint = "DeviceIoControl", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeviceIoControl(IntPtr hDevice, int dwIoControlCode, IntPtr lpInBuffer, int nInBufferSize, IntPtr lpOutBuffer, int nOutBufferSize, IntPtr lpBytesReturned, ref OVERLAPPED lpOverlapped); - [DllImport( "kernel32", EntryPoint = "SetEndOfFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetEndOfFile( IntPtr hFile ); + [DllImport("kernel32", EntryPoint = "SetEndOfFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetEndOfFile(IntPtr hFile); - [DllImport( "kernel32", EntryPoint = "SetFilePointer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetFilePointer( IntPtr hFile, int lDistanceToMove, IntPtr lpDistanceToMoveHigh, int dwMoveMethod ); + [DllImport("kernel32", EntryPoint = "SetFilePointer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetFilePointer(IntPtr hFile, int lDistanceToMove, IntPtr lpDistanceToMoveHigh, int dwMoveMethod); - [DllImport( "kernel32", EntryPoint = "FindClose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FindClose( IntPtr hFindFile ); + [DllImport("kernel32", EntryPoint = "FindClose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FindClose(IntPtr hFindFile); - [DllImport( "kernel32", EntryPoint = "GetFileTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetFileTime( IntPtr hFile, ref FILETIME lpCreationTime, ref FILETIME lpLastAccessTime, ref FILETIME lpLastWriteTime ); + [DllImport("kernel32", EntryPoint = "GetFileTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetFileTime(IntPtr hFile, ref FILETIME lpCreationTime, ref FILETIME lpLastAccessTime, ref FILETIME lpLastWriteTime); - [DllImport( "kernel32", EntryPoint = "SetFileTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetFileTime( IntPtr hFile, ref FILETIME lpCreationTime, ref FILETIME lpLastAccessTime, ref FILETIME lpLastWriteTime ); + [DllImport("kernel32", EntryPoint = "SetFileTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetFileTime(IntPtr hFile, ref FILETIME lpCreationTime, ref FILETIME lpLastAccessTime, ref FILETIME lpLastWriteTime); - [DllImport( "kernel32", EntryPoint = "CloseHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CloseHandle( IntPtr hObject ); + [DllImport("kernel32", EntryPoint = "CloseHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CloseHandle(IntPtr hObject); - [DllImport( "kernel32", EntryPoint = "DuplicateHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DuplicateHandle( IntPtr hSourceProcessHandle, IntPtr hSourceHandle, IntPtr hTargetProcessHandle, IntPtr lpTargetHandle, int dwDesiredAccess, int bInheritHandle, int dwOptions ); + [DllImport("kernel32", EntryPoint = "DuplicateHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DuplicateHandle(IntPtr hSourceProcessHandle, IntPtr hSourceHandle, IntPtr hTargetProcessHandle, IntPtr lpTargetHandle, int dwDesiredAccess, int bInheritHandle, int dwOptions); - [DllImport( "kernel32", EntryPoint = "GetDriveType", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetDriveType( string nDrive ); + [DllImport("kernel32", EntryPoint = "GetDriveType", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetDriveType(string nDrive); - [DllImport( "kernel32", EntryPoint = "GlobalAlloc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GlobalAlloc( int wFlags, int dwBytes ); + [DllImport("kernel32", EntryPoint = "GlobalAlloc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GlobalAlloc(int wFlags, int dwBytes); - [DllImport( "kernel32", EntryPoint = "GlobalFree", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GlobalFree( IntPtr hMem ); + [DllImport("kernel32", EntryPoint = "GlobalFree", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GlobalFree(IntPtr hMem); - [DllImport( "kernel32", EntryPoint = "GlobalHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GlobalHandle( object wMem ); + [DllImport("kernel32", EntryPoint = "GlobalHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GlobalHandle(object wMem); - [DllImport( "kernel32", EntryPoint = "GlobalLock", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GlobalLock( IntPtr hMem ); + [DllImport("kernel32", EntryPoint = "GlobalLock", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GlobalLock(IntPtr hMem); - [DllImport( "kernel32", EntryPoint = "GlobalReAlloc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GlobalReAlloc( IntPtr hMem, int dwBytes, int wFlags ); + [DllImport("kernel32", EntryPoint = "GlobalReAlloc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GlobalReAlloc(IntPtr hMem, int dwBytes, int wFlags); - [DllImport( "kernel32", EntryPoint = "GlobalSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GlobalSize( IntPtr hMem ); + [DllImport("kernel32", EntryPoint = "GlobalSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GlobalSize(IntPtr hMem); - [DllImport( "kernel32", EntryPoint = "GlobalUnlock", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GlobalUnlock( IntPtr hMem ); + [DllImport("kernel32", EntryPoint = "GlobalUnlock", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GlobalUnlock(IntPtr hMem); - [DllImport( "kernel32", EntryPoint = "GlobalFlags", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GlobalFlags( IntPtr hMem ); + [DllImport("kernel32", EntryPoint = "GlobalFlags", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GlobalFlags(IntPtr hMem); - [DllImport( "kernel32", EntryPoint = "GlobalMemoryStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void GlobalMemoryStatus( ref MEMORYSTATUS lpBuffer ); + [DllImport("kernel32", EntryPoint = "GlobalMemoryStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void GlobalMemoryStatus(ref MEMORYSTATUS lpBuffer); - public const int LNOTIFY_OUTOFMEM = unchecked( (int)( 0 ) ); - public const int LNOTIFY_MOVE = unchecked( (int)( 1 ) ); - public const int LNOTIFY_DISCARD = unchecked( (int)( 2 ) ); + public const int LNOTIFY_OUTOFMEM = unchecked((int)(0)); + public const int LNOTIFY_MOVE = unchecked((int)(1)); + public const int LNOTIFY_DISCARD = unchecked((int)(2)); - [DllImport( "kernel32", EntryPoint = "LocalAlloc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LocalAlloc( int wFlags, int wBytes ); + [DllImport("kernel32", EntryPoint = "LocalAlloc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LocalAlloc(int wFlags, int wBytes); - [DllImport( "kernel32", EntryPoint = "LocalFree", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LocalFree( IntPtr hMem ); + [DllImport("kernel32", EntryPoint = "LocalFree", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LocalFree(IntPtr hMem); - [DllImport( "kernel32", EntryPoint = "LocalHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LocalHandle( object wMem ); + [DllImport("kernel32", EntryPoint = "LocalHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LocalHandle(object wMem); - [DllImport( "kernel32", EntryPoint = "LocalLock", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LocalLock( IntPtr hMem ); + [DllImport("kernel32", EntryPoint = "LocalLock", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LocalLock(IntPtr hMem); - [DllImport( "kernel32", EntryPoint = "LocalReAlloc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LocalReAlloc( IntPtr hMem, int wBytes, int wFlags ); + [DllImport("kernel32", EntryPoint = "LocalReAlloc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LocalReAlloc(IntPtr hMem, int wBytes, int wFlags); - [DllImport( "kernel32", EntryPoint = "LocalSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LocalSize( IntPtr hMem ); + [DllImport("kernel32", EntryPoint = "LocalSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LocalSize(IntPtr hMem); - [DllImport( "kernel32", EntryPoint = "LocalUnlock", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LocalUnlock( IntPtr hMem ); + [DllImport("kernel32", EntryPoint = "LocalUnlock", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LocalUnlock(IntPtr hMem); - [DllImport( "kernel32", EntryPoint = "LocalFlags", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LocalFlags( IntPtr hMem ); + [DllImport("kernel32", EntryPoint = "LocalFlags", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LocalFlags(IntPtr hMem); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MEMORY_BASIC_INFORMATION { public int BaseAddress; @@ -2081,169 +2081,169 @@ public struct MEMORY_BASIC_INFORMATION } - [DllImport( "kernel32", EntryPoint = "FlushInstructionCache", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FlushInstructionCache( IntPtr hProcess, IntPtr lpBaseAddress, int dwSize ); + [DllImport("kernel32", EntryPoint = "FlushInstructionCache", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FlushInstructionCache(IntPtr hProcess, IntPtr lpBaseAddress, int dwSize); - [DllImport( "kernel32", EntryPoint = "VirtualAlloc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int VirtualAlloc( IntPtr lpAddress, int dwSize, int flAllocationType, int flProtect ); + [DllImport("kernel32", EntryPoint = "VirtualAlloc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int VirtualAlloc(IntPtr lpAddress, int dwSize, int flAllocationType, int flProtect); - [DllImport( "kernel32", EntryPoint = "VirtualFree", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int VirtualFree( IntPtr lpAddress, int dwSize, int dwFreeType ); + [DllImport("kernel32", EntryPoint = "VirtualFree", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int VirtualFree(IntPtr lpAddress, int dwSize, int dwFreeType); - [DllImport( "kernel32", EntryPoint = "VirtualProtect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int VirtualProtect( IntPtr lpAddress, int dwSize, int flNewProtect, IntPtr lpflOldProtect ); + [DllImport("kernel32", EntryPoint = "VirtualProtect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int VirtualProtect(IntPtr lpAddress, int dwSize, int flNewProtect, IntPtr lpflOldProtect); - [DllImport( "kernel32", EntryPoint = "VirtualQuery", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int VirtualQuery( IntPtr lpAddress, ref MEMORY_BASIC_INFORMATION lpBuffer, int dwLength ); + [DllImport("kernel32", EntryPoint = "VirtualQuery", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int VirtualQuery(IntPtr lpAddress, ref MEMORY_BASIC_INFORMATION lpBuffer, int dwLength); - [DllImport( "kernel32", EntryPoint = "VirtualProtectEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int VirtualProtectEx( IntPtr hProcess, IntPtr lpAddress, int dwSize, int flNewProtect, IntPtr lpflOldProtect ); + [DllImport("kernel32", EntryPoint = "VirtualProtectEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int VirtualProtectEx(IntPtr hProcess, IntPtr lpAddress, int dwSize, int flNewProtect, IntPtr lpflOldProtect); - [DllImport( "kernel32", EntryPoint = "VirtualQueryEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int VirtualQueryEx( IntPtr hProcess, IntPtr lpAddress, ref MEMORY_BASIC_INFORMATION lpBuffer, int dwLength ); + [DllImport("kernel32", EntryPoint = "VirtualQueryEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int VirtualQueryEx(IntPtr hProcess, IntPtr lpAddress, ref MEMORY_BASIC_INFORMATION lpBuffer, int dwLength); - [DllImport( "kernel32", EntryPoint = "HeapCreate", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int HeapCreate( int flOptions, int dwInitialSize, int dwMaximumSize ); + [DllImport("kernel32", EntryPoint = "HeapCreate", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int HeapCreate(int flOptions, int dwInitialSize, int dwMaximumSize); - [DllImport( "kernel32", EntryPoint = "HeapDestroy", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int HeapDestroy( IntPtr hHeap ); + [DllImport("kernel32", EntryPoint = "HeapDestroy", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int HeapDestroy(IntPtr hHeap); - [DllImport( "kernel32", EntryPoint = "HeapAlloc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int HeapAlloc( IntPtr hHeap, int dwFlags, int dwBytes ); + [DllImport("kernel32", EntryPoint = "HeapAlloc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int HeapAlloc(IntPtr hHeap, int dwFlags, int dwBytes); - [DllImport( "kernel32", EntryPoint = "HeapReAlloc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int HeapReAlloc( IntPtr hHeap, int dwFlags, IntPtr lpMem, int dwBytes ); + [DllImport("kernel32", EntryPoint = "HeapReAlloc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int HeapReAlloc(IntPtr hHeap, int dwFlags, IntPtr lpMem, int dwBytes); - [DllImport( "kernel32", EntryPoint = "HeapFree", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int HeapFree( IntPtr hHeap, int dwFlags, IntPtr lpMem ); + [DllImport("kernel32", EntryPoint = "HeapFree", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int HeapFree(IntPtr hHeap, int dwFlags, IntPtr lpMem); - [DllImport( "kernel32", EntryPoint = "HeapSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int HeapSize( IntPtr hHeap, int dwFlags, IntPtr lpMem ); + [DllImport("kernel32", EntryPoint = "HeapSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int HeapSize(IntPtr hHeap, int dwFlags, IntPtr lpMem); - [DllImport( "kernel32", EntryPoint = "GetProcessHeap", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetProcessHeap", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetProcessHeap(); - [DllImport( "kernel32", EntryPoint = "GetProcessTimes", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetProcessTimes( IntPtr hProcess, ref FILETIME lpCreationTime, ref FILETIME lpExitTime, ref FILETIME lpKernelTime, ref FILETIME lpUserTime ); + [DllImport("kernel32", EntryPoint = "GetProcessTimes", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetProcessTimes(IntPtr hProcess, ref FILETIME lpCreationTime, ref FILETIME lpExitTime, ref FILETIME lpKernelTime, ref FILETIME lpUserTime); - [DllImport( "kernel32", EntryPoint = "OpenProcess", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenProcess( int dwDesiredAccess, int bInheritHandle, int dwProcessId ); + [DllImport("kernel32", EntryPoint = "OpenProcess", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenProcess(int dwDesiredAccess, int bInheritHandle, int dwProcessId); - [DllImport( "kernel32", EntryPoint = "GetCurrentProcess", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetCurrentProcess", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetCurrentProcess(); - [DllImport( "kernel32", EntryPoint = "GetCurrentProcessId", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetCurrentProcessId", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetCurrentProcessId(); - [DllImport( "kernel32", EntryPoint = "ExitProcess", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void ExitProcess( int uExitCode ); + [DllImport("kernel32", EntryPoint = "ExitProcess", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void ExitProcess(int uExitCode); - [DllImport( "kernel32", EntryPoint = "TerminateProcess", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int TerminateProcess( IntPtr hProcess, int uExitCode ); + [DllImport("kernel32", EntryPoint = "TerminateProcess", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int TerminateProcess(IntPtr hProcess, int uExitCode); - [DllImport( "kernel32", EntryPoint = "GetExitCodeProcess", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetExitCodeProcess( IntPtr hProcess, IntPtr lpExitCode ); + [DllImport("kernel32", EntryPoint = "GetExitCodeProcess", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetExitCodeProcess(IntPtr hProcess, IntPtr lpExitCode); - [DllImport( "kernel32", EntryPoint = "GetLastError", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetLastError", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetLastError(); - [DllImport( "kernel32", EntryPoint = "SetLastError", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void SetLastError( int dwErrCode ); + [DllImport("kernel32", EntryPoint = "SetLastError", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void SetLastError(int dwErrCode); - public const int SLE_ERROR = unchecked( (int)( 0x1 ) ); - public const int SLE_MINORERROR = unchecked( (int)( 0x2 ) ); - public const int SLE_WARNING = unchecked( (int)( 0x3 ) ); + public const int SLE_ERROR = unchecked((int)(0x1)); + public const int SLE_MINORERROR = unchecked((int)(0x2)); + public const int SLE_WARNING = unchecked((int)(0x3)); - [DllImport( "user32", EntryPoint = "SetLastErrorEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void SetLastErrorEx( int dwErrCode, int dwType ); + [DllImport("user32", EntryPoint = "SetLastErrorEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void SetLastErrorEx(int dwErrCode, int dwType); - [DllImport( "kernel32", EntryPoint = "GetOverlappedResult", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetOverlappedResult( IntPtr hFile, ref OVERLAPPED lpOverlapped, IntPtr lpNumberOfBytesTransferred, int bWait ); + [DllImport("kernel32", EntryPoint = "GetOverlappedResult", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetOverlappedResult(IntPtr hFile, ref OVERLAPPED lpOverlapped, IntPtr lpNumberOfBytesTransferred, int bWait); - public const int SEM_FAILCRITICALERRORS = unchecked( (int)( 0x1 ) ); - public const int SEM_NOGPFAULTERRORBOX = unchecked( (int)( 0x2 ) ); - public const int SEM_NOOPENFILEERRORBOX = unchecked( (int)( 0x8000 ) ); + public const int SEM_FAILCRITICALERRORS = unchecked((int)(0x1)); + public const int SEM_NOGPFAULTERRORBOX = unchecked((int)(0x2)); + public const int SEM_NOOPENFILEERRORBOX = unchecked((int)(0x8000)); - [DllImport( "user32", EntryPoint = "SetDebugErrorLevel", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void SetDebugErrorLevel( int dwLevel ); + [DllImport("user32", EntryPoint = "SetDebugErrorLevel", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void SetDebugErrorLevel(int dwLevel); - [DllImport( "kernel32", EntryPoint = "SetErrorMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetErrorMode( int wMode ); + [DllImport("kernel32", EntryPoint = "SetErrorMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetErrorMode(int wMode); - [DllImport( "kernel32", EntryPoint = "ReadProcessMemory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ReadProcessMemory( IntPtr hProcess, IntPtr lpBaseAddress, IntPtr lpBuffer, int nSize, IntPtr lpNumberOfBytesWritten ); + [DllImport("kernel32", EntryPoint = "ReadProcessMemory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, IntPtr lpBuffer, int nSize, IntPtr lpNumberOfBytesWritten); - [DllImport( "kernel32", EntryPoint = "WriteProcessMemory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WriteProcessMemory( IntPtr hProcess, IntPtr lpBaseAddress, IntPtr lpBuffer, int nSize, IntPtr lpNumberOfBytesWritten ); + [DllImport("kernel32", EntryPoint = "WriteProcessMemory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, IntPtr lpBuffer, int nSize, IntPtr lpNumberOfBytesWritten); - [DllImport( "kernel32", EntryPoint = "GetThreadContext", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetThreadContext( IntPtr hThread, ref CONTEXT lpContext ); + [DllImport("kernel32", EntryPoint = "GetThreadContext", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetThreadContext(IntPtr hThread, ref CONTEXT lpContext); - [DllImport( "kernel32", EntryPoint = "SetThreadContext", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetThreadContext( IntPtr hThread, ref CONTEXT lpContext ); + [DllImport("kernel32", EntryPoint = "SetThreadContext", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetThreadContext(IntPtr hThread, ref CONTEXT lpContext); - [DllImport( "kernel32", EntryPoint = "SuspendThread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SuspendThread( IntPtr hThread ); + [DllImport("kernel32", EntryPoint = "SuspendThread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SuspendThread(IntPtr hThread); - [DllImport( "kernel32", EntryPoint = "ResumeThread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ResumeThread( IntPtr hThread ); + [DllImport("kernel32", EntryPoint = "ResumeThread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ResumeThread(IntPtr hThread); - [DllImport( "kernel32", EntryPoint = "FindResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FindResource( IntPtr hInstance, string lpName, string lpType ); + [DllImport("kernel32", EntryPoint = "FindResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FindResource(IntPtr hInstance, string lpName, string lpType); - [DllImport( "kernel32", EntryPoint = "FindResourceEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FindResourceEx( IntPtr hModule, string lpType, string lpName, int wLanguage ); + [DllImport("kernel32", EntryPoint = "FindResourceEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FindResourceEx(IntPtr hModule, string lpType, string lpName, int wLanguage); - [DllImport( "kernel32", EntryPoint = "BeginUpdateResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int BeginUpdateResource( string pFileName, int bDeleteExistingResources ); + [DllImport("kernel32", EntryPoint = "BeginUpdateResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int BeginUpdateResource(string pFileName, int bDeleteExistingResources); - [DllImport( "kernel32", EntryPoint = "UpdateResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int UpdateResource( IntPtr hUpdate, string lpType, string lpName, int wLanguage, IntPtr lpData, int cbData ); + [DllImport("kernel32", EntryPoint = "UpdateResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int UpdateResource(IntPtr hUpdate, string lpType, string lpName, int wLanguage, IntPtr lpData, int cbData); - [DllImport( "kernel32", EntryPoint = "EndUpdateResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EndUpdateResource( IntPtr hUpdate, int fDiscard ); + [DllImport("kernel32", EntryPoint = "EndUpdateResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EndUpdateResource(IntPtr hUpdate, int fDiscard); - [DllImport( "kernel32", EntryPoint = "LoadResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LoadResource( IntPtr hInstance, IntPtr hResInfo ); + [DllImport("kernel32", EntryPoint = "LoadResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LoadResource(IntPtr hInstance, IntPtr hResInfo); - [DllImport( "kernel32", EntryPoint = "LockResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LockResource( IntPtr hResData ); + [DllImport("kernel32", EntryPoint = "LockResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LockResource(IntPtr hResData); - [DllImport( "kernel32", EntryPoint = "SizeofResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SizeofResource( IntPtr hInstance, IntPtr hResInfo ); + [DllImport("kernel32", EntryPoint = "SizeofResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SizeofResource(IntPtr hInstance, IntPtr hResInfo); // Predefined Resource Types - public const int RT_CURSOR = unchecked( (int)( 1 ) ); - public const int RT_BITMAP = unchecked( (int)( 2 ) ); - public const int RT_ICON = unchecked( (int)( 3 ) ); - public const int RT_MENU = unchecked( (int)( 4 ) ); - public const int RT_DIALOG = unchecked( (int)( 5 ) ); - public const int RT_STRING = unchecked( (int)( 6 ) ); - public const int RT_FONTDIR = unchecked( (int)( 7 ) ); - public const int RT_FONT = unchecked( (int)( 8 ) ); - public const int RT_ACCELERATOR = unchecked( (int)( 9 ) ); - public const int RT_RCDATA = unchecked( (int)( 10 ) ); + public const int RT_CURSOR = unchecked((int)(1)); + public const int RT_BITMAP = unchecked((int)(2)); + public const int RT_ICON = unchecked((int)(3)); + public const int RT_MENU = unchecked((int)(4)); + public const int RT_DIALOG = unchecked((int)(5)); + public const int RT_STRING = unchecked((int)(6)); + public const int RT_FONTDIR = unchecked((int)(7)); + public const int RT_FONT = unchecked((int)(8)); + public const int RT_ACCELERATOR = unchecked((int)(9)); + public const int RT_RCDATA = unchecked((int)(10)); - [DllImport( "kernel32", EntryPoint = "InitAtomTable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int InitAtomTable( int nSize ); + [DllImport("kernel32", EntryPoint = "InitAtomTable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int InitAtomTable(int nSize); - [DllImport( "kernel32", EntryPoint = "GlobalAddAtom", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GlobalAddAtom( string lpString ); + [DllImport("kernel32", EntryPoint = "GlobalAddAtom", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GlobalAddAtom(string lpString); - [DllImport( "kernel32", EntryPoint = "GlobalDeleteAtom", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GlobalDeleteAtom( int nAtom ); + [DllImport("kernel32", EntryPoint = "GlobalDeleteAtom", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GlobalDeleteAtom(int nAtom); - [DllImport( "kernel32", EntryPoint = "GlobalFindAtom", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GlobalFindAtom( string lpString ); + [DllImport("kernel32", EntryPoint = "GlobalFindAtom", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GlobalFindAtom(string lpString); - [DllImport( "kernel32", EntryPoint = "GlobalGetAtomName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GlobalGetAtomName( int nAtom, string lpBuffer, int nSize ); + [DllImport("kernel32", EntryPoint = "GlobalGetAtomName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GlobalGetAtomName(int nAtom, string lpBuffer, int nSize); // User Profile Routines // NOTE: The lpKeyName argument for GetProfileString, WriteProfileString, @@ -2254,121 +2254,121 @@ public struct MEMORY_BASIC_INFORMATION // You can also pass NULL for the lpString argument for WriteProfileString // and WritePrivateProfileString - [DllImport( "kernel32", EntryPoint = "GetProfileInt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetProfileInt( string lpAppName, string lpKeyName, int nDefault ); + [DllImport("kernel32", EntryPoint = "GetProfileInt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetProfileInt(string lpAppName, string lpKeyName, int nDefault); - [DllImport( "kernel32", EntryPoint = "GetProfileString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetProfileString( string lpAppName, string lpKeyName, string lpDefault, string lpReturnedString, int nSize ); + [DllImport("kernel32", EntryPoint = "GetProfileString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetProfileString(string lpAppName, string lpKeyName, string lpDefault, string lpReturnedString, int nSize); - [DllImport( "kernel32", EntryPoint = "WriteProfileString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WriteProfileString( string lpszSection, string lpszKeyName, string lpszString ); + [DllImport("kernel32", EntryPoint = "WriteProfileString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WriteProfileString(string lpszSection, string lpszKeyName, string lpszString); - [DllImport( "kernel32", EntryPoint = "GetProfileSection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetProfileSection( string lpAppName, string lpReturnedString, int nSize ); + [DllImport("kernel32", EntryPoint = "GetProfileSection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetProfileSection(string lpAppName, string lpReturnedString, int nSize); - [DllImport( "kernel32", EntryPoint = "WriteProfileSection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WriteProfileSection( string lpAppName, string lpString ); + [DllImport("kernel32", EntryPoint = "WriteProfileSection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WriteProfileSection(string lpAppName, string lpString); - [DllImport( "kernel32", EntryPoint = "GetPrivateProfileInt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetPrivateProfileInt( string lpApplicationName, string lpKeyName, int nDefault, string lpFileName ); + [DllImport("kernel32", EntryPoint = "GetPrivateProfileInt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetPrivateProfileInt(string lpApplicationName, string lpKeyName, int nDefault, string lpFileName); - [DllImport( "kernel32", EntryPoint = "GetPrivateProfileString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetPrivateProfileString( string lpApplicationName, IntPtr lpKeyName, string lpDefault, string lpReturnedString, int nSize, string lpFileName ); + [DllImport("kernel32", EntryPoint = "GetPrivateProfileString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetPrivateProfileString(string lpApplicationName, IntPtr lpKeyName, string lpDefault, string lpReturnedString, int nSize, string lpFileName); - [DllImport( "kernel32", EntryPoint = "WritePrivateProfileString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WritePrivateProfileString( string lpApplicationName, IntPtr lpKeyName, IntPtr lpString, string lpFileName ); + [DllImport("kernel32", EntryPoint = "WritePrivateProfileString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WritePrivateProfileString(string lpApplicationName, IntPtr lpKeyName, IntPtr lpString, string lpFileName); - [DllImport( "kernel32", EntryPoint = "GetPrivateProfileSection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetPrivateProfileSection( string lpAppName, string lpReturnedString, int nSize, string lpFileName ); + [DllImport("kernel32", EntryPoint = "GetPrivateProfileSection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetPrivateProfileSection(string lpAppName, string lpReturnedString, int nSize, string lpFileName); - [DllImport( "kernel32", EntryPoint = "WritePrivateProfileSection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WritePrivateProfileSection( string lpAppName, string lpString, string lpFileName ); + [DllImport("kernel32", EntryPoint = "WritePrivateProfileSection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WritePrivateProfileSection(string lpAppName, string lpString, string lpFileName); - [DllImport( "kernel32", EntryPoint = "GetWindowsDirectory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWindowsDirectory( string lpBuffer, int nSize ); + [DllImport("kernel32", EntryPoint = "GetWindowsDirectory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWindowsDirectory(string lpBuffer, int nSize); - [DllImport( "kernel32", EntryPoint = "GetSystemDirectory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSystemDirectory( string lpBuffer, int nSize ); + [DllImport("kernel32", EntryPoint = "GetSystemDirectory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSystemDirectory(string lpBuffer, int nSize); - [DllImport( "kernel32", EntryPoint = "GetTempPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTempPath( int nBufferLength, string lpBuffer ); + [DllImport("kernel32", EntryPoint = "GetTempPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTempPath(int nBufferLength, string lpBuffer); - [DllImport( "kernel32", EntryPoint = "SetCurrentDirectory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetCurrentDirectory( string lpPathName ); + [DllImport("kernel32", EntryPoint = "SetCurrentDirectory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetCurrentDirectory(string lpPathName); - [DllImport( "kernel32", EntryPoint = "GetCurrentDirectory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCurrentDirectory( int nBufferLength, string lpBuffer ); + [DllImport("kernel32", EntryPoint = "GetCurrentDirectory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCurrentDirectory(int nBufferLength, string lpBuffer); - [DllImport( "kernel32", EntryPoint = "GetDiskFreeSpace", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetDiskFreeSpace( string lpRootPathName, IntPtr lpSectorsPerCluster, IntPtr lpBytesPerSector, IntPtr lpNumberOfFreeClusters, IntPtr lpTotalNumberOfClusters ); + [DllImport("kernel32", EntryPoint = "GetDiskFreeSpace", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetDiskFreeSpace(string lpRootPathName, IntPtr lpSectorsPerCluster, IntPtr lpBytesPerSector, IntPtr lpNumberOfFreeClusters, IntPtr lpTotalNumberOfClusters); - [DllImport( "kernel32", EntryPoint = "CreateDirectory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateDirectory( string lpPathName, ref SECURITY_ATTRIBUTES lpSecurityAttributes ); + [DllImport("kernel32", EntryPoint = "CreateDirectory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateDirectory(string lpPathName, ref SECURITY_ATTRIBUTES lpSecurityAttributes); - [DllImport( "kernel32", EntryPoint = "CreateDirectoryEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateDirectoryEx( string lpTemplateDirectory, string lpNewDirectory, ref SECURITY_ATTRIBUTES lpSecurityAttributes ); + [DllImport("kernel32", EntryPoint = "CreateDirectoryEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateDirectoryEx(string lpTemplateDirectory, string lpNewDirectory, ref SECURITY_ATTRIBUTES lpSecurityAttributes); - [DllImport( "kernel32", EntryPoint = "RemoveDirectory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RemoveDirectory( string lpPathName ); + [DllImport("kernel32", EntryPoint = "RemoveDirectory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RemoveDirectory(string lpPathName); - [DllImport( "kernel32", EntryPoint = "GetFullPathName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetFullPathName( string lpFileName, int nBufferLength, string lpBuffer, string lpFilePart ); + [DllImport("kernel32", EntryPoint = "GetFullPathName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetFullPathName(string lpFileName, int nBufferLength, string lpBuffer, string lpFilePart); - public const int DDD_RAW_TARGET_PATH = unchecked( (int)( 0x1 ) ); - public const int DDD_REMOVE_DEFINITION = unchecked( (int)( 0x2 ) ); - public const int DDD_EXACT_MATCH_ON_REMOVE = unchecked( (int)( 0x4 ) ); + public const int DDD_RAW_TARGET_PATH = unchecked((int)(0x1)); + public const int DDD_REMOVE_DEFINITION = unchecked((int)(0x2)); + public const int DDD_EXACT_MATCH_ON_REMOVE = unchecked((int)(0x4)); - public const int MAX_PATH = unchecked( (int)( 260 ) ); + public const int MAX_PATH = unchecked((int)(260)); - [DllImport( "kernel32", EntryPoint = "DefineDosDevice", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DefineDosDevice( int dwFlags, string lpDeviceName, string lpTargetPath ); + [DllImport("kernel32", EntryPoint = "DefineDosDevice", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DefineDosDevice(int dwFlags, string lpDeviceName, string lpTargetPath); - [DllImport( "kernel32", EntryPoint = "QueryDosDevice", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int QueryDosDevice( string lpDeviceName, string lpTargetPath, int ucchMax ); + [DllImport("kernel32", EntryPoint = "QueryDosDevice", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int QueryDosDevice(string lpDeviceName, string lpTargetPath, int ucchMax); - [DllImport( "kernel32", EntryPoint = "CreateFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateFile( string lpFileName, int dwDesiredAccess, int dwShareMode, ref SECURITY_ATTRIBUTES lpSecurityAttributes, int dwCreationDisposition, int dwFlagsAndAttributes, IntPtr hTemplateFile ); + [DllImport("kernel32", EntryPoint = "CreateFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateFile(string lpFileName, int dwDesiredAccess, int dwShareMode, ref SECURITY_ATTRIBUTES lpSecurityAttributes, int dwCreationDisposition, int dwFlagsAndAttributes, IntPtr hTemplateFile); - [DllImport( "kernel32", EntryPoint = "SetFileAttributes", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetFileAttributes( string lpFileName, int dwFileAttributes ); + [DllImport("kernel32", EntryPoint = "SetFileAttributes", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetFileAttributes(string lpFileName, int dwFileAttributes); - [DllImport( "kernel32", EntryPoint = "GetFileAttributes", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetFileAttributes( string lpFileName ); + [DllImport("kernel32", EntryPoint = "GetFileAttributes", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetFileAttributes(string lpFileName); - [DllImport( "kernel32", EntryPoint = "DeleteFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeleteFile( string lpFileName ); + [DllImport("kernel32", EntryPoint = "DeleteFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeleteFile(string lpFileName); - [DllImport( "kernel32", EntryPoint = "FindFirstFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FindFirstFile( string lpFileName, ref WIN32_FIND_DATA lpFindFileData ); + [DllImport("kernel32", EntryPoint = "FindFirstFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FindFirstFile(string lpFileName, ref WIN32_FIND_DATA lpFindFileData); - [DllImport( "kernel32", EntryPoint = "FindNextFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FindNextFile( IntPtr hFindFile, ref WIN32_FIND_DATA lpFindFileData ); + [DllImport("kernel32", EntryPoint = "FindNextFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FindNextFile(IntPtr hFindFile, ref WIN32_FIND_DATA lpFindFileData); - [DllImport( "kernel32", EntryPoint = "SearchPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SearchPath( string lpPath, string lpFileName, string lpExtension, int nBufferLength, string lpBuffer, string lpFilePart ); + [DllImport("kernel32", EntryPoint = "SearchPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SearchPath(string lpPath, string lpFileName, string lpExtension, int nBufferLength, string lpBuffer, string lpFilePart); - [DllImport( "kernel32", EntryPoint = "CopyFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CopyFile( string lpExistingFileName, string lpNewFileName, int bFailIfExists ); + [DllImport("kernel32", EntryPoint = "CopyFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CopyFile(string lpExistingFileName, string lpNewFileName, int bFailIfExists); - [DllImport( "kernel32", EntryPoint = "MoveFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MoveFile( string lpExistingFileName, string lpNewFileName ); + [DllImport("kernel32", EntryPoint = "MoveFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MoveFile(string lpExistingFileName, string lpNewFileName); - [DllImport( "kernel32", EntryPoint = "MoveFileEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MoveFileEx( string lpExistingFileName, string lpNewFileName, int dwFlags ); + [DllImport("kernel32", EntryPoint = "MoveFileEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MoveFileEx(string lpExistingFileName, string lpNewFileName, int dwFlags); - public const int MOVEFILE_REPLACE_EXISTING = unchecked( (int)( 0x1 ) ); - public const int MOVEFILE_COPY_ALLOWED = unchecked( (int)( 0x2 ) ); - public const int MOVEFILE_DELAY_UNTIL_REBOOT = unchecked( (int)( 0x4 ) ); + public const int MOVEFILE_REPLACE_EXISTING = unchecked((int)(0x1)); + public const int MOVEFILE_COPY_ALLOWED = unchecked((int)(0x2)); + public const int MOVEFILE_DELAY_UNTIL_REBOOT = unchecked((int)(0x4)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EVENTLOGRECORD { public int Length;// Length of full record @@ -2390,73 +2390,73 @@ public struct EVENTLOGRECORD } - [DllImport( "kernel32", EntryPoint = "CreateNamedPipe", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateNamedPipe( string lpName, int dwOpenMode, int dwPipeMode, int nMaxInstances, int nOutBufferSize, int nInBufferSize, int nDefaultTimeOut, ref SECURITY_ATTRIBUTES lpSecurityAttributes ); + [DllImport("kernel32", EntryPoint = "CreateNamedPipe", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateNamedPipe(string lpName, int dwOpenMode, int dwPipeMode, int nMaxInstances, int nOutBufferSize, int nInBufferSize, int nDefaultTimeOut, ref SECURITY_ATTRIBUTES lpSecurityAttributes); - [DllImport( "kernel32", EntryPoint = "GetNamedPipeHandleState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetNamedPipeHandleState( IntPtr hNamedPipe, IntPtr lpState, IntPtr lpCurInstances, IntPtr lpMaxCollectionCount, IntPtr lpCollectDataTimeout, string lpUserName, int nMaxUserNameSize ); + [DllImport("kernel32", EntryPoint = "GetNamedPipeHandleState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetNamedPipeHandleState(IntPtr hNamedPipe, IntPtr lpState, IntPtr lpCurInstances, IntPtr lpMaxCollectionCount, IntPtr lpCollectDataTimeout, string lpUserName, int nMaxUserNameSize); - [DllImport( "kernel32", EntryPoint = "CallNamedPipe", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CallNamedPipe( string lpNamedPipeName, IntPtr lpInBuffer, int nInBufferSize, IntPtr lpOutBuffer, int nOutBufferSize, IntPtr lpBytesRead, int nTimeOut ); + [DllImport("kernel32", EntryPoint = "CallNamedPipe", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CallNamedPipe(string lpNamedPipeName, IntPtr lpInBuffer, int nInBufferSize, IntPtr lpOutBuffer, int nOutBufferSize, IntPtr lpBytesRead, int nTimeOut); - [DllImport( "kernel32", EntryPoint = "WaitNamedPipe", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WaitNamedPipe( string lpNamedPipeName, int nTimeOut ); + [DllImport("kernel32", EntryPoint = "WaitNamedPipe", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WaitNamedPipe(string lpNamedPipeName, int nTimeOut); - [DllImport( "kernel32", EntryPoint = "SetVolumeLabel", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetVolumeLabel( string lpRootPathName, string lpVolumeName ); + [DllImport("kernel32", EntryPoint = "SetVolumeLabel", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetVolumeLabel(string lpRootPathName, string lpVolumeName); - [DllImport( "kernel32", EntryPoint = "SetFileApisToOEM", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "SetFileApisToOEM", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern void SetFileApisToOEM(); - [DllImport( "kernel32", EntryPoint = "GetVolumeInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetVolumeInformation( string lpRootPathName, string lpVolumeNameBuffer, int nVolumeNameSize, IntPtr lpVolumeSerialNumber, IntPtr lpMaximumComponentLength, IntPtr lpFileSystemFlags, string lpFileSystemNameBuffer, int nFileSystemNameSize ); + [DllImport("kernel32", EntryPoint = "GetVolumeInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetVolumeInformation(string lpRootPathName, string lpVolumeNameBuffer, int nVolumeNameSize, IntPtr lpVolumeSerialNumber, IntPtr lpMaximumComponentLength, IntPtr lpFileSystemFlags, string lpFileSystemNameBuffer, int nFileSystemNameSize); - [DllImport( "advapi32.dll", EntryPoint = "ClearEventLog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ClearEventLog( IntPtr hEventLog, string lpBackupFileName ); + [DllImport("advapi32.dll", EntryPoint = "ClearEventLog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ClearEventLog(IntPtr hEventLog, string lpBackupFileName); - [DllImport( "advapi32.dll", EntryPoint = "BackupEventLog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int BackupEventLog( IntPtr hEventLog, string lpBackupFileName ); + [DllImport("advapi32.dll", EntryPoint = "BackupEventLog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int BackupEventLog(IntPtr hEventLog, string lpBackupFileName); - [DllImport( "advapi32.dll", EntryPoint = "CloseEventLog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CloseEventLog( IntPtr hEventLog ); + [DllImport("advapi32.dll", EntryPoint = "CloseEventLog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CloseEventLog(IntPtr hEventLog); - [DllImport( "advapi32.dll", EntryPoint = "DeregisterEventSource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeregisterEventSource( IntPtr hEventLog ); + [DllImport("advapi32.dll", EntryPoint = "DeregisterEventSource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeregisterEventSource(IntPtr hEventLog); - [DllImport( "advapi32.dll", EntryPoint = "GetNumberOfEventLogRecords", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetNumberOfEventLogRecords( IntPtr hEventLog, int NumberOfRecords ); + [DllImport("advapi32.dll", EntryPoint = "GetNumberOfEventLogRecords", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetNumberOfEventLogRecords(IntPtr hEventLog, int NumberOfRecords); - [DllImport( "advapi32.dll", EntryPoint = "GetOldestEventLogRecord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetOldestEventLogRecord( IntPtr hEventLog, int OldestRecord ); + [DllImport("advapi32.dll", EntryPoint = "GetOldestEventLogRecord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetOldestEventLogRecord(IntPtr hEventLog, int OldestRecord); - [DllImport( "advapi32.dll", EntryPoint = "OpenEventLog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenEventLog( string lpUNCServerName, string lpSourceName ); + [DllImport("advapi32.dll", EntryPoint = "OpenEventLog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenEventLog(string lpUNCServerName, string lpSourceName); - [DllImport( "advapi32.dll", EntryPoint = "RegisterEventSource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegisterEventSource( string lpUNCServerName, string lpSourceName ); + [DllImport("advapi32.dll", EntryPoint = "RegisterEventSource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegisterEventSource(string lpUNCServerName, string lpSourceName); - [DllImport( "advapi32.dll", EntryPoint = "OpenBackupEventLog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenBackupEventLog( string lpUNCServerName, string lpFileName ); + [DllImport("advapi32.dll", EntryPoint = "OpenBackupEventLog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenBackupEventLog(string lpUNCServerName, string lpFileName); - [DllImport( "advapi32.dll", EntryPoint = "ReadEventLog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ReadEventLog( IntPtr hEventLog, int dwReadFlags, int dwRecordOffset, ref EVENTLOGRECORD lpBuffer, int nNumberOfBytesToRead, int pnBytesRead, int pnMinNumberOfBytesNeeded ); + [DllImport("advapi32.dll", EntryPoint = "ReadEventLog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ReadEventLog(IntPtr hEventLog, int dwReadFlags, int dwRecordOffset, ref EVENTLOGRECORD lpBuffer, int nNumberOfBytesToRead, int pnBytesRead, int pnMinNumberOfBytesNeeded); - [DllImport( "advapi32.dll", EntryPoint = "ReportEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ReportEvent( IntPtr hEventLog, int wType, int wCategory, int dwEventID, IntPtr lpUserSid, int wNumStrings, int dwDataSize, IntPtr lpStrings, IntPtr lpRawData ); + [DllImport("advapi32.dll", EntryPoint = "ReportEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ReportEvent(IntPtr hEventLog, int wType, int wCategory, int dwEventID, IntPtr lpUserSid, int wNumStrings, int dwDataSize, IntPtr lpStrings, IntPtr lpRawData); // Security APIs - public const int TOKENUSER = unchecked( (int)( 1 ) ); - public const int TOKENGROUPS = unchecked( (int)( 2 ) ); - public const int TOKENPRIVILEGES = unchecked( (int)( 3 ) ); - public const int TOKENOWNER = unchecked( (int)( 4 ) ); - public const int TOKENPRIMARYGROUP = unchecked( (int)( 5 ) ); - public const int TOKENDEFAULTDACL = unchecked( (int)( 6 ) ); - public const int TOKENSOURCE = unchecked( (int)( 7 ) ); - public const int TOKENTYPE = unchecked( (int)( 8 ) ); - public const int TOKENIMPERSONATIONLEVEL = unchecked( (int)( 9 ) ); - public const int TOKENSTATISTICS = unchecked( (int)( 10 ) ); - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int TOKENUSER = unchecked((int)(1)); + public const int TOKENGROUPS = unchecked((int)(2)); + public const int TOKENPRIVILEGES = unchecked((int)(3)); + public const int TOKENOWNER = unchecked((int)(4)); + public const int TOKENPRIMARYGROUP = unchecked((int)(5)); + public const int TOKENDEFAULTDACL = unchecked((int)(6)); + public const int TOKENSOURCE = unchecked((int)(7)); + public const int TOKENTYPE = unchecked((int)(8)); + public const int TOKENIMPERSONATIONLEVEL = unchecked((int)(9)); + public const int TOKENSTATISTICS = unchecked((int)(10)); + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct TOKEN_GROUPS { public int GroupCount; @@ -2464,25 +2464,25 @@ public struct TOKEN_GROUPS } - [DllImport( "advapi32.dll", EntryPoint = "DuplicateToken", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DuplicateToken( int ExistingTokenHandle, int ImpersonationLevel, int DuplicateTokenHandle ); + [DllImport("advapi32.dll", EntryPoint = "DuplicateToken", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DuplicateToken(int ExistingTokenHandle, int ImpersonationLevel, int DuplicateTokenHandle); - [DllImport( "advapi32.dll", EntryPoint = "GetKernelObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetKernelObjectSecurity( int Handle, int RequestedInformation, SECURITY_DESCRIPTOR pSecurityDescriptor, int nLength, IntPtr lpnLengthNeeded ); + [DllImport("advapi32.dll", EntryPoint = "GetKernelObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetKernelObjectSecurity(int Handle, int RequestedInformation, SECURITY_DESCRIPTOR pSecurityDescriptor, int nLength, IntPtr lpnLengthNeeded); - [DllImport( "advapi32.dll", EntryPoint = "ImpersonateNamedPipeClient", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImpersonateNamedPipeClient( IntPtr hNamedPipe ); + [DllImport("advapi32.dll", EntryPoint = "ImpersonateNamedPipeClient", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImpersonateNamedPipeClient(IntPtr hNamedPipe); - [DllImport( "advapi32.dll", EntryPoint = "ImpersonateSelf", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImpersonateSelf( int ImpersonationLevel ); + [DllImport("advapi32.dll", EntryPoint = "ImpersonateSelf", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImpersonateSelf(int ImpersonationLevel); - [DllImport( "advapi32.dll", EntryPoint = "RevertToSelf", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("advapi32.dll", EntryPoint = "RevertToSelf", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int RevertToSelf(); - [DllImport( "advapi32.dll", EntryPoint = "AccessCheck", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AccessCheck( SECURITY_DESCRIPTOR pSecurityDescriptor, int ClientToken, int DesiredAccess, GENERIC_MAPPING GenericMapping, PRIVILEGE_SET PrivilegeSet, int PrivilegeSetLength, int GrantedAccess, int Status ); + [DllImport("advapi32.dll", EntryPoint = "AccessCheck", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AccessCheck(SECURITY_DESCRIPTOR pSecurityDescriptor, int ClientToken, int DesiredAccess, GENERIC_MAPPING GenericMapping, PRIVILEGE_SET PrivilegeSet, int PrivilegeSetLength, int GrantedAccess, int Status); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct TOKEN_PRIVILEGES { public int PrivilegeCount; @@ -2490,210 +2490,210 @@ public struct TOKEN_PRIVILEGES } - [DllImport( "advapi32.dll", EntryPoint = "OpenProcessToken", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenProcessToken( int ProcessHandle, int DesiredAccess, int TokenHandle ); + [DllImport("advapi32.dll", EntryPoint = "OpenProcessToken", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenProcessToken(int ProcessHandle, int DesiredAccess, int TokenHandle); - [DllImport( "advapi32.dll", EntryPoint = "OpenThreadToken", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenThreadToken( int ThreadHandle, int DesiredAccess, int OpenAsSelf, int TokenHandle ); + [DllImport("advapi32.dll", EntryPoint = "OpenThreadToken", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenThreadToken(int ThreadHandle, int DesiredAccess, int OpenAsSelf, int TokenHandle); - [DllImport( "advapi32.dll", EntryPoint = "GetTokenInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTokenInformation( int TokenHandle, int TokenInformationClass, object TokenInformation, int TokenInformationLength, int ReturnLength ); + [DllImport("advapi32.dll", EntryPoint = "GetTokenInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTokenInformation(int TokenHandle, int TokenInformationClass, object TokenInformation, int TokenInformationLength, int ReturnLength); - [DllImport( "advapi32.dll", EntryPoint = "SetTokenInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetTokenInformation( int TokenHandle, int TokenInformationClass, object TokenInformation, int TokenInformationLength ); + [DllImport("advapi32.dll", EntryPoint = "SetTokenInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetTokenInformation(int TokenHandle, int TokenInformationClass, object TokenInformation, int TokenInformationLength); - [DllImport( "advapi32.dll", EntryPoint = "AdjustTokenPrivileges", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AdjustTokenPrivileges( int TokenHandle, int DisableAllPrivileges, TOKEN_PRIVILEGES NewState, int BufferLength, TOKEN_PRIVILEGES PreviousState, int ReturnLength ); + [DllImport("advapi32.dll", EntryPoint = "AdjustTokenPrivileges", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AdjustTokenPrivileges(int TokenHandle, int DisableAllPrivileges, TOKEN_PRIVILEGES NewState, int BufferLength, TOKEN_PRIVILEGES PreviousState, int ReturnLength); - [DllImport( "advapi32.dll", EntryPoint = "AdjustTokenGroups", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AdjustTokenGroups( int TokenHandle, int ResetToDefault, TOKEN_GROUPS NewState, int BufferLength, TOKEN_GROUPS PreviousState, int ReturnLength ); + [DllImport("advapi32.dll", EntryPoint = "AdjustTokenGroups", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AdjustTokenGroups(int TokenHandle, int ResetToDefault, TOKEN_GROUPS NewState, int BufferLength, TOKEN_GROUPS PreviousState, int ReturnLength); - [DllImport( "advapi32.dll", EntryPoint = "PrivilegeCheck", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PrivilegeCheck( int ClientToken, PRIVILEGE_SET RequiredPrivileges, int pfResult ); + [DllImport("advapi32.dll", EntryPoint = "PrivilegeCheck", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PrivilegeCheck(int ClientToken, PRIVILEGE_SET RequiredPrivileges, int pfResult); - [DllImport( "advapi32.dll", EntryPoint = "AccessCheckAndAuditAlarm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AccessCheckAndAuditAlarm( string SubsystemName, object HandleId, string ObjectTypeName, string ObjectName, SECURITY_DESCRIPTOR SecurityDescriptor, int DesiredAccess, GENERIC_MAPPING GenericMapping, int ObjectCreation, int GrantedAccess, int AccessStatus, int pfGenerateOnClose ); + [DllImport("advapi32.dll", EntryPoint = "AccessCheckAndAuditAlarm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AccessCheckAndAuditAlarm(string SubsystemName, object HandleId, string ObjectTypeName, string ObjectName, SECURITY_DESCRIPTOR SecurityDescriptor, int DesiredAccess, GENERIC_MAPPING GenericMapping, int ObjectCreation, int GrantedAccess, int AccessStatus, int pfGenerateOnClose); - [DllImport( "kernel32", EntryPoint = "ObjectOpenAuditAlarm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ObjectOpenAuditAlarm( string SubsystemName, object HandleId, string ObjectTypeName, string ObjectName, SECURITY_DESCRIPTOR pSecurityDescriptor, int ClientToken, int DesiredAccess, int GrantedAccess, PRIVILEGE_SET Privileges, int ObjectCreation, int AccessGranted, int GenerateOnClose ); + [DllImport("kernel32", EntryPoint = "ObjectOpenAuditAlarm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ObjectOpenAuditAlarm(string SubsystemName, object HandleId, string ObjectTypeName, string ObjectName, SECURITY_DESCRIPTOR pSecurityDescriptor, int ClientToken, int DesiredAccess, int GrantedAccess, PRIVILEGE_SET Privileges, int ObjectCreation, int AccessGranted, int GenerateOnClose); - [DllImport( "advapi32.dll", EntryPoint = "ObjectPrivilegeAuditAlarm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ObjectPrivilegeAuditAlarm( string SubsystemName, object HandleId, int ClientToken, int DesiredAccess, PRIVILEGE_SET Privileges, int AccessGranted ); + [DllImport("advapi32.dll", EntryPoint = "ObjectPrivilegeAuditAlarm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ObjectPrivilegeAuditAlarm(string SubsystemName, object HandleId, int ClientToken, int DesiredAccess, PRIVILEGE_SET Privileges, int AccessGranted); - [DllImport( "advapi32.dll", EntryPoint = "ObjectCloseAuditAlarm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ObjectCloseAuditAlarm( string SubsystemName, object HandleId, int GenerateOnClose ); + [DllImport("advapi32.dll", EntryPoint = "ObjectCloseAuditAlarm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ObjectCloseAuditAlarm(string SubsystemName, object HandleId, int GenerateOnClose); - [DllImport( "advapi32.dll", EntryPoint = "PrivilegedServiceAuditAlarm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PrivilegedServiceAuditAlarm( string SubsystemName, string ServiceName, int ClientToken, PRIVILEGE_SET Privileges, int AccessGranted ); + [DllImport("advapi32.dll", EntryPoint = "PrivilegedServiceAuditAlarm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PrivilegedServiceAuditAlarm(string SubsystemName, string ServiceName, int ClientToken, PRIVILEGE_SET Privileges, int AccessGranted); - [DllImport( "advapi32.dll", EntryPoint = "IsValidSid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsValidSid( object pSid ); + [DllImport("advapi32.dll", EntryPoint = "IsValidSid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsValidSid(object pSid); - [DllImport( "advapi32.dll", EntryPoint = "EqualSid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EqualSid( object pSid1, object pSid2 ); + [DllImport("advapi32.dll", EntryPoint = "EqualSid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EqualSid(object pSid1, object pSid2); - [DllImport( "advapi32.dll", EntryPoint = "EqualPrefixSid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EqualPrefixSid( object pSid1, object pSid2 ); + [DllImport("advapi32.dll", EntryPoint = "EqualPrefixSid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EqualPrefixSid(object pSid1, object pSid2); - [DllImport( "advapi32.dll", EntryPoint = "GetSidLengthRequired", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSidLengthRequired( byte nSubAuthorityCount ); + [DllImport("advapi32.dll", EntryPoint = "GetSidLengthRequired", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSidLengthRequired(byte nSubAuthorityCount); - [DllImport( "advapi32.dll", EntryPoint = "AllocateAndInitializeSid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AllocateAndInitializeSid( SID_IDENTIFIER_AUTHORITY pIdentifierAuthority, byte nSubAuthorityCount, int nSubAuthority0, int nSubAuthority1, int nSubAuthority2, int nSubAuthority3, int nSubAuthority4, int nSubAuthority5, int nSubAuthority6, int nSubAuthority7, IntPtr lpPSid ); + [DllImport("advapi32.dll", EntryPoint = "AllocateAndInitializeSid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AllocateAndInitializeSid(SID_IDENTIFIER_AUTHORITY pIdentifierAuthority, byte nSubAuthorityCount, int nSubAuthority0, int nSubAuthority1, int nSubAuthority2, int nSubAuthority3, int nSubAuthority4, int nSubAuthority5, int nSubAuthority6, int nSubAuthority7, IntPtr lpPSid); - [DllImport( "advapi32.dll", EntryPoint = "FreeSid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void FreeSid( object pSid ); + [DllImport("advapi32.dll", EntryPoint = "FreeSid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void FreeSid(object pSid); - [DllImport( "advapi32.dll", EntryPoint = "InitializeSid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int InitializeSid( object Sid, SID_IDENTIFIER_AUTHORITY pIdentifierAuthority, byte nSubAuthorityCount ); + [DllImport("advapi32.dll", EntryPoint = "InitializeSid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int InitializeSid(object Sid, SID_IDENTIFIER_AUTHORITY pIdentifierAuthority, byte nSubAuthorityCount); - [DllImport( "advapi32.dll", EntryPoint = "GetSidIdentifierAuthority", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern SID_IDENTIFIER_AUTHORITY GetSidIdentifierAuthority( object pSid ); + [DllImport("advapi32.dll", EntryPoint = "GetSidIdentifierAuthority", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern SID_IDENTIFIER_AUTHORITY GetSidIdentifierAuthority(object pSid); - [DllImport( "advapi32.dll", EntryPoint = "GetSidSubAuthority", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSidSubAuthority( object pSid, int nSubAuthority ); + [DllImport("advapi32.dll", EntryPoint = "GetSidSubAuthority", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSidSubAuthority(object pSid, int nSubAuthority); - [DllImport( "advapi32.dll", EntryPoint = "GetSidSubAuthorityCount", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern byte GetSidSubAuthorityCount( object pSid ); + [DllImport("advapi32.dll", EntryPoint = "GetSidSubAuthorityCount", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern byte GetSidSubAuthorityCount(object pSid); - [DllImport( "advapi32.dll", EntryPoint = "GetLengthSid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetLengthSid( object pSid ); + [DllImport("advapi32.dll", EntryPoint = "GetLengthSid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetLengthSid(object pSid); - [DllImport( "advapi32.dll", EntryPoint = "CopySid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CopySid( int nDestinationSidLength, object pDestinationSid, object pSourceSid ); + [DllImport("advapi32.dll", EntryPoint = "CopySid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CopySid(int nDestinationSidLength, object pDestinationSid, object pSourceSid); - [DllImport( "advapi32.dll", EntryPoint = "AreAllAccessesGranted", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AreAllAccessesGranted( int GrantedAccess, int DesiredAccess ); + [DllImport("advapi32.dll", EntryPoint = "AreAllAccessesGranted", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AreAllAccessesGranted(int GrantedAccess, int DesiredAccess); - [DllImport( "advapi32.dll", EntryPoint = "AreAnyAccessesGranted", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AreAnyAccessesGranted( int GrantedAccess, int DesiredAccess ); + [DllImport("advapi32.dll", EntryPoint = "AreAnyAccessesGranted", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AreAnyAccessesGranted(int GrantedAccess, int DesiredAccess); - [DllImport( "advapi32.dll", EntryPoint = "MapGenericMask", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void MapGenericMask( int AccessMask, GENERIC_MAPPING GenericMapping ); + [DllImport("advapi32.dll", EntryPoint = "MapGenericMask", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void MapGenericMask(int AccessMask, GENERIC_MAPPING GenericMapping); - [DllImport( "advapi32.dll", EntryPoint = "IsValidAcl", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsValidAcl( ACL pAcl ); + [DllImport("advapi32.dll", EntryPoint = "IsValidAcl", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsValidAcl(ACL pAcl); - [DllImport( "advapi32.dll", EntryPoint = "InitializeAcl", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int InitializeAcl( ACL pAcl, int nAclLength, int dwAclRevision ); + [DllImport("advapi32.dll", EntryPoint = "InitializeAcl", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int InitializeAcl(ACL pAcl, int nAclLength, int dwAclRevision); - [DllImport( "advapi32.dll", EntryPoint = "GetAclInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetAclInformation( ACL pAcl, object pAclInformation, int nAclInformationLength, int dwAclInformationClass ); + [DllImport("advapi32.dll", EntryPoint = "GetAclInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetAclInformation(ACL pAcl, object pAclInformation, int nAclInformationLength, int dwAclInformationClass); - [DllImport( "advapi32.dll", EntryPoint = "SetAclInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetAclInformation( ACL pAcl, object pAclInformation, int nAclInformationLength, int dwAclInformationClass ); + [DllImport("advapi32.dll", EntryPoint = "SetAclInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetAclInformation(ACL pAcl, object pAclInformation, int nAclInformationLength, int dwAclInformationClass); - [DllImport( "advapi32.dll", EntryPoint = "AddAce", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AddAce( ACL pAcl, int dwAceRevision, int dwStartingAceIndex, object pAceList, int nAceListLength ); + [DllImport("advapi32.dll", EntryPoint = "AddAce", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AddAce(ACL pAcl, int dwAceRevision, int dwStartingAceIndex, object pAceList, int nAceListLength); - [DllImport( "advapi32.dll", EntryPoint = "DeleteAce", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeleteAce( ACL pAcl, int dwAceIndex ); + [DllImport("advapi32.dll", EntryPoint = "DeleteAce", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeleteAce(ACL pAcl, int dwAceIndex); - [DllImport( "advapi32.dll", EntryPoint = "GetAce", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetAce( ACL pAcl, int dwAceIndex, object pAce ); + [DllImport("advapi32.dll", EntryPoint = "GetAce", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetAce(ACL pAcl, int dwAceIndex, object pAce); - [DllImport( "advapi32.dll", EntryPoint = "AddAccessAllowedAce", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AddAccessAllowedAce( ACL pAcl, int dwAceRevision, int AccessMask, object pSid ); + [DllImport("advapi32.dll", EntryPoint = "AddAccessAllowedAce", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AddAccessAllowedAce(ACL pAcl, int dwAceRevision, int AccessMask, object pSid); - [DllImport( "advapi32.dll", EntryPoint = "AddAccessDeniedAce", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AddAccessDeniedAce( ACL pAcl, int dwAceRevision, int AccessMask, object pSid ); + [DllImport("advapi32.dll", EntryPoint = "AddAccessDeniedAce", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AddAccessDeniedAce(ACL pAcl, int dwAceRevision, int AccessMask, object pSid); - [DllImport( "advapi32.dll", EntryPoint = "AddAuditAccessAce", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AddAuditAccessAce( ACL pAcl, int dwAceRevision, int dwAccessMask, object pSid, int bAuditSuccess, int bAuditFailure ); + [DllImport("advapi32.dll", EntryPoint = "AddAuditAccessAce", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AddAuditAccessAce(ACL pAcl, int dwAceRevision, int dwAccessMask, object pSid, int bAuditSuccess, int bAuditFailure); - [DllImport( "advapi32.dll", EntryPoint = "FindFirstFreeAce", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FindFirstFreeAce( ACL pAcl, int pAce ); + [DllImport("advapi32.dll", EntryPoint = "FindFirstFreeAce", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FindFirstFreeAce(ACL pAcl, int pAce); - [DllImport( "advapi32.dll", EntryPoint = "InitializeSecurityDescriptor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int InitializeSecurityDescriptor( SECURITY_DESCRIPTOR pSecurityDescriptor, int dwRevision ); + [DllImport("advapi32.dll", EntryPoint = "InitializeSecurityDescriptor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int InitializeSecurityDescriptor(SECURITY_DESCRIPTOR pSecurityDescriptor, int dwRevision); - [DllImport( "advapi32.dll", EntryPoint = "IsValidSecurityDescriptor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsValidSecurityDescriptor( SECURITY_DESCRIPTOR pSecurityDescriptor ); + [DllImport("advapi32.dll", EntryPoint = "IsValidSecurityDescriptor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsValidSecurityDescriptor(SECURITY_DESCRIPTOR pSecurityDescriptor); - [DllImport( "advapi32.dll", EntryPoint = "GetSecurityDescriptorLength", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSecurityDescriptorLength( SECURITY_DESCRIPTOR pSecurityDescriptor ); + [DllImport("advapi32.dll", EntryPoint = "GetSecurityDescriptorLength", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSecurityDescriptorLength(SECURITY_DESCRIPTOR pSecurityDescriptor); - [DllImport( "advapi32.dll", EntryPoint = "GetSecurityDescriptorControl", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSecurityDescriptorControl( SECURITY_DESCRIPTOR pSecurityDescriptor, int pControl, IntPtr lpdwRevision ); + [DllImport("advapi32.dll", EntryPoint = "GetSecurityDescriptorControl", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSecurityDescriptorControl(SECURITY_DESCRIPTOR pSecurityDescriptor, int pControl, IntPtr lpdwRevision); - [DllImport( "advapi32.dll", EntryPoint = "SetSecurityDescriptorDacl", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetSecurityDescriptorDacl( SECURITY_DESCRIPTOR pSecurityDescriptor, int bDaclPresent, ACL pDacl, int bDaclDefaulted ); + [DllImport("advapi32.dll", EntryPoint = "SetSecurityDescriptorDacl", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetSecurityDescriptorDacl(SECURITY_DESCRIPTOR pSecurityDescriptor, int bDaclPresent, ACL pDacl, int bDaclDefaulted); - [DllImport( "advapi32.dll", EntryPoint = "GetSecurityDescriptorDacl", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSecurityDescriptorDacl( SECURITY_DESCRIPTOR pSecurityDescriptor, IntPtr lpbDaclPresent, ACL pDacl, IntPtr lpbDaclDefaulted ); + [DllImport("advapi32.dll", EntryPoint = "GetSecurityDescriptorDacl", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSecurityDescriptorDacl(SECURITY_DESCRIPTOR pSecurityDescriptor, IntPtr lpbDaclPresent, ACL pDacl, IntPtr lpbDaclDefaulted); - [DllImport( "advapi32.dll", EntryPoint = "SetSecurityDescriptorSacl", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetSecurityDescriptorSacl( SECURITY_DESCRIPTOR pSecurityDescriptor, int bSaclPresent, ACL pSacl, int bSaclDefaulted ); + [DllImport("advapi32.dll", EntryPoint = "SetSecurityDescriptorSacl", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetSecurityDescriptorSacl(SECURITY_DESCRIPTOR pSecurityDescriptor, int bSaclPresent, ACL pSacl, int bSaclDefaulted); - [DllImport( "advapi32.dll", EntryPoint = "GetSecurityDescriptorSacl", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSecurityDescriptorSacl( SECURITY_DESCRIPTOR pSecurityDescriptor, IntPtr lpbSaclPresent, ACL pSacl, IntPtr lpbSaclDefaulted ); + [DllImport("advapi32.dll", EntryPoint = "GetSecurityDescriptorSacl", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSecurityDescriptorSacl(SECURITY_DESCRIPTOR pSecurityDescriptor, IntPtr lpbSaclPresent, ACL pSacl, IntPtr lpbSaclDefaulted); - [DllImport( "advapi32.dll", EntryPoint = "SetSecurityDescriptorOwner", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetSecurityDescriptorOwner( SECURITY_DESCRIPTOR pSecurityDescriptor, object pOwner, int bOwnerDefaulted ); + [DllImport("advapi32.dll", EntryPoint = "SetSecurityDescriptorOwner", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetSecurityDescriptorOwner(SECURITY_DESCRIPTOR pSecurityDescriptor, object pOwner, int bOwnerDefaulted); - [DllImport( "advapi32.dll", EntryPoint = "GetSecurityDescriptorOwner", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSecurityDescriptorOwner( SECURITY_DESCRIPTOR pSecurityDescriptor, object pOwner, IntPtr lpbOwnerDefaulted ); + [DllImport("advapi32.dll", EntryPoint = "GetSecurityDescriptorOwner", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSecurityDescriptorOwner(SECURITY_DESCRIPTOR pSecurityDescriptor, object pOwner, IntPtr lpbOwnerDefaulted); - [DllImport( "advapi32.dll", EntryPoint = "SetSecurityDescriptorGroup", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetSecurityDescriptorGroup( SECURITY_DESCRIPTOR pSecurityDescriptor, object pGroup, int bGroupDefaulted ); + [DllImport("advapi32.dll", EntryPoint = "SetSecurityDescriptorGroup", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetSecurityDescriptorGroup(SECURITY_DESCRIPTOR pSecurityDescriptor, object pGroup, int bGroupDefaulted); - [DllImport( "advapi32.dll", EntryPoint = "GetSecurityDescriptorGroup", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSecurityDescriptorGroup( SECURITY_DESCRIPTOR pSecurityDescriptor, object pGroup, IntPtr lpbGroupDefaulted ); + [DllImport("advapi32.dll", EntryPoint = "GetSecurityDescriptorGroup", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSecurityDescriptorGroup(SECURITY_DESCRIPTOR pSecurityDescriptor, object pGroup, IntPtr lpbGroupDefaulted); - [DllImport( "advapi32.dll", EntryPoint = "CreatePrivateObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreatePrivateObjectSecurity( SECURITY_DESCRIPTOR ParentDescriptor, SECURITY_DESCRIPTOR CreatorDescriptor, SECURITY_DESCRIPTOR NewDescriptor, int IsDirectoryObject, int Token, GENERIC_MAPPING GenericMapping ); + [DllImport("advapi32.dll", EntryPoint = "CreatePrivateObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreatePrivateObjectSecurity(SECURITY_DESCRIPTOR ParentDescriptor, SECURITY_DESCRIPTOR CreatorDescriptor, SECURITY_DESCRIPTOR NewDescriptor, int IsDirectoryObject, int Token, GENERIC_MAPPING GenericMapping); - [DllImport( "advapi32.dll", EntryPoint = "SetPrivateObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetPrivateObjectSecurity( int SecurityInformation, SECURITY_DESCRIPTOR ModificationDescriptor, SECURITY_DESCRIPTOR ObjectsSecurityDescriptor, GENERIC_MAPPING GenericMapping, int Token ); + [DllImport("advapi32.dll", EntryPoint = "SetPrivateObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetPrivateObjectSecurity(int SecurityInformation, SECURITY_DESCRIPTOR ModificationDescriptor, SECURITY_DESCRIPTOR ObjectsSecurityDescriptor, GENERIC_MAPPING GenericMapping, int Token); - [DllImport( "advapi32.dll", EntryPoint = "GetPrivateObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetPrivateObjectSecurity( SECURITY_DESCRIPTOR ObjectDescriptor, int SecurityInformation, SECURITY_DESCRIPTOR ResultantDescriptor, int DescriptorLength, int ReturnLength ); + [DllImport("advapi32.dll", EntryPoint = "GetPrivateObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetPrivateObjectSecurity(SECURITY_DESCRIPTOR ObjectDescriptor, int SecurityInformation, SECURITY_DESCRIPTOR ResultantDescriptor, int DescriptorLength, int ReturnLength); - [DllImport( "advapi32.dll", EntryPoint = "DestroyPrivateObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DestroyPrivateObjectSecurity( SECURITY_DESCRIPTOR ObjectDescriptor ); + [DllImport("advapi32.dll", EntryPoint = "DestroyPrivateObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DestroyPrivateObjectSecurity(SECURITY_DESCRIPTOR ObjectDescriptor); - [DllImport( "advapi32.dll", EntryPoint = "MakeSelfRelativeSD", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MakeSelfRelativeSD( SECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor, SECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor, IntPtr lpdwBufferLength ); + [DllImport("advapi32.dll", EntryPoint = "MakeSelfRelativeSD", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MakeSelfRelativeSD(SECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor, SECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor, IntPtr lpdwBufferLength); - [DllImport( "advapi32.dll", EntryPoint = "MakeAbsoluteSD", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MakeAbsoluteSD( SECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor, SECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor, IntPtr lpdwAbsoluteSecurityDescriptorSize, ACL pDacl, IntPtr lpdwDaclSize, ACL pSacl, IntPtr lpdwSaclSize, object pOwner, IntPtr lpdwOwnerSize, object pPrimaryGroup, IntPtr lpdwPrimaryGroupSize ); + [DllImport("advapi32.dll", EntryPoint = "MakeAbsoluteSD", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MakeAbsoluteSD(SECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor, SECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor, IntPtr lpdwAbsoluteSecurityDescriptorSize, ACL pDacl, IntPtr lpdwDaclSize, ACL pSacl, IntPtr lpdwSaclSize, object pOwner, IntPtr lpdwOwnerSize, object pPrimaryGroup, IntPtr lpdwPrimaryGroupSize); - [DllImport( "advapi32.dll", EntryPoint = "SetFileSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetFileSecurity( string lpFileName, int SecurityInformation, SECURITY_DESCRIPTOR pSecurityDescriptor ); + [DllImport("advapi32.dll", EntryPoint = "SetFileSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetFileSecurity(string lpFileName, int SecurityInformation, SECURITY_DESCRIPTOR pSecurityDescriptor); - [DllImport( "advapi32.dll", EntryPoint = "GetFileSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetFileSecurity( string lpFileName, int RequestedInformation, SECURITY_DESCRIPTOR pSecurityDescriptor, int nLength, IntPtr lpnLengthNeeded ); + [DllImport("advapi32.dll", EntryPoint = "GetFileSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetFileSecurity(string lpFileName, int RequestedInformation, SECURITY_DESCRIPTOR pSecurityDescriptor, int nLength, IntPtr lpnLengthNeeded); - [DllImport( "advapi32.dll", EntryPoint = "SetKernelObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetKernelObjectSecurity( int Handle, int SecurityInformation, SECURITY_DESCRIPTOR SecurityDescriptor ); + [DllImport("advapi32.dll", EntryPoint = "SetKernelObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetKernelObjectSecurity(int Handle, int SecurityInformation, SECURITY_DESCRIPTOR SecurityDescriptor); - [DllImport( "kernel32", EntryPoint = "FindFirstChangeNotification", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FindFirstChangeNotification( string lpPathName, int bWatchSubtree, int dwNotifyFilter ); + [DllImport("kernel32", EntryPoint = "FindFirstChangeNotification", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FindFirstChangeNotification(string lpPathName, int bWatchSubtree, int dwNotifyFilter); - [DllImport( "kernel32", EntryPoint = "FindNextChangeNotification", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FindNextChangeNotification( IntPtr hChangeHandle ); + [DllImport("kernel32", EntryPoint = "FindNextChangeNotification", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FindNextChangeNotification(IntPtr hChangeHandle); - [DllImport( "kernel32", EntryPoint = "FindCloseChangeNotification", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FindCloseChangeNotification( IntPtr hChangeHandle ); + [DllImport("kernel32", EntryPoint = "FindCloseChangeNotification", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FindCloseChangeNotification(IntPtr hChangeHandle); - [DllImport( "kernel32", EntryPoint = "VirtualLock", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int VirtualLock( IntPtr lpAddress, int dwSize ); + [DllImport("kernel32", EntryPoint = "VirtualLock", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int VirtualLock(IntPtr lpAddress, int dwSize); - [DllImport( "kernel32", EntryPoint = "VirtualUnlock", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int VirtualUnlock( IntPtr lpAddress, int dwSize ); + [DllImport("kernel32", EntryPoint = "VirtualUnlock", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int VirtualUnlock(IntPtr lpAddress, int dwSize); - [DllImport( "kernel32", EntryPoint = "MapViewOfFileEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MapViewOfFileEx( IntPtr hFileMappingObject, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, int dwNumberOfBytesToMap, IntPtr lpBaseAddress ); + [DllImport("kernel32", EntryPoint = "MapViewOfFileEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MapViewOfFileEx(IntPtr hFileMappingObject, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, int dwNumberOfBytesToMap, IntPtr lpBaseAddress); - [DllImport( "kernel32", EntryPoint = "SetPriorityClass", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetPriorityClass( IntPtr hProcess, int dwPriorityClass ); + [DllImport("kernel32", EntryPoint = "SetPriorityClass", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetPriorityClass(IntPtr hProcess, int dwPriorityClass); - [DllImport( "kernel32", EntryPoint = "GetPriorityClass", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetPriorityClass( IntPtr hProcess ); + [DllImport("kernel32", EntryPoint = "GetPriorityClass", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetPriorityClass(IntPtr hProcess); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CONTEXT { public double FltF0; @@ -2772,14 +2772,14 @@ public struct CONTEXT public int Fill; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EXCEPTION_POINTERS { public EXCEPTION_RECORD pExceptionRecord; public CONTEXT ContextRecord; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct LDT_BYTES {// Defined for use in LDT_ENTRY Type public byte BaseMid; @@ -2788,7 +2788,7 @@ public struct LDT_BYTES public byte BaseHi; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct LDT_ENTRY { public int LimitLow; @@ -2797,168 +2797,168 @@ public struct LDT_ENTRY } - [DllImport( "kernel32", EntryPoint = "FatalExit", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void FatalExit( int code ); + [DllImport("kernel32", EntryPoint = "FatalExit", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void FatalExit(int code); - [DllImport( "kernel32", EntryPoint = "GetEnvironmentStrings", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetEnvironmentStrings", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern string GetEnvironmentStrings(); - [DllImport( "kernel32", EntryPoint = "RaiseException", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void RaiseException( int dwExceptionCode, int dwExceptionFlags, int nNumberOfArguments, IntPtr lpArguments ); + [DllImport("kernel32", EntryPoint = "RaiseException", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void RaiseException(int dwExceptionCode, int dwExceptionFlags, int nNumberOfArguments, IntPtr lpArguments); - [DllImport( "kernel32", EntryPoint = "UnhandledExceptionFilter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int UnhandledExceptionFilter( EXCEPTION_POINTERS ExceptionInfo ); + [DllImport("kernel32", EntryPoint = "UnhandledExceptionFilter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int UnhandledExceptionFilter(EXCEPTION_POINTERS ExceptionInfo); - [DllImport( "kernel32", EntryPoint = "CreateThread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateThread( ref SECURITY_ATTRIBUTES lpThreadAttributes, int dwStackSize, IntPtr lpStartAddress, IntPtr lpParameter, int dwCreationFlags, IntPtr lpThreadId ); + [DllImport("kernel32", EntryPoint = "CreateThread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateThread(ref SECURITY_ATTRIBUTES lpThreadAttributes, int dwStackSize, IntPtr lpStartAddress, IntPtr lpParameter, int dwCreationFlags, IntPtr lpThreadId); - [DllImport( "kernel32", EntryPoint = "CreateRemoteThread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateRemoteThread( IntPtr hProcess, ref SECURITY_ATTRIBUTES lpThreadAttributes, int dwStackSize, IntPtr lpStartAddress, IntPtr lpParameter, int dwCreationFlags, IntPtr lpThreadId ); + [DllImport("kernel32", EntryPoint = "CreateRemoteThread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateRemoteThread(IntPtr hProcess, ref SECURITY_ATTRIBUTES lpThreadAttributes, int dwStackSize, IntPtr lpStartAddress, IntPtr lpParameter, int dwCreationFlags, IntPtr lpThreadId); - [DllImport( "kernel32", EntryPoint = "GetCurrentThread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetCurrentThread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetCurrentThread(); - [DllImport( "kernel32", EntryPoint = "GetCurrentThreadId", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetCurrentThreadId", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetCurrentThreadId(); - [DllImport( "kernel32", EntryPoint = "SetThreadPriority", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetThreadPriority( IntPtr hThread, int nPriority ); + [DllImport("kernel32", EntryPoint = "SetThreadPriority", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetThreadPriority(IntPtr hThread, int nPriority); - [DllImport( "kernel32", EntryPoint = "GetThreadPriority", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetThreadPriority( IntPtr hThread ); + [DllImport("kernel32", EntryPoint = "GetThreadPriority", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetThreadPriority(IntPtr hThread); - [DllImport( "kernel32", EntryPoint = "GetThreadTimes", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetThreadTimes( IntPtr hThread, ref FILETIME lpCreationTime, ref FILETIME lpExitTime, ref FILETIME lpKernelTime, ref FILETIME lpUserTime ); + [DllImport("kernel32", EntryPoint = "GetThreadTimes", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetThreadTimes(IntPtr hThread, ref FILETIME lpCreationTime, ref FILETIME lpExitTime, ref FILETIME lpKernelTime, ref FILETIME lpUserTime); - [DllImport( "kernel32", EntryPoint = "ExitThread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void ExitThread( int dwExitCode ); + [DllImport("kernel32", EntryPoint = "ExitThread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void ExitThread(int dwExitCode); - [DllImport( "kernel32", EntryPoint = "TerminateThread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int TerminateThread( IntPtr hThread, int dwExitCode ); + [DllImport("kernel32", EntryPoint = "TerminateThread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int TerminateThread(IntPtr hThread, int dwExitCode); - [DllImport( "kernel32", EntryPoint = "GetExitCodeThread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetExitCodeThread( IntPtr hThread, IntPtr lpExitCode ); + [DllImport("kernel32", EntryPoint = "GetExitCodeThread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetExitCodeThread(IntPtr hThread, IntPtr lpExitCode); - [DllImport( "kernel32", EntryPoint = "GetThreadSelectorEntry", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetThreadSelectorEntry( IntPtr hThread, int dwSelector, ref LDT_ENTRY lpSelectorEntry ); + [DllImport("kernel32", EntryPoint = "GetThreadSelectorEntry", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetThreadSelectorEntry(IntPtr hThread, int dwSelector, ref LDT_ENTRY lpSelectorEntry); // COMM declarations - [DllImport( "kernel32", EntryPoint = "SetCommState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetCommState( IntPtr hCommDev, ref DCB lpDCB ); + [DllImport("kernel32", EntryPoint = "SetCommState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetCommState(IntPtr hCommDev, ref DCB lpDCB); - [DllImport( "kernel32", EntryPoint = "SetCommTimeouts", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetCommTimeouts( IntPtr hFile, ref COMMTIMEOUTS lpCommTimeouts ); + [DllImport("kernel32", EntryPoint = "SetCommTimeouts", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetCommTimeouts(IntPtr hFile, ref COMMTIMEOUTS lpCommTimeouts); - [DllImport( "kernel32", EntryPoint = "GetCommState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCommState( int nCid, ref DCB lpDCB ); + [DllImport("kernel32", EntryPoint = "GetCommState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCommState(int nCid, ref DCB lpDCB); - [DllImport( "kernel32", EntryPoint = "GetCommTimeouts", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCommTimeouts( IntPtr hFile, ref COMMTIMEOUTS lpCommTimeouts ); + [DllImport("kernel32", EntryPoint = "GetCommTimeouts", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCommTimeouts(IntPtr hFile, ref COMMTIMEOUTS lpCommTimeouts); - [DllImport( "kernel32", EntryPoint = "PurgeComm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PurgeComm( IntPtr hFile, int dwFlags ); + [DllImport("kernel32", EntryPoint = "PurgeComm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PurgeComm(IntPtr hFile, int dwFlags); - [DllImport( "kernel32", EntryPoint = "BuildCommDCB", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int BuildCommDCB( string lpDef, ref DCB lpDCB ); + [DllImport("kernel32", EntryPoint = "BuildCommDCB", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int BuildCommDCB(string lpDef, ref DCB lpDCB); - [DllImport( "kernel32", EntryPoint = "BuildCommDCBAndTimeouts", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int BuildCommDCBAndTimeouts( string lpDef, ref DCB lpDCB, ref COMMTIMEOUTS lpCommTimeouts ); + [DllImport("kernel32", EntryPoint = "BuildCommDCBAndTimeouts", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int BuildCommDCBAndTimeouts(string lpDef, ref DCB lpDCB, ref COMMTIMEOUTS lpCommTimeouts); - [DllImport( "kernel32", EntryPoint = "TransmitCommChar", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int TransmitCommChar( int nCid, byte cChar ); + [DllImport("kernel32", EntryPoint = "TransmitCommChar", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int TransmitCommChar(int nCid, byte cChar); - [DllImport( "kernel32", EntryPoint = "SetCommBreak", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetCommBreak( int nCid ); + [DllImport("kernel32", EntryPoint = "SetCommBreak", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetCommBreak(int nCid); - [DllImport( "kernel32", EntryPoint = "SetCommMask", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetCommMask( IntPtr hFile, int dwEvtMask ); + [DllImport("kernel32", EntryPoint = "SetCommMask", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetCommMask(IntPtr hFile, int dwEvtMask); - [DllImport( "kernel32", EntryPoint = "ClearCommBreak", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ClearCommBreak( int nCid ); + [DllImport("kernel32", EntryPoint = "ClearCommBreak", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ClearCommBreak(int nCid); - [DllImport( "kernel32", EntryPoint = "ClearCommError", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ClearCommError( IntPtr hFile, IntPtr lpErrors, ref COMSTAT lpStat ); + [DllImport("kernel32", EntryPoint = "ClearCommError", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ClearCommError(IntPtr hFile, IntPtr lpErrors, ref COMSTAT lpStat); - [DllImport( "kernel32", EntryPoint = "SetupComm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetupComm( IntPtr hFile, int dwInQueue, int dwOutQueue ); + [DllImport("kernel32", EntryPoint = "SetupComm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetupComm(IntPtr hFile, int dwInQueue, int dwOutQueue); - [DllImport( "kernel32", EntryPoint = "EscapeCommFunction", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EscapeCommFunction( int nCid, int nFunc ); + [DllImport("kernel32", EntryPoint = "EscapeCommFunction", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EscapeCommFunction(int nCid, int nFunc); - [DllImport( "kernel32", EntryPoint = "GetCommMask", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCommMask( IntPtr hFile, IntPtr lpEvtMask ); + [DllImport("kernel32", EntryPoint = "GetCommMask", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCommMask(IntPtr hFile, IntPtr lpEvtMask); - [DllImport( "kernel32", EntryPoint = "GetCommProperties", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCommProperties( IntPtr hFile, ref COMMPROP lpCommProp ); + [DllImport("kernel32", EntryPoint = "GetCommProperties", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCommProperties(IntPtr hFile, ref COMMPROP lpCommProp); - [DllImport( "kernel32", EntryPoint = "GetCommModemStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCommModemStatus( IntPtr hFile, IntPtr lpModemStat ); + [DllImport("kernel32", EntryPoint = "GetCommModemStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCommModemStatus(IntPtr hFile, IntPtr lpModemStat); - [DllImport( "kernel32", EntryPoint = "WaitCommEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WaitCommEvent( IntPtr hFile, IntPtr lpEvtMask, ref OVERLAPPED lpOverlapped ); + [DllImport("kernel32", EntryPoint = "WaitCommEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WaitCommEvent(IntPtr hFile, IntPtr lpEvtMask, ref OVERLAPPED lpOverlapped); - [DllImport( "kernel32", EntryPoint = "SetTapePosition", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetTapePosition( IntPtr hDevice, int dwPositionMethod, int dwPartition, int dwOffsetLow, int dwOffsetHigh, int bimmediate ); + [DllImport("kernel32", EntryPoint = "SetTapePosition", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetTapePosition(IntPtr hDevice, int dwPositionMethod, int dwPartition, int dwOffsetLow, int dwOffsetHigh, int bimmediate); - [DllImport( "kernel32", EntryPoint = "GetTapePosition", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTapePosition( IntPtr hDevice, int dwPositionType, IntPtr lpdwPartition, IntPtr lpdwOffsetLow, IntPtr lpdwOffsetHigh ); + [DllImport("kernel32", EntryPoint = "GetTapePosition", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTapePosition(IntPtr hDevice, int dwPositionType, IntPtr lpdwPartition, IntPtr lpdwOffsetLow, IntPtr lpdwOffsetHigh); - [DllImport( "kernel32", EntryPoint = "PrepareTape", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PrepareTape( IntPtr hDevice, int dwOperation, int bimmediate ); + [DllImport("kernel32", EntryPoint = "PrepareTape", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PrepareTape(IntPtr hDevice, int dwOperation, int bimmediate); - [DllImport( "kernel32", EntryPoint = "EraseTape", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EraseTape( IntPtr hDevice, int dwEraseType, int bimmediate ); + [DllImport("kernel32", EntryPoint = "EraseTape", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EraseTape(IntPtr hDevice, int dwEraseType, int bimmediate); - [DllImport( "kernel32", EntryPoint = "CreateTapePartition", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateTapePartition( IntPtr hDevice, int dwPartitionMethod, int dwCount, int dwSize ); + [DllImport("kernel32", EntryPoint = "CreateTapePartition", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateTapePartition(IntPtr hDevice, int dwPartitionMethod, int dwCount, int dwSize); - [DllImport( "kernel32", EntryPoint = "WriteTapemark", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WriteTapemark( IntPtr hDevice, int dwTapemarkType, int dwTapemarkCount, int bimmediate ); + [DllImport("kernel32", EntryPoint = "WriteTapemark", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WriteTapemark(IntPtr hDevice, int dwTapemarkType, int dwTapemarkCount, int bimmediate); - [DllImport( "kernel32", EntryPoint = "GetTapeStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTapeStatus( IntPtr hDevice ); + [DllImport("kernel32", EntryPoint = "GetTapeStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTapeStatus(IntPtr hDevice); - [DllImport( "kernel32", EntryPoint = "GetTapeParameters", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTapeParameters( IntPtr hDevice, int dwOperation, IntPtr lpdwSize, IntPtr lpTapeInformation ); + [DllImport("kernel32", EntryPoint = "GetTapeParameters", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTapeParameters(IntPtr hDevice, int dwOperation, IntPtr lpdwSize, IntPtr lpTapeInformation); - public const int GET_TAPE_MEDIA_INFORMATION = unchecked( (int)( 0 ) ); - public const int GET_TAPE_DRIVE_INFORMATION = unchecked( (int)( 1 ) ); + public const int GET_TAPE_MEDIA_INFORMATION = unchecked((int)(0)); + public const int GET_TAPE_DRIVE_INFORMATION = unchecked((int)(1)); - [DllImport( "kernel32", EntryPoint = "SetTapeParameters", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetTapeParameters( IntPtr hDevice, int dwOperation, IntPtr lpTapeInformation ); + [DllImport("kernel32", EntryPoint = "SetTapeParameters", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetTapeParameters(IntPtr hDevice, int dwOperation, IntPtr lpTapeInformation); - public const int SET_TAPE_MEDIA_INFORMATION = unchecked( (int)( 0 ) ); - public const int SET_TAPE_DRIVE_INFORMATION = unchecked( (int)( 1 ) ); + public const int SET_TAPE_MEDIA_INFORMATION = unchecked((int)(0)); + public const int SET_TAPE_DRIVE_INFORMATION = unchecked((int)(1)); - [DllImport( "kernel32", EntryPoint = "Beep", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int Beep( int dwFreq, int dwDuration ); + [DllImport("kernel32", EntryPoint = "Beep", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int Beep(int dwFreq, int dwDuration); - [DllImport( "kernel32", EntryPoint = "MulDiv", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MulDiv( int nNumber, int nNumerator, int nDenominator ); + [DllImport("kernel32", EntryPoint = "MulDiv", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MulDiv(int nNumber, int nNumerator, int nDenominator); - [DllImport( "kernel32", EntryPoint = "GetSystemTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void GetSystemTime( ref SYSTEMTIME lpSystemTime ); + [DllImport("kernel32", EntryPoint = "GetSystemTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void GetSystemTime(ref SYSTEMTIME lpSystemTime); - [DllImport( "kernel32", EntryPoint = "SetSystemTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetSystemTime( ref SYSTEMTIME lpSystemTime ); + [DllImport("kernel32", EntryPoint = "SetSystemTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetSystemTime(ref SYSTEMTIME lpSystemTime); - [DllImport( "kernel32", EntryPoint = "GetLocalTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void GetLocalTime( ref SYSTEMTIME lpSystemTime ); + [DllImport("kernel32", EntryPoint = "GetLocalTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void GetLocalTime(ref SYSTEMTIME lpSystemTime); - [DllImport( "kernel32", EntryPoint = "SetLocalTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetLocalTime( ref SYSTEMTIME lpSystemTime ); + [DllImport("kernel32", EntryPoint = "SetLocalTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetLocalTime(ref SYSTEMTIME lpSystemTime); - [DllImport( "kernel32", EntryPoint = "GetSystemInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void GetSystemInfo( ref SYSTEM_INFO lpSystemInfo ); + [DllImport("kernel32", EntryPoint = "GetSystemInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void GetSystemInfo(ref SYSTEM_INFO lpSystemInfo); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct TIME_ZONE_INFORMATION { public int Bias; @@ -2971,165 +2971,165 @@ public struct TIME_ZONE_INFORMATION } - [DllImport( "kernel32", EntryPoint = "GetTimeZoneInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTimeZoneInformation( ref TIME_ZONE_INFORMATION lpTimeZoneInformation ); + [DllImport("kernel32", EntryPoint = "GetTimeZoneInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTimeZoneInformation(ref TIME_ZONE_INFORMATION lpTimeZoneInformation); - [DllImport( "kernel32", EntryPoint = "SetTimeZoneInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetTimeZoneInformation( ref TIME_ZONE_INFORMATION lpTimeZoneInformation ); + [DllImport("kernel32", EntryPoint = "SetTimeZoneInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetTimeZoneInformation(ref TIME_ZONE_INFORMATION lpTimeZoneInformation); // Routines to convert back and forth // between system time and file time - [DllImport( "kernel32", EntryPoint = "SystemTimeToFileTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SystemTimeToFileTime( ref SYSTEMTIME lpSystemTime, ref FILETIME lpFileTime ); + [DllImport("kernel32", EntryPoint = "SystemTimeToFileTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SystemTimeToFileTime(ref SYSTEMTIME lpSystemTime, ref FILETIME lpFileTime); - [DllImport( "kernel32", EntryPoint = "FileTimeToLocalFileTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FileTimeToLocalFileTime( ref FILETIME lpFileTime, ref FILETIME lpLocalFileTime ); + [DllImport("kernel32", EntryPoint = "FileTimeToLocalFileTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FileTimeToLocalFileTime(ref FILETIME lpFileTime, ref FILETIME lpLocalFileTime); - [DllImport( "kernel32", EntryPoint = "LocalFileTimeToFileTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LocalFileTimeToFileTime( ref FILETIME lpLocalFileTime, ref FILETIME lpFileTime ); + [DllImport("kernel32", EntryPoint = "LocalFileTimeToFileTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LocalFileTimeToFileTime(ref FILETIME lpLocalFileTime, ref FILETIME lpFileTime); - [DllImport( "kernel32", EntryPoint = "FileTimeToSystemTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FileTimeToSystemTime( ref FILETIME lpFileTime, ref SYSTEMTIME lpSystemTime ); + [DllImport("kernel32", EntryPoint = "FileTimeToSystemTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FileTimeToSystemTime(ref FILETIME lpFileTime, ref SYSTEMTIME lpSystemTime); - [DllImport( "kernel32", EntryPoint = "CompareFileTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CompareFileTime( ref FILETIME lpFileTime1, ref FILETIME lpFileTime2 ); + [DllImport("kernel32", EntryPoint = "CompareFileTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CompareFileTime(ref FILETIME lpFileTime1, ref FILETIME lpFileTime2); - [DllImport( "kernel32", EntryPoint = "FileTimeToDosDateTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FileTimeToDosDateTime( ref FILETIME lpFileTime, IntPtr lpFatDate, IntPtr lpFatTime ); + [DllImport("kernel32", EntryPoint = "FileTimeToDosDateTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FileTimeToDosDateTime(ref FILETIME lpFileTime, IntPtr lpFatDate, IntPtr lpFatTime); - [DllImport( "kernel32", EntryPoint = "DosDateTimeToFileTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DosDateTimeToFileTime( int wFatDate, int wFatTime, ref FILETIME lpFileTime ); + [DllImport("kernel32", EntryPoint = "DosDateTimeToFileTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DosDateTimeToFileTime(int wFatDate, int wFatTime, ref FILETIME lpFileTime); - [DllImport( "kernel32", EntryPoint = "GetTickCount", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetTickCount", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetTickCount(); - [DllImport( "kernel32", EntryPoint = "FormatMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FormatMessage( int dwFlags, IntPtr lpSource, int dwMessageId, int dwLanguageId, string lpBuffer, int nSize, int Arguments ); + [DllImport("kernel32", EntryPoint = "FormatMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FormatMessage(int dwFlags, IntPtr lpSource, int dwMessageId, int dwLanguageId, string lpBuffer, int nSize, int Arguments); - public const int FORMAT_MESSAGE_ALLOCATE_BUFFER = unchecked( (int)( 0x100 ) ); - public const int FORMAT_MESSAGE_IGNORE_INSERTS = unchecked( (int)( 0x200 ) ); - public const int FORMAT_MESSAGE_FROM_STRING = unchecked( (int)( 0x400 ) ); - public const int FORMAT_MESSAGE_FROM_HMODULE = unchecked( (int)( 0x800 ) ); - public const int FORMAT_MESSAGE_FROM_SYSTEM = unchecked( (int)( 0x1000 ) ); - public const int FORMAT_MESSAGE_ARGUMENT_ARRAY = unchecked( (int)( 0x2000 ) ); - public const int FORMAT_MESSAGE_MAX_WIDTH_MASK = unchecked( (int)( 0xFF ) ); + public const int FORMAT_MESSAGE_ALLOCATE_BUFFER = unchecked((int)(0x100)); + public const int FORMAT_MESSAGE_IGNORE_INSERTS = unchecked((int)(0x200)); + public const int FORMAT_MESSAGE_FROM_STRING = unchecked((int)(0x400)); + public const int FORMAT_MESSAGE_FROM_HMODULE = unchecked((int)(0x800)); + public const int FORMAT_MESSAGE_FROM_SYSTEM = unchecked((int)(0x1000)); + public const int FORMAT_MESSAGE_ARGUMENT_ARRAY = unchecked((int)(0x2000)); + public const int FORMAT_MESSAGE_MAX_WIDTH_MASK = unchecked((int)(0xFF)); - [DllImport( "kernel32", EntryPoint = "CreatePipe", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreatePipe( int phReadPipe, int phWritePipe, ref SECURITY_ATTRIBUTES lpPipeAttributes, int nSize ); + [DllImport("kernel32", EntryPoint = "CreatePipe", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreatePipe(int phReadPipe, int phWritePipe, ref SECURITY_ATTRIBUTES lpPipeAttributes, int nSize); - [DllImport( "kernel32", EntryPoint = "ConnectNamedPipe", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ConnectNamedPipe( IntPtr hNamedPipe, ref OVERLAPPED lpOverlapped ); + [DllImport("kernel32", EntryPoint = "ConnectNamedPipe", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ConnectNamedPipe(IntPtr hNamedPipe, ref OVERLAPPED lpOverlapped); - [DllImport( "kernel32", EntryPoint = "DisconnectNamedPipe", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DisconnectNamedPipe( IntPtr hNamedPipe ); + [DllImport("kernel32", EntryPoint = "DisconnectNamedPipe", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DisconnectNamedPipe(IntPtr hNamedPipe); - [DllImport( "kernel32", EntryPoint = "SetNamedPipeHandleState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetNamedPipeHandleState( IntPtr hNamedPipe, IntPtr lpMode, IntPtr lpMaxCollectionCount, IntPtr lpCollectDataTimeout ); + [DllImport("kernel32", EntryPoint = "SetNamedPipeHandleState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetNamedPipeHandleState(IntPtr hNamedPipe, IntPtr lpMode, IntPtr lpMaxCollectionCount, IntPtr lpCollectDataTimeout); - [DllImport( "kernel32", EntryPoint = "GetNamedPipeInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetNamedPipeInfo( IntPtr hNamedPipe, IntPtr lpFlags, IntPtr lpOutBufferSize, IntPtr lpInBufferSize, IntPtr lpMaxInstances ); + [DllImport("kernel32", EntryPoint = "GetNamedPipeInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetNamedPipeInfo(IntPtr hNamedPipe, IntPtr lpFlags, IntPtr lpOutBufferSize, IntPtr lpInBufferSize, IntPtr lpMaxInstances); - [DllImport( "kernel32", EntryPoint = "PeekNamedPipe", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PeekNamedPipe( IntPtr hNamedPipe, IntPtr lpBuffer, int nBufferSize, IntPtr lpBytesRead, IntPtr lpTotalBytesAvail, IntPtr lpBytesLeftThisMessage ); + [DllImport("kernel32", EntryPoint = "PeekNamedPipe", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PeekNamedPipe(IntPtr hNamedPipe, IntPtr lpBuffer, int nBufferSize, IntPtr lpBytesRead, IntPtr lpTotalBytesAvail, IntPtr lpBytesLeftThisMessage); - [DllImport( "kernel32", EntryPoint = "TransactNamedPipe", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int TransactNamedPipe( IntPtr hNamedPipe, IntPtr lpInBuffer, int nInBufferSize, IntPtr lpOutBuffer, int nOutBufferSize, IntPtr lpBytesRead, ref OVERLAPPED lpOverlapped ); + [DllImport("kernel32", EntryPoint = "TransactNamedPipe", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int TransactNamedPipe(IntPtr hNamedPipe, IntPtr lpInBuffer, int nInBufferSize, IntPtr lpOutBuffer, int nOutBufferSize, IntPtr lpBytesRead, ref OVERLAPPED lpOverlapped); - [DllImport( "kernel32", EntryPoint = "CreateMailslot", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateMailslot( string lpName, int nMaxMessageSize, int lReadTimeout, ref SECURITY_ATTRIBUTES lpSecurityAttributes ); + [DllImport("kernel32", EntryPoint = "CreateMailslot", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateMailslot(string lpName, int nMaxMessageSize, int lReadTimeout, ref SECURITY_ATTRIBUTES lpSecurityAttributes); - [DllImport( "kernel32", EntryPoint = "GetMailslotInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetMailslotInfo( IntPtr hMailslot, IntPtr lpMaxMessageSize, IntPtr lpNextSize, IntPtr lpMessageCount, IntPtr lpReadTimeout ); + [DllImport("kernel32", EntryPoint = "GetMailslotInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetMailslotInfo(IntPtr hMailslot, IntPtr lpMaxMessageSize, IntPtr lpNextSize, IntPtr lpMessageCount, IntPtr lpReadTimeout); - [DllImport( "kernel32", EntryPoint = "SetMailslotInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetMailslotInfo( IntPtr hMailslot, int lReadTimeout ); + [DllImport("kernel32", EntryPoint = "SetMailslotInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetMailslotInfo(IntPtr hMailslot, int lReadTimeout); - [DllImport( "kernel32", EntryPoint = "MapViewOfFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MapViewOfFile( IntPtr hFileMappingObject, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, int dwNumberOfBytesToMap ); + [DllImport("kernel32", EntryPoint = "MapViewOfFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MapViewOfFile(IntPtr hFileMappingObject, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, int dwNumberOfBytesToMap); - [DllImport( "kernel32", EntryPoint = "FlushViewOfFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FlushViewOfFile( IntPtr lpBaseAddress, int dwNumberOfBytesToFlush ); + [DllImport("kernel32", EntryPoint = "FlushViewOfFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FlushViewOfFile(IntPtr lpBaseAddress, int dwNumberOfBytesToFlush); - [DllImport( "kernel32", EntryPoint = "UnmapViewOfFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int UnmapViewOfFile( IntPtr lpBaseAddress ); + [DllImport("kernel32", EntryPoint = "UnmapViewOfFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int UnmapViewOfFile(IntPtr lpBaseAddress); - [DllImport( "kernel32", EntryPoint = "lstrcmp", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int lstrcmp( string lpString1, string lpString2 ); + [DllImport("kernel32", EntryPoint = "lstrcmp", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int lstrcmp(string lpString1, string lpString2); - [DllImport( "kernel32", EntryPoint = "lstrcmpi", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int lstrcmpi( string lpString1, string lpString2 ); + [DllImport("kernel32", EntryPoint = "lstrcmpi", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int lstrcmpi(string lpString1, string lpString2); - [DllImport( "kernel32", EntryPoint = "lstrlen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int lstrlen( string lpString ); + [DllImport("kernel32", EntryPoint = "lstrlen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int lstrlen(string lpString); - [DllImport( "kernel32", EntryPoint = "_lopen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int lopen( string lpPathName, int iReadWrite ); + [DllImport("kernel32", EntryPoint = "_lopen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int lopen(string lpPathName, int iReadWrite); - [DllImport( "kernel32", EntryPoint = "_lclose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int lclose( IntPtr hFile ); + [DllImport("kernel32", EntryPoint = "_lclose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int lclose(IntPtr hFile); - [DllImport( "kernel32", EntryPoint = "_lcreat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int lcreat( string lpPathName, int iAttribute ); + [DllImport("kernel32", EntryPoint = "_lcreat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int lcreat(string lpPathName, int iAttribute); - [DllImport( "kernel32", EntryPoint = "_llseek", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int llseek( IntPtr hFile, int lOffset, int iOrigin ); + [DllImport("kernel32", EntryPoint = "_llseek", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int llseek(IntPtr hFile, int lOffset, int iOrigin); - [DllImport( "kernel32", EntryPoint = "_lread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int lread( IntPtr hFile, IntPtr lpBuffer, int wBytes ); + [DllImport("kernel32", EntryPoint = "_lread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int lread(IntPtr hFile, IntPtr lpBuffer, int wBytes); - [DllImport( "kernel32", EntryPoint = "_lwrite", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int lwrite( IntPtr hFile, string lpBuffer, int wBytes ); + [DllImport("kernel32", EntryPoint = "_lwrite", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int lwrite(IntPtr hFile, string lpBuffer, int wBytes); - [DllImport( "kernel32", EntryPoint = "_hread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int hread( IntPtr hFile, IntPtr lpBuffer, int lBytes ); + [DllImport("kernel32", EntryPoint = "_hread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int hread(IntPtr hFile, IntPtr lpBuffer, int lBytes); - [DllImport( "kernel32", EntryPoint = "_hwrite", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int hwrite( IntPtr hFile, string lpBuffer, int lBytes ); + [DllImport("kernel32", EntryPoint = "_hwrite", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int hwrite(IntPtr hFile, string lpBuffer, int lBytes); - [DllImport( "kernel32", EntryPoint = "TlsAlloc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "TlsAlloc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int TlsAlloc(); - public const int TLS_OUT_OF_INDEXES = unchecked( (int)( 0xFFFF ) ); + public const int TLS_OUT_OF_INDEXES = unchecked((int)(0xFFFF)); - [DllImport( "kernel32", EntryPoint = "TlsGetValue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int TlsGetValue( int dwTlsIndex ); + [DllImport("kernel32", EntryPoint = "TlsGetValue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int TlsGetValue(int dwTlsIndex); - [DllImport( "kernel32", EntryPoint = "TlsSetValue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int TlsSetValue( int dwTlsIndex, IntPtr lpTlsValue ); + [DllImport("kernel32", EntryPoint = "TlsSetValue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int TlsSetValue(int dwTlsIndex, IntPtr lpTlsValue); - [DllImport( "kernel32", EntryPoint = "TlsFree", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int TlsFree( int dwTlsIndex ); + [DllImport("kernel32", EntryPoint = "TlsFree", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int TlsFree(int dwTlsIndex); - [DllImport( "kernel32", EntryPoint = "SleepEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SleepEx( int dwMilliseconds, int bAlertable ); + [DllImport("kernel32", EntryPoint = "SleepEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SleepEx(int dwMilliseconds, int bAlertable); - [DllImport( "kernel32", EntryPoint = "WaitForSingleObjectEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WaitForSingleObjectEx( IntPtr hHandle, int dwMilliseconds, int bAlertable ); + [DllImport("kernel32", EntryPoint = "WaitForSingleObjectEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WaitForSingleObjectEx(IntPtr hHandle, int dwMilliseconds, int bAlertable); - [DllImport( "kernel32", EntryPoint = "WaitForMultipleObjectsEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WaitForMultipleObjectsEx( int nCount, IntPtr lpHandles, int bWaitAll, int dwMilliseconds, int bAlertable ); + [DllImport("kernel32", EntryPoint = "WaitForMultipleObjectsEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WaitForMultipleObjectsEx(int nCount, IntPtr lpHandles, int bWaitAll, int dwMilliseconds, int bAlertable); - [DllImport( "kernel32", EntryPoint = "BackupRead", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int BackupRead( IntPtr hFile, ref byte lpBuffer, int nNumberOfBytesToRead, IntPtr lpNumberOfBytesRead, int bAbort, int bProcessSecurity, IntPtr lpContext ); + [DllImport("kernel32", EntryPoint = "BackupRead", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int BackupRead(IntPtr hFile, ref byte lpBuffer, int nNumberOfBytesToRead, IntPtr lpNumberOfBytesRead, int bAbort, int bProcessSecurity, IntPtr lpContext); - [DllImport( "kernel32", EntryPoint = "BackupSeek", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int BackupSeek( IntPtr hFile, int dwLowBytesToSeek, int dwHighBytesToSeek, IntPtr lpdwLowByteSeeked, IntPtr lpdwHighByteSeeked, IntPtr lpContext ); + [DllImport("kernel32", EntryPoint = "BackupSeek", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int BackupSeek(IntPtr hFile, int dwLowBytesToSeek, int dwHighBytesToSeek, IntPtr lpdwLowByteSeeked, IntPtr lpdwHighByteSeeked, IntPtr lpContext); - [DllImport( "kernel32", EntryPoint = "BackupWrite", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int BackupWrite( IntPtr hFile, ref byte lpBuffer, int nNumberOfBytesToWrite, IntPtr lpNumberOfBytesWritten, int bAbort, int bProcessSecurity, IntPtr lpContext ); + [DllImport("kernel32", EntryPoint = "BackupWrite", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int BackupWrite(IntPtr hFile, ref byte lpBuffer, int nNumberOfBytesToWrite, IntPtr lpNumberOfBytesWritten, int bAbort, int bProcessSecurity, IntPtr lpContext); // Stream ID type - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct WIN32_STREAM_ID { public int dwStreamID; @@ -3141,29 +3141,29 @@ public struct WIN32_STREAM_ID } // Stream IDs - public const int BACKUP_DATA = unchecked( (int)( 0x1 ) ); - public const int BACKUP_EA_DATA = unchecked( (int)( 0x2 ) ); - public const int BACKUP_SECURITY_DATA = unchecked( (int)( 0x3 ) ); - public const int BACKUP_ALTERNATE_DATA = unchecked( (int)( 0x4 ) ); - public const int BACKUP_LINK = unchecked( (int)( 0x5 ) ); + public const int BACKUP_DATA = unchecked((int)(0x1)); + public const int BACKUP_EA_DATA = unchecked((int)(0x2)); + public const int BACKUP_SECURITY_DATA = unchecked((int)(0x3)); + public const int BACKUP_ALTERNATE_DATA = unchecked((int)(0x4)); + public const int BACKUP_LINK = unchecked((int)(0x5)); // Stream Attributes - public const int STREAM_MODIFIED_WHEN_READ = unchecked( (int)( 0x1 ) ); - public const int STREAM_CONTAINS_SECURITY = unchecked( (int)( 0x2 ) ); + public const int STREAM_MODIFIED_WHEN_READ = unchecked((int)(0x1)); + public const int STREAM_CONTAINS_SECURITY = unchecked((int)(0x2)); // Dual Mode API below this line. Dual Mode Types also included. - public const int STARTF_USESHOWWINDOW = unchecked( (int)( 0x1 ) ); - public const int STARTF_USESIZE = unchecked( (int)( 0x2 ) ); - public const int STARTF_USEPOSITION = unchecked( (int)( 0x4 ) ); - public const int STARTF_USECOUNTCHARS = unchecked( (int)( 0x8 ) ); - public const int STARTF_USEFILLATTRIBUTE = unchecked( (int)( 0x10 ) ); - public const int STARTF_RUNFULLSCREEN = unchecked( (int)( 0x20 ) );// ignored for non-x86 platforms - public const int STARTF_FORCEONFEEDBACK = unchecked( (int)( 0x40 ) ); - public const int STARTF_FORCEOFFFEEDBACK = unchecked( (int)( 0x80 ) ); - public const int STARTF_USESTDHANDLES = unchecked( (int)( 0x100 ) ); - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int STARTF_USESHOWWINDOW = unchecked((int)(0x1)); + public const int STARTF_USESIZE = unchecked((int)(0x2)); + public const int STARTF_USEPOSITION = unchecked((int)(0x4)); + public const int STARTF_USECOUNTCHARS = unchecked((int)(0x8)); + public const int STARTF_USEFILLATTRIBUTE = unchecked((int)(0x10)); + public const int STARTF_RUNFULLSCREEN = unchecked((int)(0x20));// ignored for non-x86 platforms + public const int STARTF_FORCEONFEEDBACK = unchecked((int)(0x40)); + public const int STARTF_FORCEOFFFEEDBACK = unchecked((int)(0x80)); + public const int STARTF_USESTDHANDLES = unchecked((int)(0x100)); + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct STARTUPINFO { public int cb; @@ -3186,9 +3186,9 @@ public struct STARTUPINFO public IntPtr hStdError; } - public const int SHUTDOWN_NORETRY = unchecked( (int)( 0x1 ) ); + public const int SHUTDOWN_NORETRY = unchecked((int)(0x1)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct WIN32_FIND_DATA { public int dwFileAttributes; @@ -3199,396 +3199,396 @@ public struct WIN32_FIND_DATA public int nFileSizeLow; public int dwReserved0; public int dwReserved1; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = MAX_PATH )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAX_PATH)] public string cFileName; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = 14 )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)] public string cAlternate; } - [DllImport( "kernel32", EntryPoint = "CreateMutex", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateMutex( ref SECURITY_ATTRIBUTES lpMutexAttributes, int bInitialOwner, string lpName ); + [DllImport("kernel32", EntryPoint = "CreateMutex", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateMutex(ref SECURITY_ATTRIBUTES lpMutexAttributes, int bInitialOwner, string lpName); - [DllImport( "kernel32", EntryPoint = "OpenMutex", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenMutex( int dwDesiredAccess, int bInheritHandle, string lpName ); + [DllImport("kernel32", EntryPoint = "OpenMutex", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenMutex(int dwDesiredAccess, int bInheritHandle, string lpName); - [DllImport( "kernel32", EntryPoint = "CreateEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateEvent( ref SECURITY_ATTRIBUTES lpEventAttributes, int bManualReset, int bInitialState, string lpName ); + [DllImport("kernel32", EntryPoint = "CreateEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateEvent(ref SECURITY_ATTRIBUTES lpEventAttributes, int bManualReset, int bInitialState, string lpName); - [DllImport( "kernel32", EntryPoint = "OpenEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenEvent( int dwDesiredAccess, int bInheritHandle, string lpName ); + [DllImport("kernel32", EntryPoint = "OpenEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenEvent(int dwDesiredAccess, int bInheritHandle, string lpName); - [DllImport( "kernel32", EntryPoint = "CreateSemaphore", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateSemaphore( ref SECURITY_ATTRIBUTES lpSemaphoreAttributes, int lInitialCount, int lMaximumCount, string lpName ); + [DllImport("kernel32", EntryPoint = "CreateSemaphore", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateSemaphore(ref SECURITY_ATTRIBUTES lpSemaphoreAttributes, int lInitialCount, int lMaximumCount, string lpName); - [DllImport( "kernel32", EntryPoint = "OpenSemaphore", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenSemaphore( int dwDesiredAccess, int bInheritHandle, string lpName ); + [DllImport("kernel32", EntryPoint = "OpenSemaphore", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenSemaphore(int dwDesiredAccess, int bInheritHandle, string lpName); - [DllImport( "kernel32", EntryPoint = "CreateFileMapping", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateFileMapping( IntPtr hFile, ref SECURITY_ATTRIBUTES lpFileMappigAttributes, int flProtect, int dwMaximumSizeHigh, int dwMaximumSizeLow, string lpName ); + [DllImport("kernel32", EntryPoint = "CreateFileMapping", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateFileMapping(IntPtr hFile, ref SECURITY_ATTRIBUTES lpFileMappigAttributes, int flProtect, int dwMaximumSizeHigh, int dwMaximumSizeLow, string lpName); - [DllImport( "kernel32", EntryPoint = "OpenFileMapping", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenFileMapping( int dwDesiredAccess, int bInheritHandle, string lpName ); + [DllImport("kernel32", EntryPoint = "OpenFileMapping", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenFileMapping(int dwDesiredAccess, int bInheritHandle, string lpName); - [DllImport( "kernel32", EntryPoint = "GetLogicalDriveStrings", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetLogicalDriveStrings( int nBufferLength, string lpBuffer ); + [DllImport("kernel32", EntryPoint = "GetLogicalDriveStrings", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetLogicalDriveStrings(int nBufferLength, string lpBuffer); - [DllImport( "kernel32", EntryPoint = "IsBadReadPtr", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsBadReadPtr( IntPtr lp, int ucb ); + [DllImport("kernel32", EntryPoint = "IsBadReadPtr", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsBadReadPtr(IntPtr lp, int ucb); - [DllImport( "kernel32", EntryPoint = "IsBadWritePtr", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsBadWritePtr( IntPtr lp, int ucb ); + [DllImport("kernel32", EntryPoint = "IsBadWritePtr", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsBadWritePtr(IntPtr lp, int ucb); - [DllImport( "kernel32", EntryPoint = "IsBadStringPtr", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsBadStringPtr( string lpsz, int ucchMax ); + [DllImport("kernel32", EntryPoint = "IsBadStringPtr", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsBadStringPtr(string lpsz, int ucchMax); - [DllImport( "kernel32", EntryPoint = "IsBadHugeReadPtr", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsBadHugeReadPtr( IntPtr lp, int ucb ); + [DllImport("kernel32", EntryPoint = "IsBadHugeReadPtr", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsBadHugeReadPtr(IntPtr lp, int ucb); - [DllImport( "kernel32", EntryPoint = "IsBadHugeWritePtr", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsBadHugeWritePtr( IntPtr lp, int ucb ); + [DllImport("kernel32", EntryPoint = "IsBadHugeWritePtr", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsBadHugeWritePtr(IntPtr lp, int ucb); - [DllImport( "advapi32.dll", EntryPoint = "LookupAccountSid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LookupAccountSid( string lpSystemName, object Sid, string name, int cbName, string ReferencedDomainName, int cbReferencedDomainName, int peUse ); + [DllImport("advapi32.dll", EntryPoint = "LookupAccountSid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LookupAccountSid(string lpSystemName, object Sid, string name, int cbName, string ReferencedDomainName, int cbReferencedDomainName, int peUse); - [DllImport( "advapi32.dll", EntryPoint = "LookupAccountName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LookupAccountName( string lpSystemName, string lpAccountName, int Sid, int cbSid, string ReferencedDomainName, int cbReferencedDomainName, int peUse ); + [DllImport("advapi32.dll", EntryPoint = "LookupAccountName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LookupAccountName(string lpSystemName, string lpAccountName, int Sid, int cbSid, string ReferencedDomainName, int cbReferencedDomainName, int peUse); - [DllImport( "advapi32.dll", EntryPoint = "LookupPrivilegeValue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LookupPrivilegeValue( string lpSystemName, string lpName, ref LARGE_INTEGER lpLuid ); + [DllImport("advapi32.dll", EntryPoint = "LookupPrivilegeValue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LookupPrivilegeValue(string lpSystemName, string lpName, ref LARGE_INTEGER lpLuid); - [DllImport( "advapi32.dll", EntryPoint = "LookupPrivilegeName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LookupPrivilegeName( string lpSystemName, ref LARGE_INTEGER lpLuid, string lpName, int cbName ); + [DllImport("advapi32.dll", EntryPoint = "LookupPrivilegeName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LookupPrivilegeName(string lpSystemName, ref LARGE_INTEGER lpLuid, string lpName, int cbName); - [DllImport( "advapi32.dll", EntryPoint = "LookupPrivilegeDisplayName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LookupPrivilegeDisplayName( string lpSystemName, string lpName, string lpDisplayName, int cbDisplayName, IntPtr lpLanguageID ); + [DllImport("advapi32.dll", EntryPoint = "LookupPrivilegeDisplayName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LookupPrivilegeDisplayName(string lpSystemName, string lpName, string lpDisplayName, int cbDisplayName, IntPtr lpLanguageID); - [DllImport( "advapi32.dll", EntryPoint = "AllocateLocallyUniqueId", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AllocateLocallyUniqueId( LARGE_INTEGER Luid ); + [DllImport("advapi32.dll", EntryPoint = "AllocateLocallyUniqueId", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AllocateLocallyUniqueId(LARGE_INTEGER Luid); - [DllImport( "kernel32", EntryPoint = "GetComputerName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetComputerName( string lpBuffer, int nSize ); + [DllImport("kernel32", EntryPoint = "GetComputerName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetComputerName(string lpBuffer, int nSize); - [DllImport( "kernel32", EntryPoint = "SetComputerName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetComputerName( string lpComputerName ); + [DllImport("kernel32", EntryPoint = "SetComputerName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetComputerName(string lpComputerName); - [DllImport( "advapi32.dll", EntryPoint = "GetUserName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetUserName( string lpBuffer, int nSize ); + [DllImport("advapi32.dll", EntryPoint = "GetUserName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetUserName(string lpBuffer, int nSize); // Performance counter API's - [DllImport( "kernel32", EntryPoint = "QueryPerformanceCounter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int QueryPerformanceCounter( ref LARGE_INTEGER lpPerformanceCount ); + [DllImport("kernel32", EntryPoint = "QueryPerformanceCounter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int QueryPerformanceCounter(ref LARGE_INTEGER lpPerformanceCount); - [DllImport( "kernel32", EntryPoint = "QueryPerformanceFrequency", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int QueryPerformanceFrequency( ref LARGE_INTEGER lpFrequency ); + [DllImport("kernel32", EntryPoint = "QueryPerformanceFrequency", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int QueryPerformanceFrequency(ref LARGE_INTEGER lpFrequency); // Abnormal termination codes - public const int TC_NORMAL = unchecked( (int)( 0 ) ); - public const int TC_HARDERR = unchecked( (int)( 1 ) ); - public const int TC_GP_TRAP = unchecked( (int)( 2 ) ); - public const int TC_SIGNAL = unchecked( (int)( 3 ) ); + public const int TC_NORMAL = unchecked((int)(0)); + public const int TC_HARDERR = unchecked((int)(1)); + public const int TC_GP_TRAP = unchecked((int)(2)); + public const int TC_SIGNAL = unchecked((int)(3)); // Procedure declarations, constant definitions, and macros // for the NLS component // String Length Maximums - public const int MAX_LEADBYTES = unchecked( (int)( 12 ) );// 5 ranges, 2 bytes ea., 0 term. + public const int MAX_LEADBYTES = unchecked((int)(12));// 5 ranges, 2 bytes ea., 0 term. // MBCS and Unicode Translation Flags. - public const int MB_PRECOMPOSED = unchecked( (int)( 0x1 ) );// use precomposed chars - public const int MB_COMPOSITE = unchecked( (int)( 0x2 ) );// use composite chars - public const int MB_USEGLYPHCHARS = unchecked( (int)( 0x4 ) );// use glyph chars, not ctrl chars + public const int MB_PRECOMPOSED = unchecked((int)(0x1));// use precomposed chars + public const int MB_COMPOSITE = unchecked((int)(0x2));// use composite chars + public const int MB_USEGLYPHCHARS = unchecked((int)(0x4));// use glyph chars, not ctrl chars - public const int WC_DEFAULTCHECK = unchecked( (int)( 0x100 ) );// check for default char - public const int WC_COMPOSITECHECK = unchecked( (int)( 0x200 ) );// convert composite to precomposed - public const int WC_DISCARDNS = unchecked( (int)( 0x10 ) );// discard non-spacing chars - public const int WC_SEPCHARS = unchecked( (int)( 0x20 ) );// generate separate chars - public const int WC_DEFAULTCHAR = unchecked( (int)( 0x40 ) );// replace w/ default char + public const int WC_DEFAULTCHECK = unchecked((int)(0x100));// check for default char + public const int WC_COMPOSITECHECK = unchecked((int)(0x200));// convert composite to precomposed + public const int WC_DISCARDNS = unchecked((int)(0x10));// discard non-spacing chars + public const int WC_SEPCHARS = unchecked((int)(0x20));// generate separate chars + public const int WC_DEFAULTCHAR = unchecked((int)(0x40));// replace w/ default char // Character Type Flags. - public const int CT_CTYPE1 = unchecked( (int)( 0x1 ) );// ctype 1 information - public const int CT_CTYPE2 = unchecked( (int)( 0x2 ) );// ctype 2 information - public const int CT_CTYPE3 = unchecked( (int)( 0x4 ) );// ctype 3 information + public const int CT_CTYPE1 = unchecked((int)(0x1));// ctype 1 information + public const int CT_CTYPE2 = unchecked((int)(0x2));// ctype 2 information + public const int CT_CTYPE3 = unchecked((int)(0x4));// ctype 3 information // CType 1 Flag Bits. - public const int C1_UPPER = unchecked( (int)( 0x1 ) );// upper case - public const int C1_LOWER = unchecked( (int)( 0x2 ) );// lower case - public const int C1_DIGIT = unchecked( (int)( 0x4 ) );// decimal digits - public const int C1_SPACE = unchecked( (int)( 0x8 ) );// spacing characters - public const int C1_PUNCT = unchecked( (int)( 0x10 ) );// punctuation characters - public const int C1_CNTRL = unchecked( (int)( 0x20 ) );// control characters - public const int C1_BLANK = unchecked( (int)( 0x40 ) );// blank characters - public const int C1_XDIGIT = unchecked( (int)( 0x80 ) );// other digits - public const int C1_ALPHA = unchecked( (int)( 0x100 ) );// any letter + public const int C1_UPPER = unchecked((int)(0x1));// upper case + public const int C1_LOWER = unchecked((int)(0x2));// lower case + public const int C1_DIGIT = unchecked((int)(0x4));// decimal digits + public const int C1_SPACE = unchecked((int)(0x8));// spacing characters + public const int C1_PUNCT = unchecked((int)(0x10));// punctuation characters + public const int C1_CNTRL = unchecked((int)(0x20));// control characters + public const int C1_BLANK = unchecked((int)(0x40));// blank characters + public const int C1_XDIGIT = unchecked((int)(0x80));// other digits + public const int C1_ALPHA = unchecked((int)(0x100));// any letter // CType 2 Flag Bits. - public const int C2_LEFTTORIGHT = unchecked( (int)( 0x1 ) );// left to right - public const int C2_RIGHTTOLEFT = unchecked( (int)( 0x2 ) );// right to left + public const int C2_LEFTTORIGHT = unchecked((int)(0x1));// left to right + public const int C2_RIGHTTOLEFT = unchecked((int)(0x2));// right to left - public const int C2_EUROPENUMBER = unchecked( (int)( 0x3 ) );// European number, digit - public const int C2_EUROPESEPARATOR = unchecked( (int)( 0x4 ) );// European numeric separator - public const int C2_EUROPETERMINATOR = unchecked( (int)( 0x5 ) );// European numeric terminator - public const int C2_ARABICNUMBER = unchecked( (int)( 0x6 ) );// Arabic number - public const int C2_COMMONSEPARATOR = unchecked( (int)( 0x7 ) );// common numeric separator + public const int C2_EUROPENUMBER = unchecked((int)(0x3));// European number, digit + public const int C2_EUROPESEPARATOR = unchecked((int)(0x4));// European numeric separator + public const int C2_EUROPETERMINATOR = unchecked((int)(0x5));// European numeric terminator + public const int C2_ARABICNUMBER = unchecked((int)(0x6));// Arabic number + public const int C2_COMMONSEPARATOR = unchecked((int)(0x7));// common numeric separator - public const int C2_BLOCKSEPARATOR = unchecked( (int)( 0x8 ) );// block separator - public const int C2_SEGMENTSEPARATOR = unchecked( (int)( 0x9 ) );// segment separator - public const int C2_WHITESPACE = unchecked( (int)( 0xA ) );// white space - public const int C2_OTHERNEUTRAL = unchecked( (int)( 0xB ) );// other neutrals + public const int C2_BLOCKSEPARATOR = unchecked((int)(0x8));// block separator + public const int C2_SEGMENTSEPARATOR = unchecked((int)(0x9));// segment separator + public const int C2_WHITESPACE = unchecked((int)(0xA));// white space + public const int C2_OTHERNEUTRAL = unchecked((int)(0xB));// other neutrals - public const int C2_NOTAPPLICABLE = unchecked( (int)( 0x0 ) );// no implicit directionality + public const int C2_NOTAPPLICABLE = unchecked((int)(0x0));// no implicit directionality // CType 3 Flag Bits. - public const int C3_NONSPACING = unchecked( (int)( 0x1 ) );// nonspacing character - public const int C3_DIACRITIC = unchecked( (int)( 0x2 ) );// diacritic mark - public const int C3_VOWELMARK = unchecked( (int)( 0x4 ) );// vowel mark - public const int C3_SYMBOL = unchecked( (int)( 0x8 ) );// symbols + public const int C3_NONSPACING = unchecked((int)(0x1));// nonspacing character + public const int C3_DIACRITIC = unchecked((int)(0x2));// diacritic mark + public const int C3_VOWELMARK = unchecked((int)(0x4));// vowel mark + public const int C3_SYMBOL = unchecked((int)(0x8));// symbols - public const int C3_NOTAPPLICABLE = unchecked( (int)( 0x0 ) );// ctype 3 is not applicable + public const int C3_NOTAPPLICABLE = unchecked((int)(0x0));// ctype 3 is not applicable // String Flags. - public const int NORM_IGNORECASE = unchecked( (int)( 0x1 ) );// ignore case - public const int NORM_IGNORENONSPACE = unchecked( (int)( 0x2 ) );// ignore nonspacing chars - public const int NORM_IGNORESYMBOLS = unchecked( (int)( 0x4 ) );// ignore symbols + public const int NORM_IGNORECASE = unchecked((int)(0x1));// ignore case + public const int NORM_IGNORENONSPACE = unchecked((int)(0x2));// ignore nonspacing chars + public const int NORM_IGNORESYMBOLS = unchecked((int)(0x4));// ignore symbols // Locale Independent Mapping Flags. - public const int MAP_FOLDCZONE = unchecked( (int)( 0x10 ) );// fold compatibility zone chars - public const int MAP_PRECOMPOSED = unchecked( (int)( 0x20 ) );// convert to precomposed chars - public const int MAP_COMPOSITE = unchecked( (int)( 0x40 ) );// convert to composite chars - public const int MAP_FOLDDIGITS = unchecked( (int)( 0x80 ) );// all digits to ASCII 0-9 + public const int MAP_FOLDCZONE = unchecked((int)(0x10));// fold compatibility zone chars + public const int MAP_PRECOMPOSED = unchecked((int)(0x20));// convert to precomposed chars + public const int MAP_COMPOSITE = unchecked((int)(0x40));// convert to composite chars + public const int MAP_FOLDDIGITS = unchecked((int)(0x80));// all digits to ASCII 0-9 // Locale Dependent Mapping Flags. - public const int LCMAP_LOWERCASE = unchecked( (int)( 0x100 ) );// lower case letters - public const int LCMAP_UPPERCASE = unchecked( (int)( 0x200 ) );// upper case letters - public const int LCMAP_SORTKEY = unchecked( (int)( 0x400 ) );// WC sort key (normalize) - public const int LCMAP_BYTEREV = unchecked( (int)( 0x800 ) );// byte reversal + public const int LCMAP_LOWERCASE = unchecked((int)(0x100));// lower case letters + public const int LCMAP_UPPERCASE = unchecked((int)(0x200));// upper case letters + public const int LCMAP_SORTKEY = unchecked((int)(0x400));// WC sort key (normalize) + public const int LCMAP_BYTEREV = unchecked((int)(0x800));// byte reversal // Sorting Flags. - public const int SORT_STRINGSORT = unchecked( (int)( 0x1000 ) );// use string sort method + public const int SORT_STRINGSORT = unchecked((int)(0x1000));// use string sort method // Code Page Default Values. - public const int CP_ACP = unchecked( (int)( 0 ) );// default to ANSI code page - public const int CP_OEMCP = unchecked( (int)( 1 ) );// default to OEM code page + public const int CP_ACP = unchecked((int)(0));// default to ANSI code page + public const int CP_OEMCP = unchecked((int)(1));// default to OEM code page // Country Codes. - public const int CTRY_DEFAULT = unchecked( (int)( 0 ) ); - - public const int CTRY_AUSTRALIA = unchecked( (int)( 61 ) );// Australia - public const int CTRY_AUSTRIA = unchecked( (int)( 43 ) );// Austria - public const int CTRY_BELGIUM = unchecked( (int)( 32 ) );// Belgium - public const int CTRY_BRAZIL = unchecked( (int)( 55 ) );// Brazil - public const int CTRY_CANADA = unchecked( (int)( 2 ) );// Canada - public const int CTRY_DENMARK = unchecked( (int)( 45 ) );// Denmark - public const int CTRY_FINLAND = unchecked( (int)( 358 ) );// Finland - public const int CTRY_FRANCE = unchecked( (int)( 33 ) );// France - public const int CTRY_GERMANY = unchecked( (int)( 49 ) );// Germany - public const int CTRY_ICELAND = unchecked( (int)( 354 ) );// Iceland - public const int CTRY_IRELAND = unchecked( (int)( 353 ) );// Ireland - public const int CTRY_ITALY = unchecked( (int)( 39 ) );// Italy - public const int CTRY_JAPAN = unchecked( (int)( 81 ) );// Japan - public const int CTRY_MEXICO = unchecked( (int)( 52 ) );// Mexico - public const int CTRY_NETHERLANDS = unchecked( (int)( 31 ) );// Netherlands - public const int CTRY_NEW_ZEALAND = unchecked( (int)( 64 ) );// New Zealand - public const int CTRY_NORWAY = unchecked( (int)( 47 ) );// Norway - public const int CTRY_PORTUGAL = unchecked( (int)( 351 ) );// Portugal - public const int CTRY_PRCHINA = unchecked( (int)( 86 ) );// PR China - public const int CTRY_SOUTH_KOREA = unchecked( (int)( 82 ) );// South Korea - public const int CTRY_SPAIN = unchecked( (int)( 34 ) );// Spain - public const int CTRY_SWEDEN = unchecked( (int)( 46 ) );// Sweden - public const int CTRY_SWITZERLAND = unchecked( (int)( 41 ) );// Switzerland - public const int CTRY_TAIWAN = unchecked( (int)( 886 ) );// Taiwan - public const int CTRY_UNITED_KINGDOM = unchecked( (int)( 44 ) );// United Kingdom - public const int CTRY_UNITED_STATES = unchecked( (int)( 1 ) );// United States + public const int CTRY_DEFAULT = unchecked((int)(0)); + + public const int CTRY_AUSTRALIA = unchecked((int)(61));// Australia + public const int CTRY_AUSTRIA = unchecked((int)(43));// Austria + public const int CTRY_BELGIUM = unchecked((int)(32));// Belgium + public const int CTRY_BRAZIL = unchecked((int)(55));// Brazil + public const int CTRY_CANADA = unchecked((int)(2));// Canada + public const int CTRY_DENMARK = unchecked((int)(45));// Denmark + public const int CTRY_FINLAND = unchecked((int)(358));// Finland + public const int CTRY_FRANCE = unchecked((int)(33));// France + public const int CTRY_GERMANY = unchecked((int)(49));// Germany + public const int CTRY_ICELAND = unchecked((int)(354));// Iceland + public const int CTRY_IRELAND = unchecked((int)(353));// Ireland + public const int CTRY_ITALY = unchecked((int)(39));// Italy + public const int CTRY_JAPAN = unchecked((int)(81));// Japan + public const int CTRY_MEXICO = unchecked((int)(52));// Mexico + public const int CTRY_NETHERLANDS = unchecked((int)(31));// Netherlands + public const int CTRY_NEW_ZEALAND = unchecked((int)(64));// New Zealand + public const int CTRY_NORWAY = unchecked((int)(47));// Norway + public const int CTRY_PORTUGAL = unchecked((int)(351));// Portugal + public const int CTRY_PRCHINA = unchecked((int)(86));// PR China + public const int CTRY_SOUTH_KOREA = unchecked((int)(82));// South Korea + public const int CTRY_SPAIN = unchecked((int)(34));// Spain + public const int CTRY_SWEDEN = unchecked((int)(46));// Sweden + public const int CTRY_SWITZERLAND = unchecked((int)(41));// Switzerland + public const int CTRY_TAIWAN = unchecked((int)(886));// Taiwan + public const int CTRY_UNITED_KINGDOM = unchecked((int)(44));// United Kingdom + public const int CTRY_UNITED_STATES = unchecked((int)(1));// United States // Locale Types. // These types are used for the GetLocaleInfoW NLS API routine. // LOCALE_NOUSEROVERRIDE is also used in GetTimeFormatW and GetDateFormatW. - public const int LOCALE_NOUSEROVERRIDE = unchecked( (int)( 0x80000000 ) );// do not use user overrides - - public const int LOCALE_ILANGUAGE = unchecked( (int)( 0x1 ) );// language id - public const int LOCALE_SLANGUAGE = unchecked( (int)( 0x2 ) );// localized name of language - public const int LOCALE_SENGLANGUAGE = unchecked( (int)( 0x1001 ) );// English name of language - public const int LOCALE_SABBREVLANGNAME = unchecked( (int)( 0x3 ) );// abbreviated language name - public const int LOCALE_SNATIVELANGNAME = unchecked( (int)( 0x4 ) );// native name of language - public const int LOCALE_ICOUNTRY = unchecked( (int)( 0x5 ) );// country code - public const int LOCALE_SCOUNTRY = unchecked( (int)( 0x6 ) );// localized name of country - public const int LOCALE_SENGCOUNTRY = unchecked( (int)( 0x1002 ) );// English name of country - public const int LOCALE_SABBREVCTRYNAME = unchecked( (int)( 0x7 ) );// abbreviated country name - public const int LOCALE_SNATIVECTRYNAME = unchecked( (int)( 0x8 ) );// native name of country - public const int LOCALE_IDEFAULTLANGUAGE = unchecked( (int)( 0x9 ) );// default language id - public const int LOCALE_IDEFAULTCOUNTRY = unchecked( (int)( 0xA ) );// default country code - public const int LOCALE_IDEFAULTCODEPAGE = unchecked( (int)( 0xB ) );// default code page - - public const int LOCALE_SLIST = unchecked( (int)( 0xC ) );// list item separator - public const int LOCALE_IMEASURE = unchecked( (int)( 0xD ) );// 0 = metric, 1 = US - - public const int LOCALE_SDECIMAL = unchecked( (int)( 0xE ) );// decimal separator - public const int LOCALE_STHOUSAND = unchecked( (int)( 0xF ) );// thousand separator - public const int LOCALE_SGROUPING = unchecked( (int)( 0x10 ) );// digit grouping - public const int LOCALE_IDIGITS = unchecked( (int)( 0x11 ) );// number of fractional digits - public const int LOCALE_ILZERO = unchecked( (int)( 0x12 ) );// leading zeros for decimal - public const int LOCALE_SNATIVEDIGITS = unchecked( (int)( 0x13 ) );// native ascii 0-9 - - public const int LOCALE_SCURRENCY = unchecked( (int)( 0x14 ) );// local monetary symbol - public const int LOCALE_SINTLSYMBOL = unchecked( (int)( 0x15 ) );// intl monetary symbol - public const int LOCALE_SMONDECIMALSEP = unchecked( (int)( 0x16 ) );// monetary decimal separator - public const int LOCALE_SMONTHOUSANDSEP = unchecked( (int)( 0x17 ) );// monetary thousand separator - public const int LOCALE_SMONGROUPING = unchecked( (int)( 0x18 ) );// monetary grouping - public const int LOCALE_ICURRDIGITS = unchecked( (int)( 0x19 ) );// # local monetary digits - public const int LOCALE_IINTLCURRDIGITS = unchecked( (int)( 0x1A ) );// # intl monetary digits - public const int LOCALE_ICURRENCY = unchecked( (int)( 0x1B ) );// positive currency mode - public const int LOCALE_INEGCURR = unchecked( (int)( 0x1C ) );// negative currency mode - - public const int LOCALE_SDATE = unchecked( (int)( 0x1D ) );// date separator - public const int LOCALE_STIME = unchecked( (int)( 0x1E ) );// time separator - public const int LOCALE_SSHORTDATE = unchecked( (int)( 0x1F ) );// short date format string - public const int LOCALE_SLONGDATE = unchecked( (int)( 0x20 ) );// long date format string - public const int LOCALE_STIMEFORMAT = unchecked( (int)( 0x1003 ) );// time format string - public const int LOCALE_IDATE = unchecked( (int)( 0x21 ) );// short date format ordering - public const int LOCALE_ILDATE = unchecked( (int)( 0x22 ) );// long date format ordering - public const int LOCALE_ITIME = unchecked( (int)( 0x23 ) );// time format specifier - public const int LOCALE_ICENTURY = unchecked( (int)( 0x24 ) );// century format specifier - public const int LOCALE_ITLZERO = unchecked( (int)( 0x25 ) );// leading zeros in time field - public const int LOCALE_IDAYLZERO = unchecked( (int)( 0x26 ) );// leading zeros in day field - public const int LOCALE_IMONLZERO = unchecked( (int)( 0x27 ) );// leading zeros in month field - public const int LOCALE_S1159 = unchecked( (int)( 0x28 ) );// AM designator - public const int LOCALE_S2359 = unchecked( (int)( 0x29 ) );// PM designator - - public const int LOCALE_SDAYNAME1 = unchecked( (int)( 0x2A ) );// long name for Monday - public const int LOCALE_SDAYNAME2 = unchecked( (int)( 0x2B ) );// long name for Tuesday - public const int LOCALE_SDAYNAME3 = unchecked( (int)( 0x2C ) );// long name for Wednesday - public const int LOCALE_SDAYNAME4 = unchecked( (int)( 0x2D ) );// long name for Thursday - public const int LOCALE_SDAYNAME5 = unchecked( (int)( 0x2E ) );// long name for Friday - public const int LOCALE_SDAYNAME6 = unchecked( (int)( 0x2F ) );// long name for Saturday - public const int LOCALE_SDAYNAME7 = unchecked( (int)( 0x30 ) );// long name for Sunday - public const int LOCALE_SABBREVDAYNAME1 = unchecked( (int)( 0x31 ) );// abbreviated name for Monday - public const int LOCALE_SABBREVDAYNAME2 = unchecked( (int)( 0x32 ) );// abbreviated name for Tuesday - public const int LOCALE_SABBREVDAYNAME3 = unchecked( (int)( 0x33 ) );// abbreviated name for Wednesday - public const int LOCALE_SABBREVDAYNAME4 = unchecked( (int)( 0x34 ) );// abbreviated name for Thursday - public const int LOCALE_SABBREVDAYNAME5 = unchecked( (int)( 0x35 ) );// abbreviated name for Friday - public const int LOCALE_SABBREVDAYNAME6 = unchecked( (int)( 0x36 ) );// abbreviated name for Saturday - public const int LOCALE_SABBREVDAYNAME7 = unchecked( (int)( 0x37 ) );// abbreviated name for Sunday - public const int LOCALE_SMONTHNAME1 = unchecked( (int)( 0x38 ) );// long name for January - public const int LOCALE_SMONTHNAME2 = unchecked( (int)( 0x39 ) );// long name for February - public const int LOCALE_SMONTHNAME3 = unchecked( (int)( 0x3A ) );// long name for March - public const int LOCALE_SMONTHNAME4 = unchecked( (int)( 0x3B ) );// long name for April - public const int LOCALE_SMONTHNAME5 = unchecked( (int)( 0x3C ) );// long name for May - public const int LOCALE_SMONTHNAME6 = unchecked( (int)( 0x3D ) );// long name for June - public const int LOCALE_SMONTHNAME7 = unchecked( (int)( 0x3E ) );// long name for July - public const int LOCALE_SMONTHNAME8 = unchecked( (int)( 0x3F ) );// long name for August - public const int LOCALE_SMONTHNAME9 = unchecked( (int)( 0x40 ) );// long name for September - public const int LOCALE_SMONTHNAME10 = unchecked( (int)( 0x41 ) );// long name for October - public const int LOCALE_SMONTHNAME11 = unchecked( (int)( 0x42 ) );// long name for November - public const int LOCALE_SMONTHNAME12 = unchecked( (int)( 0x43 ) );// long name for December - public const int LOCALE_SABBREVMONTHNAME1 = unchecked( (int)( 0x44 ) );// abbreviated name for January - public const int LOCALE_SABBREVMONTHNAME2 = unchecked( (int)( 0x45 ) );// abbreviated name for February - public const int LOCALE_SABBREVMONTHNAME3 = unchecked( (int)( 0x46 ) );// abbreviated name for March - public const int LOCALE_SABBREVMONTHNAME4 = unchecked( (int)( 0x47 ) );// abbreviated name for April - public const int LOCALE_SABBREVMONTHNAME5 = unchecked( (int)( 0x48 ) );// abbreviated name for May - public const int LOCALE_SABBREVMONTHNAME6 = unchecked( (int)( 0x49 ) );// abbreviated name for June - public const int LOCALE_SABBREVMONTHNAME7 = unchecked( (int)( 0x4A ) );// abbreviated name for July - public const int LOCALE_SABBREVMONTHNAME8 = unchecked( (int)( 0x4B ) );// abbreviated name for August - public const int LOCALE_SABBREVMONTHNAME9 = unchecked( (int)( 0x4C ) );// abbreviated name for September - public const int LOCALE_SABBREVMONTHNAME10 = unchecked( (int)( 0x4D ) );// abbreviated name for October - public const int LOCALE_SABBREVMONTHNAME11 = unchecked( (int)( 0x4E ) );// abbreviated name for November - public const int LOCALE_SABBREVMONTHNAME12 = unchecked( (int)( 0x4F ) );// abbreviated name for December - public const int LOCALE_SABBREVMONTHNAME13 = unchecked( (int)( 0x100F ) ); - - public const int LOCALE_SPOSITIVESIGN = unchecked( (int)( 0x50 ) );// positive sign - public const int LOCALE_SNEGATIVESIGN = unchecked( (int)( 0x51 ) );// negative sign - public const int LOCALE_IPOSSIGNPOSN = unchecked( (int)( 0x52 ) );// positive sign position - public const int LOCALE_INEGSIGNPOSN = unchecked( (int)( 0x53 ) );// negative sign position - public const int LOCALE_IPOSSYMPRECEDES = unchecked( (int)( 0x54 ) );// mon sym precedes pos amt - public const int LOCALE_IPOSSEPBYSPACE = unchecked( (int)( 0x55 ) );// mon sym sep by space from pos amt - public const int LOCALE_INEGSYMPRECEDES = unchecked( (int)( 0x56 ) );// mon sym precedes neg amt - public const int LOCALE_INEGSEPBYSPACE = unchecked( (int)( 0x57 ) );// mon sym sep by space from neg amt + public const int LOCALE_NOUSEROVERRIDE = unchecked((int)(0x80000000));// do not use user overrides + + public const int LOCALE_ILANGUAGE = unchecked((int)(0x1));// language id + public const int LOCALE_SLANGUAGE = unchecked((int)(0x2));// localized name of language + public const int LOCALE_SENGLANGUAGE = unchecked((int)(0x1001));// English name of language + public const int LOCALE_SABBREVLANGNAME = unchecked((int)(0x3));// abbreviated language name + public const int LOCALE_SNATIVELANGNAME = unchecked((int)(0x4));// native name of language + public const int LOCALE_ICOUNTRY = unchecked((int)(0x5));// country code + public const int LOCALE_SCOUNTRY = unchecked((int)(0x6));// localized name of country + public const int LOCALE_SENGCOUNTRY = unchecked((int)(0x1002));// English name of country + public const int LOCALE_SABBREVCTRYNAME = unchecked((int)(0x7));// abbreviated country name + public const int LOCALE_SNATIVECTRYNAME = unchecked((int)(0x8));// native name of country + public const int LOCALE_IDEFAULTLANGUAGE = unchecked((int)(0x9));// default language id + public const int LOCALE_IDEFAULTCOUNTRY = unchecked((int)(0xA));// default country code + public const int LOCALE_IDEFAULTCODEPAGE = unchecked((int)(0xB));// default code page + + public const int LOCALE_SLIST = unchecked((int)(0xC));// list item separator + public const int LOCALE_IMEASURE = unchecked((int)(0xD));// 0 = metric, 1 = US + + public const int LOCALE_SDECIMAL = unchecked((int)(0xE));// decimal separator + public const int LOCALE_STHOUSAND = unchecked((int)(0xF));// thousand separator + public const int LOCALE_SGROUPING = unchecked((int)(0x10));// digit grouping + public const int LOCALE_IDIGITS = unchecked((int)(0x11));// number of fractional digits + public const int LOCALE_ILZERO = unchecked((int)(0x12));// leading zeros for decimal + public const int LOCALE_SNATIVEDIGITS = unchecked((int)(0x13));// native ascii 0-9 + + public const int LOCALE_SCURRENCY = unchecked((int)(0x14));// local monetary symbol + public const int LOCALE_SINTLSYMBOL = unchecked((int)(0x15));// intl monetary symbol + public const int LOCALE_SMONDECIMALSEP = unchecked((int)(0x16));// monetary decimal separator + public const int LOCALE_SMONTHOUSANDSEP = unchecked((int)(0x17));// monetary thousand separator + public const int LOCALE_SMONGROUPING = unchecked((int)(0x18));// monetary grouping + public const int LOCALE_ICURRDIGITS = unchecked((int)(0x19));// # local monetary digits + public const int LOCALE_IINTLCURRDIGITS = unchecked((int)(0x1A));// # intl monetary digits + public const int LOCALE_ICURRENCY = unchecked((int)(0x1B));// positive currency mode + public const int LOCALE_INEGCURR = unchecked((int)(0x1C));// negative currency mode + + public const int LOCALE_SDATE = unchecked((int)(0x1D));// date separator + public const int LOCALE_STIME = unchecked((int)(0x1E));// time separator + public const int LOCALE_SSHORTDATE = unchecked((int)(0x1F));// short date format string + public const int LOCALE_SLONGDATE = unchecked((int)(0x20));// long date format string + public const int LOCALE_STIMEFORMAT = unchecked((int)(0x1003));// time format string + public const int LOCALE_IDATE = unchecked((int)(0x21));// short date format ordering + public const int LOCALE_ILDATE = unchecked((int)(0x22));// long date format ordering + public const int LOCALE_ITIME = unchecked((int)(0x23));// time format specifier + public const int LOCALE_ICENTURY = unchecked((int)(0x24));// century format specifier + public const int LOCALE_ITLZERO = unchecked((int)(0x25));// leading zeros in time field + public const int LOCALE_IDAYLZERO = unchecked((int)(0x26));// leading zeros in day field + public const int LOCALE_IMONLZERO = unchecked((int)(0x27));// leading zeros in month field + public const int LOCALE_S1159 = unchecked((int)(0x28));// AM designator + public const int LOCALE_S2359 = unchecked((int)(0x29));// PM designator + + public const int LOCALE_SDAYNAME1 = unchecked((int)(0x2A));// long name for Monday + public const int LOCALE_SDAYNAME2 = unchecked((int)(0x2B));// long name for Tuesday + public const int LOCALE_SDAYNAME3 = unchecked((int)(0x2C));// long name for Wednesday + public const int LOCALE_SDAYNAME4 = unchecked((int)(0x2D));// long name for Thursday + public const int LOCALE_SDAYNAME5 = unchecked((int)(0x2E));// long name for Friday + public const int LOCALE_SDAYNAME6 = unchecked((int)(0x2F));// long name for Saturday + public const int LOCALE_SDAYNAME7 = unchecked((int)(0x30));// long name for Sunday + public const int LOCALE_SABBREVDAYNAME1 = unchecked((int)(0x31));// abbreviated name for Monday + public const int LOCALE_SABBREVDAYNAME2 = unchecked((int)(0x32));// abbreviated name for Tuesday + public const int LOCALE_SABBREVDAYNAME3 = unchecked((int)(0x33));// abbreviated name for Wednesday + public const int LOCALE_SABBREVDAYNAME4 = unchecked((int)(0x34));// abbreviated name for Thursday + public const int LOCALE_SABBREVDAYNAME5 = unchecked((int)(0x35));// abbreviated name for Friday + public const int LOCALE_SABBREVDAYNAME6 = unchecked((int)(0x36));// abbreviated name for Saturday + public const int LOCALE_SABBREVDAYNAME7 = unchecked((int)(0x37));// abbreviated name for Sunday + public const int LOCALE_SMONTHNAME1 = unchecked((int)(0x38));// long name for January + public const int LOCALE_SMONTHNAME2 = unchecked((int)(0x39));// long name for February + public const int LOCALE_SMONTHNAME3 = unchecked((int)(0x3A));// long name for March + public const int LOCALE_SMONTHNAME4 = unchecked((int)(0x3B));// long name for April + public const int LOCALE_SMONTHNAME5 = unchecked((int)(0x3C));// long name for May + public const int LOCALE_SMONTHNAME6 = unchecked((int)(0x3D));// long name for June + public const int LOCALE_SMONTHNAME7 = unchecked((int)(0x3E));// long name for July + public const int LOCALE_SMONTHNAME8 = unchecked((int)(0x3F));// long name for August + public const int LOCALE_SMONTHNAME9 = unchecked((int)(0x40));// long name for September + public const int LOCALE_SMONTHNAME10 = unchecked((int)(0x41));// long name for October + public const int LOCALE_SMONTHNAME11 = unchecked((int)(0x42));// long name for November + public const int LOCALE_SMONTHNAME12 = unchecked((int)(0x43));// long name for December + public const int LOCALE_SABBREVMONTHNAME1 = unchecked((int)(0x44));// abbreviated name for January + public const int LOCALE_SABBREVMONTHNAME2 = unchecked((int)(0x45));// abbreviated name for February + public const int LOCALE_SABBREVMONTHNAME3 = unchecked((int)(0x46));// abbreviated name for March + public const int LOCALE_SABBREVMONTHNAME4 = unchecked((int)(0x47));// abbreviated name for April + public const int LOCALE_SABBREVMONTHNAME5 = unchecked((int)(0x48));// abbreviated name for May + public const int LOCALE_SABBREVMONTHNAME6 = unchecked((int)(0x49));// abbreviated name for June + public const int LOCALE_SABBREVMONTHNAME7 = unchecked((int)(0x4A));// abbreviated name for July + public const int LOCALE_SABBREVMONTHNAME8 = unchecked((int)(0x4B));// abbreviated name for August + public const int LOCALE_SABBREVMONTHNAME9 = unchecked((int)(0x4C));// abbreviated name for September + public const int LOCALE_SABBREVMONTHNAME10 = unchecked((int)(0x4D));// abbreviated name for October + public const int LOCALE_SABBREVMONTHNAME11 = unchecked((int)(0x4E));// abbreviated name for November + public const int LOCALE_SABBREVMONTHNAME12 = unchecked((int)(0x4F));// abbreviated name for December + public const int LOCALE_SABBREVMONTHNAME13 = unchecked((int)(0x100F)); + + public const int LOCALE_SPOSITIVESIGN = unchecked((int)(0x50));// positive sign + public const int LOCALE_SNEGATIVESIGN = unchecked((int)(0x51));// negative sign + public const int LOCALE_IPOSSIGNPOSN = unchecked((int)(0x52));// positive sign position + public const int LOCALE_INEGSIGNPOSN = unchecked((int)(0x53));// negative sign position + public const int LOCALE_IPOSSYMPRECEDES = unchecked((int)(0x54));// mon sym precedes pos amt + public const int LOCALE_IPOSSEPBYSPACE = unchecked((int)(0x55));// mon sym sep by space from pos amt + public const int LOCALE_INEGSYMPRECEDES = unchecked((int)(0x56));// mon sym precedes neg amt + public const int LOCALE_INEGSEPBYSPACE = unchecked((int)(0x57));// mon sym sep by space from neg amt // Time Flags for GetTimeFormatW. - public const int TIME_NOMINUTESORSECONDS = unchecked( (int)( 0x1 ) );// do not use minutes or seconds - public const int TIME_NOSECONDS = unchecked( (int)( 0x2 ) );// do not use seconds - public const int TIME_NOTIMEMARKER = unchecked( (int)( 0x4 ) );// do not use time marker - public const int TIME_FORCE24HOURFORMAT = unchecked( (int)( 0x8 ) );// always use 24 hour format + public const int TIME_NOMINUTESORSECONDS = unchecked((int)(0x1));// do not use minutes or seconds + public const int TIME_NOSECONDS = unchecked((int)(0x2));// do not use seconds + public const int TIME_NOTIMEMARKER = unchecked((int)(0x4));// do not use time marker + public const int TIME_FORCE24HOURFORMAT = unchecked((int)(0x8));// always use 24 hour format // Date Flags for GetDateFormatW. - public const int DATE_SHORTDATE = unchecked( (int)( 0x1 ) );// use short date picture - public const int DATE_LONGDATE = unchecked( (int)( 0x2 ) );// use long date picture + public const int DATE_SHORTDATE = unchecked((int)(0x1));// use short date picture + public const int DATE_LONGDATE = unchecked((int)(0x2));// use long date picture // Code Page Dependent APIs - [DllImport( "kernel32", EntryPoint = "IsValidCodePage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsValidCodePage( int CodePage ); + [DllImport("kernel32", EntryPoint = "IsValidCodePage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsValidCodePage(int CodePage); - [DllImport( "kernel32", EntryPoint = "GetACP", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetACP", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetACP(); - [DllImport( "kernel32", EntryPoint = "GetOEMCP", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetOEMCP", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetOEMCP(); - [DllImport( "kernel32", EntryPoint = "GetCPInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCPInfo( int CodePage, ref CPINFO lpCPInfo ); + [DllImport("kernel32", EntryPoint = "GetCPInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCPInfo(int CodePage, ref CPINFO lpCPInfo); - [DllImport( "kernel32", EntryPoint = "IsDBCSLeadByte", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsDBCSLeadByte( byte bTestChar ); + [DllImport("kernel32", EntryPoint = "IsDBCSLeadByte", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsDBCSLeadByte(byte bTestChar); - [DllImport( "kernel32", EntryPoint = "MultiByteToWideChar", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MultiByteToWideChar( int CodePage, int dwFlags, string lpMultiByteStr, int cchMultiByte, string lpWideCharStr, int cchWideChar ); + [DllImport("kernel32", EntryPoint = "MultiByteToWideChar", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MultiByteToWideChar(int CodePage, int dwFlags, string lpMultiByteStr, int cchMultiByte, string lpWideCharStr, int cchWideChar); - [DllImport( "kernel32", EntryPoint = "WideCharToMultiByte", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WideCharToMultiByte( int CodePage, int dwFlags, string lpWideCharStr, int cchWideChar, string lpMultiByteStr, int cchMultiByte, string lpDefaultChar, IntPtr lpUsedDefaultChar ); + [DllImport("kernel32", EntryPoint = "WideCharToMultiByte", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WideCharToMultiByte(int CodePage, int dwFlags, string lpWideCharStr, int cchWideChar, string lpMultiByteStr, int cchMultiByte, string lpDefaultChar, IntPtr lpUsedDefaultChar); // Locale Dependent APIs - [DllImport( "kernel32", EntryPoint = "CompareString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CompareString( int Locale, int dwCmpFlags, string lpString1, int cchCount1, string lpString2, int cchCount2 ); + [DllImport("kernel32", EntryPoint = "CompareString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CompareString(int Locale, int dwCmpFlags, string lpString1, int cchCount1, string lpString2, int cchCount2); - [DllImport( "kernel32", EntryPoint = "LCMapString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LCMapString( int Locale, int dwMapFlags, string lpSrcStr, int cchSrc, string lpDestStr, int cchDest ); + [DllImport("kernel32", EntryPoint = "LCMapString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LCMapString(int Locale, int dwMapFlags, string lpSrcStr, int cchSrc, string lpDestStr, int cchDest); - [DllImport( "kernel32", EntryPoint = "GetLocaleInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetLocaleInfo( int Locale, int LCType, string lpLCData, int cchData ); + [DllImport("kernel32", EntryPoint = "GetLocaleInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetLocaleInfo(int Locale, int LCType, string lpLCData, int cchData); - [DllImport( "kernel32", EntryPoint = "GetTimeFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTimeFormat( int Locale, int dwFlags, ref SYSTEMTIME lpTime, string lpFormat, string lpTimeStr, int cchTime ); + [DllImport("kernel32", EntryPoint = "GetTimeFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTimeFormat(int Locale, int dwFlags, ref SYSTEMTIME lpTime, string lpFormat, string lpTimeStr, int cchTime); - [DllImport( "kernel32", EntryPoint = "GetDateFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetDateFormat( int Locale, int dwFlags, ref SYSTEMTIME lpDate, string lpFormat, string lpDateStr, int cchDate ); + [DllImport("kernel32", EntryPoint = "GetDateFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetDateFormat(int Locale, int dwFlags, ref SYSTEMTIME lpDate, string lpFormat, string lpDateStr, int cchDate); - [DllImport( "kernel32", EntryPoint = "SetThreadLocale", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetThreadLocale( int Locale ); + [DllImport("kernel32", EntryPoint = "SetThreadLocale", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetThreadLocale(int Locale); - [DllImport( "kernel32", EntryPoint = "GetSystemDefaultLangID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetSystemDefaultLangID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetSystemDefaultLangID(); - [DllImport( "kernel32", EntryPoint = "GetUserDefaultLangID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetUserDefaultLangID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetUserDefaultLangID(); - [DllImport( "kernel32", EntryPoint = "GetSystemDefaultLCID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetSystemDefaultLCID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetSystemDefaultLCID(); - [DllImport( "kernel32", EntryPoint = "GetUserDefaultLCID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetUserDefaultLCID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetUserDefaultLCID(); // Locale Independent APIs - [DllImport( "kernel32", EntryPoint = "GetStringTypeA", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Winapi )] - public static extern int GetStringTypeA( int lcid, int dwInfoType, string lpSrcStr, int cchSrc, IntPtr lpCharType ); + [DllImport("kernel32", EntryPoint = "GetStringTypeA", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)] + public static extern int GetStringTypeA(int lcid, int dwInfoType, string lpSrcStr, int cchSrc, IntPtr lpCharType); - [DllImport( "kernel32", EntryPoint = "FoldString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FoldString( int dwMapFlags, string lpSrcStr, int cchSrc, string lpDestStr, int cchDest ); + [DllImport("kernel32", EntryPoint = "FoldString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FoldString(int dwMapFlags, string lpSrcStr, int cchSrc, string lpDestStr, int cchDest); // ************************************************************************* // * * @@ -3602,66 +3602,66 @@ public struct WIN32_FIND_DATA // * // * These types are used for the GetALTCalendarInfoW NLS API routine. // */ - public const int MAX_DEFAULTCHAR = unchecked( (int)( 2 ) ); - public const int CAL_ICALINTVALUE = unchecked( (int)( 0x1 ) );// calendar type - public const int CAL_SCALNAME = unchecked( (int)( 0x2 ) );// native name of calendar - public const int CAL_IYEAROFFSETRANGE = unchecked( (int)( 0x3 ) );// starting years of eras - public const int CAL_SERASTRING = unchecked( (int)( 0x4 ) );// era name for IYearOffsetRanges - public const int CAL_SSHORTDATE = unchecked( (int)( 0x5 ) );// Integer date format string - public const int CAL_SLONGDATE = unchecked( (int)( 0x6 ) );// long date format string - public const int CAL_SDAYNAME1 = unchecked( (int)( 0x7 ) );// native name for Monday - public const int CAL_SDAYNAME2 = unchecked( (int)( 0x8 ) );// native name for Tuesday - public const int CAL_SDAYNAME3 = unchecked( (int)( 0x9 ) );// native name for Wednesday - public const int CAL_SDAYNAME4 = unchecked( (int)( 0xA ) );// native name for Thursday - public const int CAL_SDAYNAME5 = unchecked( (int)( 0xB ) );// native name for Friday - public const int CAL_SDAYNAME6 = unchecked( (int)( 0xC ) );// native name for Saturday - public const int CAL_SDAYNAME7 = unchecked( (int)( 0xD ) );// native name for Sunday - public const int CAL_SABBREVDAYNAME1 = unchecked( (int)( 0xE ) );// abbreviated name for Monday - public const int CAL_SABBREVDAYNAME2 = unchecked( (int)( 0xF ) );// abbreviated name for Tuesday - public const int CAL_SABBREVDAYNAME3 = unchecked( (int)( 0x10 ) );// abbreviated name for Wednesday - public const int CAL_SABBREVDAYNAME4 = unchecked( (int)( 0x11 ) );// abbreviated name for Thursday - public const int CAL_SABBREVDAYNAME5 = unchecked( (int)( 0x12 ) );// abbreviated name for Friday - public const int CAL_SABBREVDAYNAME6 = unchecked( (int)( 0x13 ) );// abbreviated name for Saturday - public const int CAL_SABBREVDAYNAME7 = unchecked( (int)( 0x14 ) );// abbreviated name for Sunday - public const int CAL_SMONTHNAME1 = unchecked( (int)( 0x15 ) );// native name for January - public const int CAL_SMONTHNAME2 = unchecked( (int)( 0x16 ) );// native name for February - public const int CAL_SMONTHNAME3 = unchecked( (int)( 0x17 ) );// native name for March - public const int CAL_SMONTHNAME4 = unchecked( (int)( 0x18 ) );// native name for April - public const int CAL_SMONTHNAME5 = unchecked( (int)( 0x19 ) );// native name for May - public const int CAL_SMONTHNAME6 = unchecked( (int)( 0x1A ) );// native name for June - public const int CAL_SMONTHNAME7 = unchecked( (int)( 0x1B ) );// native name for July - public const int CAL_SMONTHNAME8 = unchecked( (int)( 0x1C ) );// native name for August - public const int CAL_SMONTHNAME9 = unchecked( (int)( 0x1D ) );// native name for September - public const int CAL_SMONTHNAME10 = unchecked( (int)( 0x1E ) );// native name for October - public const int CAL_SMONTHNAME11 = unchecked( (int)( 0x1F ) );// native name for November - public const int CAL_SMONTHNAME12 = unchecked( (int)( 0x20 ) );// native name for December - public const int CAL_SMONTHNAME13 = unchecked( (int)( 0x21 ) );// native name for 13th month (if any) - public const int CAL_SABBREVMONTHNAME1 = unchecked( (int)( 0x22 ) );// abbreviated name for January - public const int CAL_SABBREVMONTHNAME2 = unchecked( (int)( 0x23 ) );// abbreviated name for February - public const int CAL_SABBREVMONTHNAME3 = unchecked( (int)( 0x24 ) );// abbreviated name for March - public const int CAL_SABBREVMONTHNAME4 = unchecked( (int)( 0x25 ) );// abbreviated name for April - public const int CAL_SABBREVMONTHNAME5 = unchecked( (int)( 0x26 ) );// abbreviated name for May - public const int CAL_SABBREVMONTHNAME6 = unchecked( (int)( 0x27 ) );// abbreviated name for June - public const int CAL_SABBREVMONTHNAME7 = unchecked( (int)( 0x28 ) );// abbreviated name for July - public const int CAL_SABBREVMONTHNAME8 = unchecked( (int)( 0x29 ) );// abbreviated name for August - public const int CAL_SABBREVMONTHNAME9 = unchecked( (int)( 0x2A ) );// abbreviated name for September - public const int CAL_SABBREVMONTHNAME10 = unchecked( (int)( 0x2B ) );// abbreviated name for October - public const int CAL_SABBREVMONTHNAME11 = unchecked( (int)( 0x2C ) );// abbreviated name for November - public const int CAL_SABBREVMONTHNAME12 = unchecked( (int)( 0x2D ) );// abbreviated name for December - public const int CAL_SABBREVMONTHNAME13 = unchecked( (int)( 0x2E ) );// abbreviated name for 13th month (if any) + public const int MAX_DEFAULTCHAR = unchecked((int)(2)); + public const int CAL_ICALINTVALUE = unchecked((int)(0x1));// calendar type + public const int CAL_SCALNAME = unchecked((int)(0x2));// native name of calendar + public const int CAL_IYEAROFFSETRANGE = unchecked((int)(0x3));// starting years of eras + public const int CAL_SERASTRING = unchecked((int)(0x4));// era name for IYearOffsetRanges + public const int CAL_SSHORTDATE = unchecked((int)(0x5));// Integer date format string + public const int CAL_SLONGDATE = unchecked((int)(0x6));// long date format string + public const int CAL_SDAYNAME1 = unchecked((int)(0x7));// native name for Monday + public const int CAL_SDAYNAME2 = unchecked((int)(0x8));// native name for Tuesday + public const int CAL_SDAYNAME3 = unchecked((int)(0x9));// native name for Wednesday + public const int CAL_SDAYNAME4 = unchecked((int)(0xA));// native name for Thursday + public const int CAL_SDAYNAME5 = unchecked((int)(0xB));// native name for Friday + public const int CAL_SDAYNAME6 = unchecked((int)(0xC));// native name for Saturday + public const int CAL_SDAYNAME7 = unchecked((int)(0xD));// native name for Sunday + public const int CAL_SABBREVDAYNAME1 = unchecked((int)(0xE));// abbreviated name for Monday + public const int CAL_SABBREVDAYNAME2 = unchecked((int)(0xF));// abbreviated name for Tuesday + public const int CAL_SABBREVDAYNAME3 = unchecked((int)(0x10));// abbreviated name for Wednesday + public const int CAL_SABBREVDAYNAME4 = unchecked((int)(0x11));// abbreviated name for Thursday + public const int CAL_SABBREVDAYNAME5 = unchecked((int)(0x12));// abbreviated name for Friday + public const int CAL_SABBREVDAYNAME6 = unchecked((int)(0x13));// abbreviated name for Saturday + public const int CAL_SABBREVDAYNAME7 = unchecked((int)(0x14));// abbreviated name for Sunday + public const int CAL_SMONTHNAME1 = unchecked((int)(0x15));// native name for January + public const int CAL_SMONTHNAME2 = unchecked((int)(0x16));// native name for February + public const int CAL_SMONTHNAME3 = unchecked((int)(0x17));// native name for March + public const int CAL_SMONTHNAME4 = unchecked((int)(0x18));// native name for April + public const int CAL_SMONTHNAME5 = unchecked((int)(0x19));// native name for May + public const int CAL_SMONTHNAME6 = unchecked((int)(0x1A));// native name for June + public const int CAL_SMONTHNAME7 = unchecked((int)(0x1B));// native name for July + public const int CAL_SMONTHNAME8 = unchecked((int)(0x1C));// native name for August + public const int CAL_SMONTHNAME9 = unchecked((int)(0x1D));// native name for September + public const int CAL_SMONTHNAME10 = unchecked((int)(0x1E));// native name for October + public const int CAL_SMONTHNAME11 = unchecked((int)(0x1F));// native name for November + public const int CAL_SMONTHNAME12 = unchecked((int)(0x20));// native name for December + public const int CAL_SMONTHNAME13 = unchecked((int)(0x21));// native name for 13th month (if any) + public const int CAL_SABBREVMONTHNAME1 = unchecked((int)(0x22));// abbreviated name for January + public const int CAL_SABBREVMONTHNAME2 = unchecked((int)(0x23));// abbreviated name for February + public const int CAL_SABBREVMONTHNAME3 = unchecked((int)(0x24));// abbreviated name for March + public const int CAL_SABBREVMONTHNAME4 = unchecked((int)(0x25));// abbreviated name for April + public const int CAL_SABBREVMONTHNAME5 = unchecked((int)(0x26));// abbreviated name for May + public const int CAL_SABBREVMONTHNAME6 = unchecked((int)(0x27));// abbreviated name for June + public const int CAL_SABBREVMONTHNAME7 = unchecked((int)(0x28));// abbreviated name for July + public const int CAL_SABBREVMONTHNAME8 = unchecked((int)(0x29));// abbreviated name for August + public const int CAL_SABBREVMONTHNAME9 = unchecked((int)(0x2A));// abbreviated name for September + public const int CAL_SABBREVMONTHNAME10 = unchecked((int)(0x2B));// abbreviated name for October + public const int CAL_SABBREVMONTHNAME11 = unchecked((int)(0x2C));// abbreviated name for November + public const int CAL_SABBREVMONTHNAME12 = unchecked((int)(0x2D));// abbreviated name for December + public const int CAL_SABBREVMONTHNAME13 = unchecked((int)(0x2E));// abbreviated name for 13th month (if any) // // * Calendar Enumeration Value. // */ - public const int ENUM_ALL_CALENDARS = unchecked( (int)( 0xFFFF ) );// enumerate all calendars + public const int ENUM_ALL_CALENDARS = unchecked((int)(0xFFFF));// enumerate all calendars // // * Calendar ID Values. // */ - public const int CAL_GREGORIAN = unchecked( (int)( 1 ) );// Gregorian (localized) calendar - public const int CAL_GREGORIAN_US = unchecked( (int)( 2 ) );// Gregorian (U.S.) calendar - public const int CAL_JAPAN = unchecked( (int)( 3 ) );// Japanese Emperor Era calendar - public const int CAL_TAIWAN = unchecked( (int)( 4 ) );// Taiwan Region Era calendar - public const int CAL_KOREA = unchecked( (int)( 5 ) );// Korean Tangun Era calendar + public const int CAL_GREGORIAN = unchecked((int)(1));// Gregorian (localized) calendar + public const int CAL_GREGORIAN_US = unchecked((int)(2));// Gregorian (U.S.) calendar + public const int CAL_JAPAN = unchecked((int)(3));// Japanese Emperor Era calendar + public const int CAL_TAIWAN = unchecked((int)(4));// Taiwan Region Era calendar + public const int CAL_KOREA = unchecked((int)(5));// Korean Tangun Era calendar // *************************************************************************** Typedefs // * @@ -3671,7 +3671,7 @@ public struct WIN32_FIND_DATA // * CP Info. // */ - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CPINFO { public int MaxCharSize;// max length (Byte) of a char @@ -3679,7 +3679,7 @@ public struct CPINFO public int LeadByte;// lead byte ranges } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct NUMBERFMT { public int NumDigits;// number of decimal digits @@ -3693,7 +3693,7 @@ public struct NUMBERFMT // * Currency format. // */ - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CURRENCYFMT { public int NumDigits;// number of decimal digits @@ -3707,38 +3707,38 @@ public struct CURRENCYFMT } - [DllImport( "KERNEL32", EntryPoint = "EnumTimeFormats", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumTimeFormats( IntPtr lpTimeFmtEnumProc, int Locale, int dwFlags ); + [DllImport("KERNEL32", EntryPoint = "EnumTimeFormats", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumTimeFormats(IntPtr lpTimeFmtEnumProc, int Locale, int dwFlags); - [DllImport( "KERNEL32", EntryPoint = "EnumDateFormats", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumDateFormats( IntPtr lpDateFmtEnumProc, int Locale, int dwFlags ); + [DllImport("KERNEL32", EntryPoint = "EnumDateFormats", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumDateFormats(IntPtr lpDateFmtEnumProc, int Locale, int dwFlags); - [DllImport( "KERNEL32", EntryPoint = "IsValidLocale", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsValidLocale( int Locale, int dwFlags ); + [DllImport("KERNEL32", EntryPoint = "IsValidLocale", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsValidLocale(int Locale, int dwFlags); - [DllImport( "KERNEL32", EntryPoint = "ConvertDefaultLocale", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ConvertDefaultLocale( int Locale ); + [DllImport("KERNEL32", EntryPoint = "ConvertDefaultLocale", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ConvertDefaultLocale(int Locale); - [DllImport( "KERNEL32", EntryPoint = "GetThreadLocale", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("KERNEL32", EntryPoint = "GetThreadLocale", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetThreadLocale(); - [DllImport( "KERNEL32", EntryPoint = "EnumSystemLocales", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumSystemLocales( IntPtr lpLocaleEnumProc, int dwFlags ); + [DllImport("KERNEL32", EntryPoint = "EnumSystemLocales", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumSystemLocales(IntPtr lpLocaleEnumProc, int dwFlags); - [DllImport( "KERNEL32", EntryPoint = "EnumSystemCodePages", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumSystemCodePages( IntPtr lpCodePageEnumProc, int dwFlags ); + [DllImport("KERNEL32", EntryPoint = "EnumSystemCodePages", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumSystemCodePages(IntPtr lpCodePageEnumProc, int dwFlags); // The following section contains the Public data structures, data types, // and procedures exported by the NT console subsystem. - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct COORD { public int x; public int y; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SMALL_RECT { public int Left; @@ -3747,7 +3747,7 @@ public struct SMALL_RECT public int Bottom; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct KEY_EVENT_RECORD { public int bKeyDown; @@ -3759,17 +3759,17 @@ public struct KEY_EVENT_RECORD } // ControlKeyState flags - public const int RIGHT_ALT_PRESSED = unchecked( (int)( 0x1 ) );// the right alt key is pressed. - public const int LEFT_ALT_PRESSED = unchecked( (int)( 0x2 ) );// the left alt key is pressed. - public const int RIGHT_CTRL_PRESSED = unchecked( (int)( 0x4 ) );// the right ctrl key is pressed. - public const int LEFT_CTRL_PRESSED = unchecked( (int)( 0x8 ) );// the left ctrl key is pressed. - public const int SHIFT_PRESSED = unchecked( (int)( 0x10 ) );// the shift key is pressed. - public const int NUMLOCK_ON = unchecked( (int)( 0x20 ) );// the numlock light is on. - public const int SCROLLLOCK_ON = unchecked( (int)( 0x40 ) );// the scrolllock light is on. - public const int CAPSLOCK_ON = unchecked( (int)( 0x80 ) );// the capslock light is on. - public const int ENHANCED_KEY = unchecked( (int)( 0x100 ) );// the key is enhanced. - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int RIGHT_ALT_PRESSED = unchecked((int)(0x1));// the right alt key is pressed. + public const int LEFT_ALT_PRESSED = unchecked((int)(0x2));// the left alt key is pressed. + public const int RIGHT_CTRL_PRESSED = unchecked((int)(0x4));// the right ctrl key is pressed. + public const int LEFT_CTRL_PRESSED = unchecked((int)(0x8));// the left ctrl key is pressed. + public const int SHIFT_PRESSED = unchecked((int)(0x10));// the shift key is pressed. + public const int NUMLOCK_ON = unchecked((int)(0x20));// the numlock light is on. + public const int SCROLLLOCK_ON = unchecked((int)(0x40));// the scrolllock light is on. + public const int CAPSLOCK_ON = unchecked((int)(0x80));// the capslock light is on. + public const int ENHANCED_KEY = unchecked((int)(0x100));// the key is enhanced. + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MOUSE_EVENT_RECORD { public COORD dwMousePosition; @@ -3779,42 +3779,42 @@ public struct MOUSE_EVENT_RECORD } // ButtonState flags - public const int FROM_LEFT_1ST_BUTTON_PRESSED = unchecked( (int)( 0x1 ) ); - public const int RIGHTMOST_BUTTON_PRESSED = unchecked( (int)( 0x2 ) ); - public const int FROM_LEFT_2ND_BUTTON_PRESSED = unchecked( (int)( 0x4 ) ); - public const int FROM_LEFT_3RD_BUTTON_PRESSED = unchecked( (int)( 0x8 ) ); - public const int FROM_LEFT_4TH_BUTTON_PRESSED = unchecked( (int)( 0x10 ) ); + public const int FROM_LEFT_1ST_BUTTON_PRESSED = unchecked((int)(0x1)); + public const int RIGHTMOST_BUTTON_PRESSED = unchecked((int)(0x2)); + public const int FROM_LEFT_2ND_BUTTON_PRESSED = unchecked((int)(0x4)); + public const int FROM_LEFT_3RD_BUTTON_PRESSED = unchecked((int)(0x8)); + public const int FROM_LEFT_4TH_BUTTON_PRESSED = unchecked((int)(0x10)); // EventFlags - public const int MOUSE_MOVED = unchecked( (int)( 0x1 ) ); - public const int DOUBLE_CLICK = unchecked( (int)( 0x2 ) ); + public const int MOUSE_MOVED = unchecked((int)(0x1)); + public const int DOUBLE_CLICK = unchecked((int)(0x2)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct WINDOW_BUFFER_SIZE_RECORD { public COORD dwSize; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MENU_EVENT_RECORD { public int dwCommandId; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct FOCUS_EVENT_RECORD { public int bSetFocus; } // EventType flags: - public const int KEY_EVENT = unchecked( (int)( 0x1 ) );// Event contains key event record - public const int MOUSE_EVENTC = unchecked( (int)( 0x2 ) );// Event contains mouse event record - public const int WINDOW_BUFFER_SIZE_EVENT = unchecked( (int)( 0x4 ) );// Event contains window change event record - public const int MENU_EVENT = unchecked( (int)( 0x8 ) );// Event contains menu event record - public const int FOCUS_EVENT = unchecked( (int)( 0x10 ) );// event contains focus change + public const int KEY_EVENT = unchecked((int)(0x1));// Event contains key event record + public const int MOUSE_EVENTC = unchecked((int)(0x2));// Event contains mouse event record + public const int WINDOW_BUFFER_SIZE_EVENT = unchecked((int)(0x4));// Event contains window change event record + public const int MENU_EVENT = unchecked((int)(0x8));// Event contains menu event record + public const int FOCUS_EVENT = unchecked((int)(0x10));// event contains focus change - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CHAR_INFO { public int Char; @@ -3822,16 +3822,16 @@ public struct CHAR_INFO } // Attributes flags: - public const int FOREGROUND_BLUE = unchecked( (int)( 0x1 ) );// text color contains blue. - public const int FOREGROUND_GREEN = unchecked( (int)( 0x2 ) );// text color contains green. - public const int FOREGROUND_RED = unchecked( (int)( 0x4 ) );// text color contains red. - public const int FOREGROUND_INTENSITY = unchecked( (int)( 0x8 ) );// text color is intensified. - public const int BACKGROUND_BLUE = unchecked( (int)( 0x10 ) );// background color contains blue. - public const int BACKGROUND_GREEN = unchecked( (int)( 0x20 ) );// background color contains green. - public const int BACKGROUND_RED = unchecked( (int)( 0x40 ) );// background color contains red. - public const int BACKGROUND_INTENSITY = unchecked( (int)( 0x80 ) );// background color is intensified. - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int FOREGROUND_BLUE = unchecked((int)(0x1));// text color contains blue. + public const int FOREGROUND_GREEN = unchecked((int)(0x2));// text color contains green. + public const int FOREGROUND_RED = unchecked((int)(0x4));// text color contains red. + public const int FOREGROUND_INTENSITY = unchecked((int)(0x8));// text color is intensified. + public const int BACKGROUND_BLUE = unchecked((int)(0x10));// background color contains blue. + public const int BACKGROUND_GREEN = unchecked((int)(0x20));// background color contains green. + public const int BACKGROUND_RED = unchecked((int)(0x40));// background color contains red. + public const int BACKGROUND_INTENSITY = unchecked((int)(0x80));// background color is intensified. + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CONSOLE_SCREEN_BUFFER_INFO { public COORD dwSize; @@ -3841,144 +3841,144 @@ public struct CONSOLE_SCREEN_BUFFER_INFO public COORD dwMaximumWindowSize; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CONSOLE_CURSOR_INFO { public int dwSize; public int bVisible; } - public const int CTRL_C_EVENT = unchecked( (int)( 0 ) ); - public const int CTRL_BREAK_EVENT = unchecked( (int)( 1 ) ); - public const int CTRL_CLOSE_EVENT = unchecked( (int)( 2 ) ); + public const int CTRL_C_EVENT = unchecked((int)(0)); + public const int CTRL_BREAK_EVENT = unchecked((int)(1)); + public const int CTRL_CLOSE_EVENT = unchecked((int)(2)); // 3 is reserved! // 4 is reserved! - public const int CTRL_LOGOFF_EVENT = unchecked( (int)( 5 ) ); - public const int CTRL_SHUTDOWN_EVENT = unchecked( (int)( 6 ) ); + public const int CTRL_LOGOFF_EVENT = unchecked((int)(5)); + public const int CTRL_SHUTDOWN_EVENT = unchecked((int)(6)); // Input Mode flags: - public const int ENABLE_PROCESSED_INPUT = unchecked( (int)( 0x1 ) ); - public const int ENABLE_LINE_INPUT = unchecked( (int)( 0x2 ) ); - public const int ENABLE_ECHO_INPUT = unchecked( (int)( 0x4 ) ); - public const int ENABLE_WINDOW_INPUT = unchecked( (int)( 0x8 ) ); - public const int ENABLE_MOUSE_INPUT = unchecked( (int)( 0x10 ) ); + public const int ENABLE_PROCESSED_INPUT = unchecked((int)(0x1)); + public const int ENABLE_LINE_INPUT = unchecked((int)(0x2)); + public const int ENABLE_ECHO_INPUT = unchecked((int)(0x4)); + public const int ENABLE_WINDOW_INPUT = unchecked((int)(0x8)); + public const int ENABLE_MOUSE_INPUT = unchecked((int)(0x10)); // Output Mode flags: - public const int ENABLE_PROCESSED_OUTPUT = unchecked( (int)( 0x1 ) ); - public const int ENABLE_WRAP_AT_EOL_OUTPUT = unchecked( (int)( 0x2 ) ); + public const int ENABLE_PROCESSED_OUTPUT = unchecked((int)(0x1)); + public const int ENABLE_WRAP_AT_EOL_OUTPUT = unchecked((int)(0x2)); - [DllImport( "kernel32", EntryPoint = "ReadConsoleOutput", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ReadConsoleOutput( IntPtr hConsoleOutput, ref CHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, ref SMALL_RECT lpReadRegion ); + [DllImport("kernel32", EntryPoint = "ReadConsoleOutput", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ReadConsoleOutput(IntPtr hConsoleOutput, ref CHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, ref SMALL_RECT lpReadRegion); - [DllImport( "kernel32", EntryPoint = "WriteConsoleOutput", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WriteConsoleOutput( IntPtr hConsoleOutput, ref CHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, ref SMALL_RECT lpWriteRegion ); + [DllImport("kernel32", EntryPoint = "WriteConsoleOutput", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WriteConsoleOutput(IntPtr hConsoleOutput, ref CHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, ref SMALL_RECT lpWriteRegion); - [DllImport( "kernel32", EntryPoint = "ReadConsoleOutputCharacter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ReadConsoleOutputCharacter( IntPtr hConsoleOutput, string lpCharacter, int nLength, COORD dwReadCoord, IntPtr lpNumberOfCharsRead ); + [DllImport("kernel32", EntryPoint = "ReadConsoleOutputCharacter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ReadConsoleOutputCharacter(IntPtr hConsoleOutput, string lpCharacter, int nLength, COORD dwReadCoord, IntPtr lpNumberOfCharsRead); - [DllImport( "kernel32", EntryPoint = "ReadConsoleOutputAttribute", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ReadConsoleOutputAttribute( IntPtr hConsoleOutput, IntPtr lpAttribute, int nLength, COORD dwReadCoord, IntPtr lpNumberOfAttrsRead ); + [DllImport("kernel32", EntryPoint = "ReadConsoleOutputAttribute", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ReadConsoleOutputAttribute(IntPtr hConsoleOutput, IntPtr lpAttribute, int nLength, COORD dwReadCoord, IntPtr lpNumberOfAttrsRead); - [DllImport( "kernel32", EntryPoint = "WriteConsoleOutputCharacter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WriteConsoleOutputCharacter( IntPtr hConsoleOutput, string lpCharacter, int nLength, COORD dwWriteCoord, IntPtr lpNumberOfCharsWritten ); + [DllImport("kernel32", EntryPoint = "WriteConsoleOutputCharacter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WriteConsoleOutputCharacter(IntPtr hConsoleOutput, string lpCharacter, int nLength, COORD dwWriteCoord, IntPtr lpNumberOfCharsWritten); - [DllImport( "kernel32", EntryPoint = "WriteConsoleOutputAttribute", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WriteConsoleOutputAttribute( IntPtr hConsoleOutput, ref int lpAttribute, int nLength, COORD dwWriteCoord, IntPtr lpNumberOfAttrsWritten ); + [DllImport("kernel32", EntryPoint = "WriteConsoleOutputAttribute", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WriteConsoleOutputAttribute(IntPtr hConsoleOutput, ref int lpAttribute, int nLength, COORD dwWriteCoord, IntPtr lpNumberOfAttrsWritten); - [DllImport( "kernel32", EntryPoint = "FillConsoleOutputCharacter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FillConsoleOutputCharacter( IntPtr hConsoleOutput, byte cCharacter, int nLength, COORD dwWriteCoord, IntPtr lpNumberOfCharsWritten ); + [DllImport("kernel32", EntryPoint = "FillConsoleOutputCharacter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FillConsoleOutputCharacter(IntPtr hConsoleOutput, byte cCharacter, int nLength, COORD dwWriteCoord, IntPtr lpNumberOfCharsWritten); - [DllImport( "kernel32", EntryPoint = "FillConsoleOutputAttribute", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FillConsoleOutputAttribute( IntPtr hConsoleOutput, int wAttribute, int nLength, COORD dwWriteCoord, IntPtr lpNumberOfAttrsWritten ); + [DllImport("kernel32", EntryPoint = "FillConsoleOutputAttribute", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FillConsoleOutputAttribute(IntPtr hConsoleOutput, int wAttribute, int nLength, COORD dwWriteCoord, IntPtr lpNumberOfAttrsWritten); - [DllImport( "kernel32", EntryPoint = "GetConsoleMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetConsoleMode( IntPtr hConsoleHandle, IntPtr lpMode ); + [DllImport("kernel32", EntryPoint = "GetConsoleMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetConsoleMode(IntPtr hConsoleHandle, IntPtr lpMode); - [DllImport( "kernel32", EntryPoint = "GetNumberOfConsoleInputEvents", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetNumberOfConsoleInputEvents( IntPtr hConsoleInput, IntPtr lpNumberOfEvents ); + [DllImport("kernel32", EntryPoint = "GetNumberOfConsoleInputEvents", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetNumberOfConsoleInputEvents(IntPtr hConsoleInput, IntPtr lpNumberOfEvents); - [DllImport( "kernel32", EntryPoint = "GetConsoleScreenBufferInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetConsoleScreenBufferInfo( IntPtr hConsoleOutput, ref CONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo ); + [DllImport("kernel32", EntryPoint = "GetConsoleScreenBufferInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetConsoleScreenBufferInfo(IntPtr hConsoleOutput, ref CONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo); - [DllImport( "kernel32", EntryPoint = "GetLargestConsoleWindowSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern COORD GetLargestConsoleWindowSize( IntPtr hConsoleOutput ); + [DllImport("kernel32", EntryPoint = "GetLargestConsoleWindowSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern COORD GetLargestConsoleWindowSize(IntPtr hConsoleOutput); - [DllImport( "kernel32", EntryPoint = "GetConsoleCursorInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetConsoleCursorInfo( IntPtr hConsoleOutput, ref CONSOLE_CURSOR_INFO lpConsoleCursorInfo ); + [DllImport("kernel32", EntryPoint = "GetConsoleCursorInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetConsoleCursorInfo(IntPtr hConsoleOutput, ref CONSOLE_CURSOR_INFO lpConsoleCursorInfo); - [DllImport( "kernel32", EntryPoint = "GetNumberOfConsoleMouseButtons", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetNumberOfConsoleMouseButtons( IntPtr lpNumberOfMouseButtons ); + [DllImport("kernel32", EntryPoint = "GetNumberOfConsoleMouseButtons", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetNumberOfConsoleMouseButtons(IntPtr lpNumberOfMouseButtons); - [DllImport( "kernel32", EntryPoint = "SetConsoleMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetConsoleMode( IntPtr hConsoleHandle, int dwMode ); + [DllImport("kernel32", EntryPoint = "SetConsoleMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetConsoleMode(IntPtr hConsoleHandle, int dwMode); - [DllImport( "kernel32", EntryPoint = "SetConsoleActiveScreenBuffer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetConsoleActiveScreenBuffer( IntPtr hConsoleOutput ); + [DllImport("kernel32", EntryPoint = "SetConsoleActiveScreenBuffer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetConsoleActiveScreenBuffer(IntPtr hConsoleOutput); - [DllImport( "kernel32", EntryPoint = "FlushConsoleInputBuffer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FlushConsoleInputBuffer( IntPtr hConsoleInput ); + [DllImport("kernel32", EntryPoint = "FlushConsoleInputBuffer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FlushConsoleInputBuffer(IntPtr hConsoleInput); - [DllImport( "kernel32", EntryPoint = "SetConsoleScreenBufferSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetConsoleScreenBufferSize( IntPtr hConsoleOutput, COORD dwSize ); + [DllImport("kernel32", EntryPoint = "SetConsoleScreenBufferSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetConsoleScreenBufferSize(IntPtr hConsoleOutput, COORD dwSize); - [DllImport( "kernel32", EntryPoint = "SetConsoleCursorPosition", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetConsoleCursorPosition( IntPtr hConsoleOutput, COORD dwCursorPosition ); + [DllImport("kernel32", EntryPoint = "SetConsoleCursorPosition", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetConsoleCursorPosition(IntPtr hConsoleOutput, COORD dwCursorPosition); - [DllImport( "kernel32", EntryPoint = "SetConsoleCursorInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetConsoleCursorInfo( IntPtr hConsoleOutput, ref CONSOLE_CURSOR_INFO lpConsoleCursorInfo ); + [DllImport("kernel32", EntryPoint = "SetConsoleCursorInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetConsoleCursorInfo(IntPtr hConsoleOutput, ref CONSOLE_CURSOR_INFO lpConsoleCursorInfo); - [DllImport( "kernel32", EntryPoint = "ScrollConsoleScreenBuffer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ScrollConsoleScreenBuffer( IntPtr hConsoleOutput, ref SMALL_RECT lpScrollRectangle, ref SMALL_RECT lpClipRectangle, COORD dwDestinationOrigin, ref CHAR_INFO lpFill ); + [DllImport("kernel32", EntryPoint = "ScrollConsoleScreenBuffer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ScrollConsoleScreenBuffer(IntPtr hConsoleOutput, ref SMALL_RECT lpScrollRectangle, ref SMALL_RECT lpClipRectangle, COORD dwDestinationOrigin, ref CHAR_INFO lpFill); - [DllImport( "kernel32", EntryPoint = "SetConsoleWindowInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetConsoleWindowInfo( IntPtr hConsoleOutput, int bAbsolute, ref SMALL_RECT lpConsoleWindow ); + [DllImport("kernel32", EntryPoint = "SetConsoleWindowInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetConsoleWindowInfo(IntPtr hConsoleOutput, int bAbsolute, ref SMALL_RECT lpConsoleWindow); - [DllImport( "kernel32", EntryPoint = "SetConsoleTextAttribute", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetConsoleTextAttribute( IntPtr hConsoleOutput, int wAttributes ); + [DllImport("kernel32", EntryPoint = "SetConsoleTextAttribute", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetConsoleTextAttribute(IntPtr hConsoleOutput, int wAttributes); - [DllImport( "kernel32", EntryPoint = "SetConsoleCtrlHandler", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetConsoleCtrlHandler( int HandlerRoutine, int Add ); + [DllImport("kernel32", EntryPoint = "SetConsoleCtrlHandler", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetConsoleCtrlHandler(int HandlerRoutine, int Add); - [DllImport( "kernel32", EntryPoint = "GenerateConsoleCtrlEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GenerateConsoleCtrlEvent( int dwCtrlEvent, int dwProcessGroupId ); + [DllImport("kernel32", EntryPoint = "GenerateConsoleCtrlEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GenerateConsoleCtrlEvent(int dwCtrlEvent, int dwProcessGroupId); - [DllImport( "kernel32", EntryPoint = "AllocConsole", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "AllocConsole", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int AllocConsole(); - [DllImport( "kernel32", EntryPoint = "FreeConsole", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "FreeConsole", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int FreeConsole(); - [DllImport( "kernel32", EntryPoint = "GetConsoleTitle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetConsoleTitle( string lpConsoleTitle, int nSize ); + [DllImport("kernel32", EntryPoint = "GetConsoleTitle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetConsoleTitle(string lpConsoleTitle, int nSize); - [DllImport( "kernel32", EntryPoint = "SetConsoleTitle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetConsoleTitle( string lpConsoleTitle ); + [DllImport("kernel32", EntryPoint = "SetConsoleTitle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetConsoleTitle(string lpConsoleTitle); - [DllImport( "kernel32", EntryPoint = "ReadConsole", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ReadConsole( IntPtr hConsoleInput, IntPtr lpBuffer, int nNumberOfCharsToRead, IntPtr lpNumberOfCharsRead, IntPtr lpReserved ); + [DllImport("kernel32", EntryPoint = "ReadConsole", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ReadConsole(IntPtr hConsoleInput, IntPtr lpBuffer, int nNumberOfCharsToRead, IntPtr lpNumberOfCharsRead, IntPtr lpReserved); - [DllImport( "kernel32", EntryPoint = "WriteConsole", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WriteConsole( IntPtr hConsoleOutput, IntPtr lpBuffer, int nNumberOfCharsToWrite, IntPtr lpNumberOfCharsWritten, IntPtr lpReserved ); + [DllImport("kernel32", EntryPoint = "WriteConsole", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WriteConsole(IntPtr hConsoleOutput, IntPtr lpBuffer, int nNumberOfCharsToWrite, IntPtr lpNumberOfCharsWritten, IntPtr lpReserved); - public const int CONSOLE_TEXTMODE_BUFFER = unchecked( (int)( 1 ) ); + public const int CONSOLE_TEXTMODE_BUFFER = unchecked((int)(1)); - [DllImport( "kernel32", EntryPoint = "CreateConsoleScreenBuffer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateConsoleScreenBuffer( int dwDesiredAccess, int dwShareMode, ref SECURITY_ATTRIBUTES lpSecurityAttributes, int dwFlags, IntPtr lpScreenBufferData ); + [DllImport("kernel32", EntryPoint = "CreateConsoleScreenBuffer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateConsoleScreenBuffer(int dwDesiredAccess, int dwShareMode, ref SECURITY_ATTRIBUTES lpSecurityAttributes, int dwFlags, IntPtr lpScreenBufferData); - [DllImport( "kernel32", EntryPoint = "GetConsoleCP", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetConsoleCP", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetConsoleCP(); - [DllImport( "kernel32", EntryPoint = "SetConsoleCP", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetConsoleCP( int wCodePageID ); + [DllImport("kernel32", EntryPoint = "SetConsoleCP", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetConsoleCP(int wCodePageID); - [DllImport( "kernel32", EntryPoint = "GetConsoleOutputCP", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "GetConsoleOutputCP", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetConsoleOutputCP(); - [DllImport( "kernel32", EntryPoint = "SetConsoleOutputCP", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetConsoleOutputCP( int wCodePageID ); + [DllImport("kernel32", EntryPoint = "SetConsoleOutputCP", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetConsoleOutputCP(int wCodePageID); // ------------- @@ -3986,288 +3986,288 @@ public struct CONSOLE_CURSOR_INFO // ------------- // Binary raster ops - public const int R2_BLACK = unchecked( (int)( 1 ) );// 0 - public const int R2_NOTMERGEPEN = unchecked( (int)( 2 ) );// DPon - public const int R2_MASKNOTPEN = unchecked( (int)( 3 ) );// DPna - public const int R2_NOTCOPYPEN = unchecked( (int)( 4 ) );// PN - public const int R2_MASKPENNOT = unchecked( (int)( 5 ) );// PDna - public const int R2_NOT = unchecked( (int)( 6 ) );// Dn - public const int R2_XORPEN = unchecked( (int)( 7 ) );// DPx - public const int R2_NOTMASKPEN = unchecked( (int)( 8 ) );// DPan - public const int R2_MASKPEN = unchecked( (int)( 9 ) );// DPa - public const int R2_NOTXORPEN = unchecked( (int)( 10 ) );// DPxn - public const int R2_NOP = unchecked( (int)( 11 ) );// D - public const int R2_MERGENOTPEN = unchecked( (int)( 12 ) );// DPno - public const int R2_COPYPEN = unchecked( (int)( 13 ) );// P - public const int R2_MERGEPENNOT = unchecked( (int)( 14 ) );// PDno - public const int R2_MERGEPEN = unchecked( (int)( 15 ) );// DPo - public const int R2_WHITE = unchecked( (int)( 16 ) );// 1 - public const int R2_LAST = unchecked( (int)( 16 ) ); + public const int R2_BLACK = unchecked((int)(1));// 0 + public const int R2_NOTMERGEPEN = unchecked((int)(2));// DPon + public const int R2_MASKNOTPEN = unchecked((int)(3));// DPna + public const int R2_NOTCOPYPEN = unchecked((int)(4));// PN + public const int R2_MASKPENNOT = unchecked((int)(5));// PDna + public const int R2_NOT = unchecked((int)(6));// Dn + public const int R2_XORPEN = unchecked((int)(7));// DPx + public const int R2_NOTMASKPEN = unchecked((int)(8));// DPan + public const int R2_MASKPEN = unchecked((int)(9));// DPa + public const int R2_NOTXORPEN = unchecked((int)(10));// DPxn + public const int R2_NOP = unchecked((int)(11));// D + public const int R2_MERGENOTPEN = unchecked((int)(12));// DPno + public const int R2_COPYPEN = unchecked((int)(13));// P + public const int R2_MERGEPENNOT = unchecked((int)(14));// PDno + public const int R2_MERGEPEN = unchecked((int)(15));// DPo + public const int R2_WHITE = unchecked((int)(16));// 1 + public const int R2_LAST = unchecked((int)(16)); // Ternary raster operations - public const int SRCCOPY = unchecked( (int)( 0xCC0020 ) );// (DWORD) dest = source - public const int SRCPAINT = unchecked( (int)( 0xEE0086 ) );// (DWORD) dest = source OR dest - public const int SRCAND = unchecked( (int)( 0x8800C6 ) );// (DWORD) dest = source AND dest - public const int SRCINVERT = unchecked( (int)( 0x660046 ) );// (DWORD) dest = source XOR dest - public const int SRCERASE = unchecked( (int)( 0x440328 ) );// (DWORD) dest = source AND (NOT dest ) - public const int NOTSRCCOPY = unchecked( (int)( 0x330008 ) );// (DWORD) dest = (NOT source) - public const int NOTSRCERASE = unchecked( (int)( 0x1100A6 ) );// (DWORD) dest = (NOT src) AND (NOT dest) - public const int MERGECOPY = unchecked( (int)( 0xC000CA ) );// (DWORD) dest = (source AND pattern) - public const int MERGEPAINT = unchecked( (int)( 0xBB0226 ) );// (DWORD) dest = (NOT source) OR dest - public const int PATCOPY = unchecked( (int)( 0xF00021 ) );// (DWORD) dest = pattern - public const int PATPAINT = unchecked( (int)( 0xFB0A09 ) );// (DWORD) dest = DPSnoo - public const int PATINVERT = unchecked( (int)( 0x5A0049 ) );// (DWORD) dest = pattern XOR dest - public const int DSTINVERT = unchecked( (int)( 0x550009 ) );// (DWORD) dest = (NOT dest) - public const int BLACKNESS = unchecked( (int)( 0x42 ) );// (DWORD) dest = BLACK - public const int WHITENESS = unchecked( (int)( 0xFF0062 ) );// (DWORD) dest = WHITE - - public const int GDI_ERROR = unchecked( (int)( 0xFFFF ) ); - public const int HGDI_ERROR = unchecked( (int)( 0xFFFF ) ); + public const int SRCCOPY = unchecked((int)(0xCC0020));// (DWORD) dest = source + public const int SRCPAINT = unchecked((int)(0xEE0086));// (DWORD) dest = source OR dest + public const int SRCAND = unchecked((int)(0x8800C6));// (DWORD) dest = source AND dest + public const int SRCINVERT = unchecked((int)(0x660046));// (DWORD) dest = source XOR dest + public const int SRCERASE = unchecked((int)(0x440328));// (DWORD) dest = source AND (NOT dest ) + public const int NOTSRCCOPY = unchecked((int)(0x330008));// (DWORD) dest = (NOT source) + public const int NOTSRCERASE = unchecked((int)(0x1100A6));// (DWORD) dest = (NOT src) AND (NOT dest) + public const int MERGECOPY = unchecked((int)(0xC000CA));// (DWORD) dest = (source AND pattern) + public const int MERGEPAINT = unchecked((int)(0xBB0226));// (DWORD) dest = (NOT source) OR dest + public const int PATCOPY = unchecked((int)(0xF00021));// (DWORD) dest = pattern + public const int PATPAINT = unchecked((int)(0xFB0A09));// (DWORD) dest = DPSnoo + public const int PATINVERT = unchecked((int)(0x5A0049));// (DWORD) dest = pattern XOR dest + public const int DSTINVERT = unchecked((int)(0x550009));// (DWORD) dest = (NOT dest) + public const int BLACKNESS = unchecked((int)(0x42));// (DWORD) dest = BLACK + public const int WHITENESS = unchecked((int)(0xFF0062));// (DWORD) dest = WHITE + + public const int GDI_ERROR = unchecked((int)(0xFFFF)); + public const int HGDI_ERROR = unchecked((int)(0xFFFF)); // Region Flags - public const int ERRORAPI = unchecked( (int)( 0 ) ); - public const int NULLREGION = unchecked( (int)( 1 ) ); - public const int SIMPLEREGION = unchecked( (int)( 2 ) ); - public const int COMPLEXREGION = unchecked( (int)( 3 ) ); + public const int ERRORAPI = unchecked((int)(0)); + public const int NULLREGION = unchecked((int)(1)); + public const int SIMPLEREGION = unchecked((int)(2)); + public const int COMPLEXREGION = unchecked((int)(3)); // CombineRgn() Styles - public const int RGN_AND = unchecked( (int)( 1 ) ); - public const int RGN_OR = unchecked( (int)( 2 ) ); - public const int RGN_XOR = unchecked( (int)( 3 ) ); - public const int RGN_DIFF = unchecked( (int)( 4 ) ); - public const int RGN_COPY = unchecked( (int)( 5 ) ); - public const int RGN_MIN = unchecked( (int)( RGN_AND ) ); - public const int RGN_MAX = unchecked( (int)( RGN_COPY ) ); + public const int RGN_AND = unchecked((int)(1)); + public const int RGN_OR = unchecked((int)(2)); + public const int RGN_XOR = unchecked((int)(3)); + public const int RGN_DIFF = unchecked((int)(4)); + public const int RGN_COPY = unchecked((int)(5)); + public const int RGN_MIN = unchecked((int)(RGN_AND)); + public const int RGN_MAX = unchecked((int)(RGN_COPY)); // StretchBlt() Modes - public const int BLACKONWHITE = unchecked( (int)( 1 ) ); - public const int WHITEONBLACK = unchecked( (int)( 2 ) ); - public const int COLORONCOLOR = unchecked( (int)( 3 ) ); - public const int HALFTONE = unchecked( (int)( 4 ) ); - public const int MAXSTRETCHBLTMODE = unchecked( (int)( 4 ) ); + public const int BLACKONWHITE = unchecked((int)(1)); + public const int WHITEONBLACK = unchecked((int)(2)); + public const int COLORONCOLOR = unchecked((int)(3)); + public const int HALFTONE = unchecked((int)(4)); + public const int MAXSTRETCHBLTMODE = unchecked((int)(4)); // PolyFill() Modes - public const int ALTERNATE = unchecked( (int)( 1 ) ); - public const int WINDING = unchecked( (int)( 2 ) ); - public const int POLYFILL_LAST = unchecked( (int)( 2 ) ); + public const int ALTERNATE = unchecked((int)(1)); + public const int WINDING = unchecked((int)(2)); + public const int POLYFILL_LAST = unchecked((int)(2)); // Text Alignment Options - public const int TA_NOUPDATECP = unchecked( (int)( 0 ) ); - public const int TA_UPDATECP = unchecked( (int)( 1 ) ); - - public const int TA_LEFT = unchecked( (int)( 0 ) ); - public const int TA_RIGHT = unchecked( (int)( 2 ) ); - public const int TA_CENTER = unchecked( (int)( 6 ) ); - - public const int TA_TOP = unchecked( (int)( 0 ) ); - public const int TA_BOTTOM = unchecked( (int)( 8 ) ); - public const int TA_BASELINE = unchecked( (int)( 24 ) ); - public const int TA_MASK = unchecked( (int)( ( TA_BASELINE + TA_CENTER + TA_UPDATECP ) ) ); - - public const int VTA_BASELINE = unchecked( (int)( TA_BASELINE ) ); - public const int VTA_LEFT = unchecked( (int)( TA_BOTTOM ) ); - public const int VTA_RIGHT = unchecked( (int)( TA_TOP ) ); - public const int VTA_CENTER = unchecked( (int)( TA_CENTER ) ); - public const int VTA_BOTTOM = unchecked( (int)( TA_RIGHT ) ); - public const int VTA_TOP = unchecked( (int)( TA_LEFT ) ); - - public const int ETO_GRAYED = unchecked( (int)( 1 ) ); - public const int ETO_OPAQUE = unchecked( (int)( 2 ) ); - public const int ETO_CLIPPED = unchecked( (int)( 4 ) ); - - public const int ASPECT_FILTERING = unchecked( (int)( 0x1 ) ); - - public const int DCB_RESET = unchecked( (int)( 0x1 ) ); - public const int DCB_ACCUMULATE = unchecked( (int)( 0x2 ) ); - public const int DCB_DIRTY = unchecked( (int)( DCB_ACCUMULATE ) ); - public const int DCB_SET = unchecked( (int)( ( DCB_RESET | DCB_ACCUMULATE ) ) ); - public const int DCB_ENABLE = unchecked( (int)( 0x4 ) ); - public const int DCB_DISABLE = unchecked( (int)( 0x8 ) ); + public const int TA_NOUPDATECP = unchecked((int)(0)); + public const int TA_UPDATECP = unchecked((int)(1)); + + public const int TA_LEFT = unchecked((int)(0)); + public const int TA_RIGHT = unchecked((int)(2)); + public const int TA_CENTER = unchecked((int)(6)); + + public const int TA_TOP = unchecked((int)(0)); + public const int TA_BOTTOM = unchecked((int)(8)); + public const int TA_BASELINE = unchecked((int)(24)); + public const int TA_MASK = unchecked((int)((TA_BASELINE + TA_CENTER + TA_UPDATECP))); + + public const int VTA_BASELINE = unchecked((int)(TA_BASELINE)); + public const int VTA_LEFT = unchecked((int)(TA_BOTTOM)); + public const int VTA_RIGHT = unchecked((int)(TA_TOP)); + public const int VTA_CENTER = unchecked((int)(TA_CENTER)); + public const int VTA_BOTTOM = unchecked((int)(TA_RIGHT)); + public const int VTA_TOP = unchecked((int)(TA_LEFT)); + + public const int ETO_GRAYED = unchecked((int)(1)); + public const int ETO_OPAQUE = unchecked((int)(2)); + public const int ETO_CLIPPED = unchecked((int)(4)); + + public const int ASPECT_FILTERING = unchecked((int)(0x1)); + + public const int DCB_RESET = unchecked((int)(0x1)); + public const int DCB_ACCUMULATE = unchecked((int)(0x2)); + public const int DCB_DIRTY = unchecked((int)(DCB_ACCUMULATE)); + public const int DCB_SET = unchecked((int)((DCB_RESET | DCB_ACCUMULATE))); + public const int DCB_ENABLE = unchecked((int)(0x4)); + public const int DCB_DISABLE = unchecked((int)(0x8)); // Metafile Functions - public const int META_SETBKCOLOR = unchecked( (int)( 0x201 ) ); - public const int META_SETBKMODE = unchecked( (int)( 0x102 ) ); - public const int META_SETMAPMODE = unchecked( (int)( 0x103 ) ); - public const int META_SETROP2 = unchecked( (int)( 0x104 ) ); - public const int META_SETRELABS = unchecked( (int)( 0x105 ) ); - public const int META_SETPOLYFILLMODE = unchecked( (int)( 0x106 ) ); - public const int META_SETSTRETCHBLTMODE = unchecked( (int)( 0x107 ) ); - public const int META_SETTEXTCHAREXTRA = unchecked( (int)( 0x108 ) ); - public const int META_SETTEXTCOLOR = unchecked( (int)( 0x209 ) ); - public const int META_SETTEXTJUSTIFICATION = unchecked( (int)( 0x20A ) ); - public const int META_SETWINDOWORG = unchecked( (int)( 0x20B ) ); - public const int META_SETWINDOWEXT = unchecked( (int)( 0x20C ) ); - public const int META_SETVIEWPORTORG = unchecked( (int)( 0x20D ) ); - public const int META_SETVIEWPORTEXT = unchecked( (int)( 0x20E ) ); - public const int META_OFFSETWINDOWORG = unchecked( (int)( 0x20F ) ); - public const int META_SCALEWINDOWEXT = unchecked( (int)( 0x410 ) ); - public const int META_OFFSETVIEWPORTORG = unchecked( (int)( 0x211 ) ); - public const int META_SCALEVIEWPORTEXT = unchecked( (int)( 0x412 ) ); - public const int META_LINETO = unchecked( (int)( 0x213 ) ); - public const int META_MOVETO = unchecked( (int)( 0x214 ) ); - public const int META_EXCLUDECLIPRECT = unchecked( (int)( 0x415 ) ); - public const int META_INTERSECTCLIPRECT = unchecked( (int)( 0x416 ) ); - public const int META_ARC = unchecked( (int)( 0x817 ) ); - public const int META_ELLIPSE = unchecked( (int)( 0x418 ) ); - public const int META_FLOODFILL = unchecked( (int)( 0x419 ) ); - public const int META_PIE = unchecked( (int)( 0x81A ) ); - public const int META_RECTANGLE = unchecked( (int)( 0x41B ) ); - public const int META_ROUNDRECT = unchecked( (int)( 0x61C ) ); - public const int META_PATBLT = unchecked( (int)( 0x61D ) ); - public const int META_SAVEDC = unchecked( (int)( 0x1E ) ); - public const int META_SETPIXEL = unchecked( (int)( 0x41F ) ); - public const int META_OFFSETCLIPRGN = unchecked( (int)( 0x220 ) ); - public const int META_TEXTOUT = unchecked( (int)( 0x521 ) ); - public const int META_BITBLT = unchecked( (int)( 0x922 ) ); - public const int META_STRETCHBLT = unchecked( (int)( 0xB23 ) ); - public const int META_POLYGON = unchecked( (int)( 0x324 ) ); - public const int META_POLYLINE = unchecked( (int)( 0x325 ) ); - public const int META_ESCAPE = unchecked( (int)( 0x626 ) ); - public const int META_RESTOREDC = unchecked( (int)( 0x127 ) ); - public const int META_FILLREGION = unchecked( (int)( 0x228 ) ); - public const int META_FRAMEREGION = unchecked( (int)( 0x429 ) ); - public const int META_INVERTREGION = unchecked( (int)( 0x12A ) ); - public const int META_PAINTREGION = unchecked( (int)( 0x12B ) ); - public const int META_SELECTCLIPREGION = unchecked( (int)( 0x12C ) ); - public const int META_SELECTOBJECT = unchecked( (int)( 0x12D ) ); - public const int META_SETTEXTALIGN = unchecked( (int)( 0x12E ) ); - public const int META_CHORD = unchecked( (int)( 0x830 ) ); - public const int META_SETMAPPERFLAGS = unchecked( (int)( 0x231 ) ); - public const int META_EXTTEXTOUT = unchecked( (int)( 0xA32 ) ); - public const int META_SETDIBTODEV = unchecked( (int)( 0xD33 ) ); - public const int META_SELECTPALETTE = unchecked( (int)( 0x234 ) ); - public const int META_REALIZEPALETTE = unchecked( (int)( 0x35 ) ); - public const int META_ANIMATEPALETTE = unchecked( (int)( 0x436 ) ); - public const int META_SETPALENTRIES = unchecked( (int)( 0x37 ) ); - public const int META_POLYPOLYGON = unchecked( (int)( 0x538 ) ); - public const int META_RESIZEPALETTE = unchecked( (int)( 0x139 ) ); - public const int META_DIBBITBLT = unchecked( (int)( 0x940 ) ); - public const int META_DIBSTRETCHBLT = unchecked( (int)( 0xB41 ) ); - public const int META_DIBCREATEPATTERNBRUSH = unchecked( (int)( 0x142 ) ); - public const int META_STRETCHDIB = unchecked( (int)( 0xF43 ) ); - public const int META_EXTFLOODFILL = unchecked( (int)( 0x548 ) ); - public const int META_DELETEOBJECT = unchecked( (int)( 0x1F0 ) ); - public const int META_CREATEPALETTE = unchecked( (int)( 0xF7 ) ); - public const int META_CREATEPATTERNBRUSH = unchecked( (int)( 0x1F9 ) ); - public const int META_CREATEPENINDIRECT = unchecked( (int)( 0x2FA ) ); - public const int META_CREATEFONTINDIRECT = unchecked( (int)( 0x2FB ) ); - public const int META_CREATEBRUSHINDIRECT = unchecked( (int)( 0x2FC ) ); - public const int META_CREATEREGION = unchecked( (int)( 0x6FF ) ); + public const int META_SETBKCOLOR = unchecked((int)(0x201)); + public const int META_SETBKMODE = unchecked((int)(0x102)); + public const int META_SETMAPMODE = unchecked((int)(0x103)); + public const int META_SETROP2 = unchecked((int)(0x104)); + public const int META_SETRELABS = unchecked((int)(0x105)); + public const int META_SETPOLYFILLMODE = unchecked((int)(0x106)); + public const int META_SETSTRETCHBLTMODE = unchecked((int)(0x107)); + public const int META_SETTEXTCHAREXTRA = unchecked((int)(0x108)); + public const int META_SETTEXTCOLOR = unchecked((int)(0x209)); + public const int META_SETTEXTJUSTIFICATION = unchecked((int)(0x20A)); + public const int META_SETWINDOWORG = unchecked((int)(0x20B)); + public const int META_SETWINDOWEXT = unchecked((int)(0x20C)); + public const int META_SETVIEWPORTORG = unchecked((int)(0x20D)); + public const int META_SETVIEWPORTEXT = unchecked((int)(0x20E)); + public const int META_OFFSETWINDOWORG = unchecked((int)(0x20F)); + public const int META_SCALEWINDOWEXT = unchecked((int)(0x410)); + public const int META_OFFSETVIEWPORTORG = unchecked((int)(0x211)); + public const int META_SCALEVIEWPORTEXT = unchecked((int)(0x412)); + public const int META_LINETO = unchecked((int)(0x213)); + public const int META_MOVETO = unchecked((int)(0x214)); + public const int META_EXCLUDECLIPRECT = unchecked((int)(0x415)); + public const int META_INTERSECTCLIPRECT = unchecked((int)(0x416)); + public const int META_ARC = unchecked((int)(0x817)); + public const int META_ELLIPSE = unchecked((int)(0x418)); + public const int META_FLOODFILL = unchecked((int)(0x419)); + public const int META_PIE = unchecked((int)(0x81A)); + public const int META_RECTANGLE = unchecked((int)(0x41B)); + public const int META_ROUNDRECT = unchecked((int)(0x61C)); + public const int META_PATBLT = unchecked((int)(0x61D)); + public const int META_SAVEDC = unchecked((int)(0x1E)); + public const int META_SETPIXEL = unchecked((int)(0x41F)); + public const int META_OFFSETCLIPRGN = unchecked((int)(0x220)); + public const int META_TEXTOUT = unchecked((int)(0x521)); + public const int META_BITBLT = unchecked((int)(0x922)); + public const int META_STRETCHBLT = unchecked((int)(0xB23)); + public const int META_POLYGON = unchecked((int)(0x324)); + public const int META_POLYLINE = unchecked((int)(0x325)); + public const int META_ESCAPE = unchecked((int)(0x626)); + public const int META_RESTOREDC = unchecked((int)(0x127)); + public const int META_FILLREGION = unchecked((int)(0x228)); + public const int META_FRAMEREGION = unchecked((int)(0x429)); + public const int META_INVERTREGION = unchecked((int)(0x12A)); + public const int META_PAINTREGION = unchecked((int)(0x12B)); + public const int META_SELECTCLIPREGION = unchecked((int)(0x12C)); + public const int META_SELECTOBJECT = unchecked((int)(0x12D)); + public const int META_SETTEXTALIGN = unchecked((int)(0x12E)); + public const int META_CHORD = unchecked((int)(0x830)); + public const int META_SETMAPPERFLAGS = unchecked((int)(0x231)); + public const int META_EXTTEXTOUT = unchecked((int)(0xA32)); + public const int META_SETDIBTODEV = unchecked((int)(0xD33)); + public const int META_SELECTPALETTE = unchecked((int)(0x234)); + public const int META_REALIZEPALETTE = unchecked((int)(0x35)); + public const int META_ANIMATEPALETTE = unchecked((int)(0x436)); + public const int META_SETPALENTRIES = unchecked((int)(0x37)); + public const int META_POLYPOLYGON = unchecked((int)(0x538)); + public const int META_RESIZEPALETTE = unchecked((int)(0x139)); + public const int META_DIBBITBLT = unchecked((int)(0x940)); + public const int META_DIBSTRETCHBLT = unchecked((int)(0xB41)); + public const int META_DIBCREATEPATTERNBRUSH = unchecked((int)(0x142)); + public const int META_STRETCHDIB = unchecked((int)(0xF43)); + public const int META_EXTFLOODFILL = unchecked((int)(0x548)); + public const int META_DELETEOBJECT = unchecked((int)(0x1F0)); + public const int META_CREATEPALETTE = unchecked((int)(0xF7)); + public const int META_CREATEPATTERNBRUSH = unchecked((int)(0x1F9)); + public const int META_CREATEPENINDIRECT = unchecked((int)(0x2FA)); + public const int META_CREATEFONTINDIRECT = unchecked((int)(0x2FB)); + public const int META_CREATEBRUSHINDIRECT = unchecked((int)(0x2FC)); + public const int META_CREATEREGION = unchecked((int)(0x6FF)); // GDI Escapes - public const int NEWFRAME = unchecked( (int)( 1 ) ); - public const int ABORTDOCC = unchecked( (int)( 2 ) ); - public const int NEXTBAND = unchecked( (int)( 3 ) ); - public const int SETCOLORTABLE = unchecked( (int)( 4 ) ); - public const int GETCOLORTABLE = unchecked( (int)( 5 ) ); - public const int FLUSHOUTPUT = unchecked( (int)( 6 ) ); - public const int DRAFTMODE = unchecked( (int)( 7 ) ); - public const int QUERYESCSUPPORT = unchecked( (int)( 8 ) ); - public const int SETABORTPROC = unchecked( (int)( 9 ) ); - public const int STARTDOCC = unchecked( (int)( 10 ) ); - public const int ENDDOCC = unchecked( (int)( 11 ) ); - public const int GETPHYSPAGESIZE = unchecked( (int)( 12 ) ); - public const int GETPRINTINGOFFSET = unchecked( (int)( 13 ) ); - public const int GETSCALINGFACTOR = unchecked( (int)( 14 ) ); - public const int MFCOMMENT = unchecked( (int)( 15 ) ); - public const int GETPENWIDTH = unchecked( (int)( 16 ) ); - public const int SETCOPYCOUNT = unchecked( (int)( 17 ) ); - public const int SELECTPAPERSOURCE = unchecked( (int)( 18 ) ); - public const int DEVICEDATA = unchecked( (int)( 19 ) ); - public const int PASSTHROUGH = unchecked( (int)( 19 ) ); - public const int GETTECHNOLGY = unchecked( (int)( 20 ) ); - public const int GETTECHNOLOGY = unchecked( (int)( 20 ) ); - public const int SETLINECAP = unchecked( (int)( 21 ) ); - public const int SETLINEJOIN = unchecked( (int)( 22 ) ); - public const int SETMITERLIMITC = unchecked( (int)( 23 ) ); - public const int BANDINFO = unchecked( (int)( 24 ) ); - public const int DRAWPATTERNRECT = unchecked( (int)( 25 ) ); - public const int GETVECTORPENSIZE = unchecked( (int)( 26 ) ); - public const int GETVECTORBRUSHSIZE = unchecked( (int)( 27 ) ); - public const int ENABLEDUPLEX = unchecked( (int)( 28 ) ); - public const int GETSETPAPERBINS = unchecked( (int)( 29 ) ); - public const int GETSETPRINTORIENT = unchecked( (int)( 30 ) ); - public const int ENUMPAPERBINS = unchecked( (int)( 31 ) ); - public const int SETDIBSCALING = unchecked( (int)( 32 ) ); - public const int EPSPRINTING = unchecked( (int)( 33 ) ); - public const int ENUMPAPERMETRICS = unchecked( (int)( 34 ) ); - public const int GETSETPAPERMETRICS = unchecked( (int)( 35 ) ); - public const int POSTSCRIPT_DATA = unchecked( (int)( 37 ) ); - public const int POSTSCRIPT_IGNORE = unchecked( (int)( 38 ) ); - public const int MOUSETRAILS = unchecked( (int)( 39 ) ); - public const int GETDEVICEUNITS = unchecked( (int)( 42 ) ); - - public const int GETEXTENDEDTEXTMETRICS = unchecked( (int)( 256 ) ); - public const int GETEXTENTTABLE = unchecked( (int)( 257 ) ); - public const int GETPAIRKERNTABLE = unchecked( (int)( 258 ) ); - public const int GETTRACKKERNTABLE = unchecked( (int)( 259 ) ); - public const int EXTTEXTOUTC = unchecked( (int)( 512 ) ); - public const int GETFACENAME = unchecked( (int)( 513 ) ); - public const int DOWNLOADFACE = unchecked( (int)( 514 ) ); - public const int ENABLERELATIVEWIDTHS = unchecked( (int)( 768 ) ); - public const int ENABLEPAIRKERNING = unchecked( (int)( 769 ) ); - public const int SETKERNTRACK = unchecked( (int)( 770 ) ); - public const int SETALLJUSTVALUES = unchecked( (int)( 771 ) ); - public const int SETCHARSET = unchecked( (int)( 772 ) ); - - public const int STRETCHBLTC = unchecked( (int)( 2048 ) ); - public const int GETSETSCREENPARAMS = unchecked( (int)( 3072 ) ); - public const int BEGIN_PATH = unchecked( (int)( 4096 ) ); - public const int CLIP_TO_PATH = unchecked( (int)( 4097 ) ); - public const int END_PATH = unchecked( (int)( 4098 ) ); - public const int EXT_DEVICE_CAPS = unchecked( (int)( 4099 ) ); - public const int RESTORE_CTM = unchecked( (int)( 4100 ) ); - public const int SAVE_CTM = unchecked( (int)( 4101 ) ); - public const int SET_ARC_DIRECTION = unchecked( (int)( 4102 ) ); - public const int SET_BACKGROUND_COLOR = unchecked( (int)( 4103 ) ); - public const int SET_POLY_MODE = unchecked( (int)( 4104 ) ); - public const int SET_SCREEN_ANGLE = unchecked( (int)( 4105 ) ); - public const int SET_SPREAD = unchecked( (int)( 4106 ) ); - public const int TRANSFORM_CTM = unchecked( (int)( 4107 ) ); - public const int SET_CLIP_BOX = unchecked( (int)( 4108 ) ); - public const int SET_BOUNDS = unchecked( (int)( 4109 ) ); - public const int SET_MIRROR_MODE = unchecked( (int)( 4110 ) ); - public const int OPENCHANNEL = unchecked( (int)( 4110 ) ); - public const int DOWNLOADHEADER = unchecked( (int)( 4111 ) ); - public const int CLOSECHANNEL = unchecked( (int)( 4112 ) ); - public const int POSTSCRIPT_PASSTHROUGH = unchecked( (int)( 4115 ) ); - public const int ENCAPSULATED_POSTSCRIPT = unchecked( (int)( 4116 ) ); + public const int NEWFRAME = unchecked((int)(1)); + public const int ABORTDOCC = unchecked((int)(2)); + public const int NEXTBAND = unchecked((int)(3)); + public const int SETCOLORTABLE = unchecked((int)(4)); + public const int GETCOLORTABLE = unchecked((int)(5)); + public const int FLUSHOUTPUT = unchecked((int)(6)); + public const int DRAFTMODE = unchecked((int)(7)); + public const int QUERYESCSUPPORT = unchecked((int)(8)); + public const int SETABORTPROC = unchecked((int)(9)); + public const int STARTDOCC = unchecked((int)(10)); + public const int ENDDOCC = unchecked((int)(11)); + public const int GETPHYSPAGESIZE = unchecked((int)(12)); + public const int GETPRINTINGOFFSET = unchecked((int)(13)); + public const int GETSCALINGFACTOR = unchecked((int)(14)); + public const int MFCOMMENT = unchecked((int)(15)); + public const int GETPENWIDTH = unchecked((int)(16)); + public const int SETCOPYCOUNT = unchecked((int)(17)); + public const int SELECTPAPERSOURCE = unchecked((int)(18)); + public const int DEVICEDATA = unchecked((int)(19)); + public const int PASSTHROUGH = unchecked((int)(19)); + public const int GETTECHNOLGY = unchecked((int)(20)); + public const int GETTECHNOLOGY = unchecked((int)(20)); + public const int SETLINECAP = unchecked((int)(21)); + public const int SETLINEJOIN = unchecked((int)(22)); + public const int SETMITERLIMITC = unchecked((int)(23)); + public const int BANDINFO = unchecked((int)(24)); + public const int DRAWPATTERNRECT = unchecked((int)(25)); + public const int GETVECTORPENSIZE = unchecked((int)(26)); + public const int GETVECTORBRUSHSIZE = unchecked((int)(27)); + public const int ENABLEDUPLEX = unchecked((int)(28)); + public const int GETSETPAPERBINS = unchecked((int)(29)); + public const int GETSETPRINTORIENT = unchecked((int)(30)); + public const int ENUMPAPERBINS = unchecked((int)(31)); + public const int SETDIBSCALING = unchecked((int)(32)); + public const int EPSPRINTING = unchecked((int)(33)); + public const int ENUMPAPERMETRICS = unchecked((int)(34)); + public const int GETSETPAPERMETRICS = unchecked((int)(35)); + public const int POSTSCRIPT_DATA = unchecked((int)(37)); + public const int POSTSCRIPT_IGNORE = unchecked((int)(38)); + public const int MOUSETRAILS = unchecked((int)(39)); + public const int GETDEVICEUNITS = unchecked((int)(42)); + + public const int GETEXTENDEDTEXTMETRICS = unchecked((int)(256)); + public const int GETEXTENTTABLE = unchecked((int)(257)); + public const int GETPAIRKERNTABLE = unchecked((int)(258)); + public const int GETTRACKKERNTABLE = unchecked((int)(259)); + public const int EXTTEXTOUTC = unchecked((int)(512)); + public const int GETFACENAME = unchecked((int)(513)); + public const int DOWNLOADFACE = unchecked((int)(514)); + public const int ENABLERELATIVEWIDTHS = unchecked((int)(768)); + public const int ENABLEPAIRKERNING = unchecked((int)(769)); + public const int SETKERNTRACK = unchecked((int)(770)); + public const int SETALLJUSTVALUES = unchecked((int)(771)); + public const int SETCHARSET = unchecked((int)(772)); + + public const int STRETCHBLTC = unchecked((int)(2048)); + public const int GETSETSCREENPARAMS = unchecked((int)(3072)); + public const int BEGIN_PATH = unchecked((int)(4096)); + public const int CLIP_TO_PATH = unchecked((int)(4097)); + public const int END_PATH = unchecked((int)(4098)); + public const int EXT_DEVICE_CAPS = unchecked((int)(4099)); + public const int RESTORE_CTM = unchecked((int)(4100)); + public const int SAVE_CTM = unchecked((int)(4101)); + public const int SET_ARC_DIRECTION = unchecked((int)(4102)); + public const int SET_BACKGROUND_COLOR = unchecked((int)(4103)); + public const int SET_POLY_MODE = unchecked((int)(4104)); + public const int SET_SCREEN_ANGLE = unchecked((int)(4105)); + public const int SET_SPREAD = unchecked((int)(4106)); + public const int TRANSFORM_CTM = unchecked((int)(4107)); + public const int SET_CLIP_BOX = unchecked((int)(4108)); + public const int SET_BOUNDS = unchecked((int)(4109)); + public const int SET_MIRROR_MODE = unchecked((int)(4110)); + public const int OPENCHANNEL = unchecked((int)(4110)); + public const int DOWNLOADHEADER = unchecked((int)(4111)); + public const int CLOSECHANNEL = unchecked((int)(4112)); + public const int POSTSCRIPT_PASSTHROUGH = unchecked((int)(4115)); + public const int ENCAPSULATED_POSTSCRIPT = unchecked((int)(4116)); // Spooler Error Codes - public const int SP_NOTREPORTED = unchecked( (int)( 0x4000 ) ); - public const int SP_ERROR = unchecked( (int)( ( -1 ) ) ); - public const int SP_APPABORT = unchecked( (int)( ( -2 ) ) ); - public const int SP_USERABORT = unchecked( (int)( ( -3 ) ) ); - public const int SP_OUTOFDISK = unchecked( (int)( ( -4 ) ) ); - public const int SP_OUTOFMEMORY = unchecked( (int)( ( -5 ) ) ); + public const int SP_NOTREPORTED = unchecked((int)(0x4000)); + public const int SP_ERROR = unchecked((int)((-1))); + public const int SP_APPABORT = unchecked((int)((-2))); + public const int SP_USERABORT = unchecked((int)((-3))); + public const int SP_OUTOFDISK = unchecked((int)((-4))); + public const int SP_OUTOFMEMORY = unchecked((int)((-5))); - public const int PR_JOBSTATUS = unchecked( (int)( 0x0 ) ); + public const int PR_JOBSTATUS = unchecked((int)(0x0)); // Object Definitions for EnumObjects() - public const int OBJ_PEN = unchecked( (int)( 1 ) ); - public const int OBJ_BRUSH = unchecked( (int)( 2 ) ); - public const int OBJ_DC = unchecked( (int)( 3 ) ); - public const int OBJ_METADC = unchecked( (int)( 4 ) ); - public const int OBJ_PAL = unchecked( (int)( 5 ) ); - public const int OBJ_FONT = unchecked( (int)( 6 ) ); - public const int OBJ_BITMAP = unchecked( (int)( 7 ) ); - public const int OBJ_REGION = unchecked( (int)( 8 ) ); - public const int OBJ_METAFILE = unchecked( (int)( 9 ) ); - public const int OBJ_MEMDC = unchecked( (int)( 10 ) ); - public const int OBJ_EXTPEN = unchecked( (int)( 11 ) ); - public const int OBJ_ENHMETADC = unchecked( (int)( 12 ) ); - public const int OBJ_ENHMETAFILE = unchecked( (int)( 13 ) ); + public const int OBJ_PEN = unchecked((int)(1)); + public const int OBJ_BRUSH = unchecked((int)(2)); + public const int OBJ_DC = unchecked((int)(3)); + public const int OBJ_METADC = unchecked((int)(4)); + public const int OBJ_PAL = unchecked((int)(5)); + public const int OBJ_FONT = unchecked((int)(6)); + public const int OBJ_BITMAP = unchecked((int)(7)); + public const int OBJ_REGION = unchecked((int)(8)); + public const int OBJ_METAFILE = unchecked((int)(9)); + public const int OBJ_MEMDC = unchecked((int)(10)); + public const int OBJ_EXTPEN = unchecked((int)(11)); + public const int OBJ_ENHMETADC = unchecked((int)(12)); + public const int OBJ_ENHMETAFILE = unchecked((int)(13)); // xform stuff - public const int MWT_IDENTITY = unchecked( (int)( 1 ) ); - public const int MWT_LEFTMULTIPLY = unchecked( (int)( 2 ) ); - public const int MWT_RIGHTMULTIPLY = unchecked( (int)( 3 ) ); + public const int MWT_IDENTITY = unchecked((int)(1)); + public const int MWT_LEFTMULTIPLY = unchecked((int)(2)); + public const int MWT_RIGHTMULTIPLY = unchecked((int)(3)); - public const int MWT_MIN = unchecked( (int)( MWT_IDENTITY ) ); - public const int MWT_MAX = unchecked( (int)( MWT_RIGHTMULTIPLY ) ); + public const int MWT_MIN = unchecked((int)(MWT_IDENTITY)); + public const int MWT_MAX = unchecked((int)(MWT_RIGHTMULTIPLY)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct XFORM { public double eM11; @@ -4279,7 +4279,7 @@ public struct XFORM } // Bitmap Header Definition - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct BITMAP {//14 bytes public int bmType; @@ -4291,7 +4291,7 @@ public struct BITMAP public int bmBits; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct RGBTRIPLE { public byte rgbtBlue; @@ -4299,7 +4299,7 @@ public struct RGBTRIPLE public byte rgbtRed; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct RGBQUAD { public byte rgbBlue; @@ -4309,7 +4309,7 @@ public struct RGBQUAD } // structures for defining DIBs - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct BITMAPCOREHEADER {//12 bytes public int bcSize; @@ -4319,7 +4319,7 @@ public struct BITMAPCOREHEADER public int bcBitCount; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct BITMAPINFOHEADER {//40 bytes public int biSize; @@ -4336,26 +4336,26 @@ public struct BITMAPINFOHEADER } // constants for the biCompression field - public const int BI_RGB = unchecked( (int)( 0 ) ); - public const int BI_RLE8 = unchecked( (int)( 1 ) ); - public const int BI_RLE4 = unchecked( (int)( 2 ) ); - public const int BI_BITFIELDS = unchecked( (int)( 3 ) ); + public const int BI_RGB = unchecked((int)(0)); + public const int BI_RLE8 = unchecked((int)(1)); + public const int BI_RLE4 = unchecked((int)(2)); + public const int BI_BITFIELDS = unchecked((int)(3)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct BITMAPINFO { public BITMAPINFOHEADER bmiHeader; public RGBQUAD bmiColors; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct BITMAPCOREINFO { public BITMAPCOREHEADER bmciHeader; public RGBTRIPLE bmciColors; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct BITMAPFILEHEADER { public int bfType; @@ -4367,13 +4367,13 @@ public struct BITMAPFILEHEADER // Clipboard Metafile Picture Structure - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct HANDLETABLE { public int objectHandle; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct METARECORD { public int rdSize; @@ -4382,7 +4382,7 @@ public struct METARECORD } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct METAFILEPICT { public int mm; @@ -4391,7 +4391,7 @@ public struct METAFILEPICT public IntPtr hMF; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct METAHEADER { public int mtType; @@ -4403,7 +4403,7 @@ public struct METAHEADER public int mtNoParameters; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ENHMETARECORD { public int iType; @@ -4411,14 +4411,14 @@ public struct ENHMETARECORD public int dParm; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SIZEL { public int cx; public int cy; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ENHMETAHEADER { public int iType; @@ -4438,7 +4438,7 @@ public struct ENHMETAHEADER public SIZEL szlMillimeters; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct TEXTMETRIC { public int tmHeight; @@ -4464,13 +4464,13 @@ public struct TEXTMETRIC } // ntmFlags field flags - public const int NTM_REGULAR = unchecked( (int)( 0x40 ) ); - public const int NTM_BOLD = unchecked( (int)( 0x20 ) ); - public const int NTM_ITALIC = unchecked( (int)( 0x1 ) ); + public const int NTM_REGULAR = unchecked((int)(0x40)); + public const int NTM_BOLD = unchecked((int)(0x20)); + public const int NTM_ITALIC = unchecked((int)(0x1)); // Structure passed to FONTENUMPROC // NOTE: NEWTEXTMETRIC is the same as TEXTMETRIC plus 4 new fields - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct NEWTEXTMETRIC { public int tmHeight; @@ -4500,15 +4500,15 @@ public struct NEWTEXTMETRIC } // tmPitchAndFamily flags - public const int TMPF_FIXED_PITCH = unchecked( (int)( 0x1 ) ); - public const int TMPF_VECTOR = unchecked( (int)( 0x2 ) ); - public const int TMPF_DEVICE = unchecked( (int)( 0x8 ) ); - public const int TMPF_TRUETYPE = unchecked( (int)( 0x4 ) ); + public const int TMPF_FIXED_PITCH = unchecked((int)(0x1)); + public const int TMPF_VECTOR = unchecked((int)(0x2)); + public const int TMPF_DEVICE = unchecked((int)(0x8)); + public const int TMPF_TRUETYPE = unchecked((int)(0x4)); // GDI Logical Objects: - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PELARRAY { public int paXCount; @@ -4519,7 +4519,7 @@ public struct PELARRAY } // Logical Brush (or Pattern) - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct LOGBRUSH { public int lbStyle; @@ -4528,7 +4528,7 @@ public struct LOGBRUSH } // Logical Pen - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct LOGPEN { public int lopnStyle; @@ -4536,7 +4536,7 @@ public struct LOGPEN public int lopnColor; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EXTLOGPEN { public int elpPenStyle; @@ -4548,7 +4548,7 @@ public struct EXTLOGPEN public int elpStyleEntry; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PALETTEENTRY { public byte peRed; @@ -4558,7 +4558,7 @@ public struct PALETTEENTRY } // Logical Palette - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct LOGPALETTE { public int palVersion; @@ -4567,10 +4567,10 @@ public struct LOGPALETTE } // Logical Font - public const int LF_FACESIZE = unchecked( (int)( 32 ) ); - public const int LF_FULLFACESIZE = unchecked( (int)( 64 ) ); + public const int LF_FACESIZE = unchecked((int)(32)); + public const int LF_FULLFACESIZE = unchecked((int)(64)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct LOGFONT { public int lfHeight; @@ -4589,7 +4589,7 @@ public struct LOGFONT public int lfFaceName; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct NONCLIENTMETRICS { public int cbSize; @@ -4609,7 +4609,7 @@ public struct NONCLIENTMETRICS public LOGFONT lfMessageFont; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ENUMLOGFONT { public LOGFONT elfLogFont; @@ -4617,88 +4617,88 @@ public struct ENUMLOGFONT public int elfStyle; } - public const int OUT_DEFAULT_PRECIS = unchecked( (int)( 0 ) ); - public const int OUT_STRING_PRECIS = unchecked( (int)( 1 ) ); - public const int OUT_CHARACTER_PRECIS = unchecked( (int)( 2 ) ); - public const int OUT_STROKE_PRECIS = unchecked( (int)( 3 ) ); - public const int OUT_TT_PRECIS = unchecked( (int)( 4 ) ); - public const int OUT_DEVICE_PRECIS = unchecked( (int)( 5 ) ); - public const int OUT_RASTER_PRECIS = unchecked( (int)( 6 ) ); - public const int OUT_TT_ONLY_PRECIS = unchecked( (int)( 7 ) ); - public const int OUT_OUTLINE_PRECIS = unchecked( (int)( 8 ) ); - - public const int CLIP_DEFAULT_PRECIS = unchecked( (int)( 0 ) ); - public const int CLIP_CHARACTER_PRECIS = unchecked( (int)( 1 ) ); - public const int CLIP_STROKE_PRECIS = unchecked( (int)( 2 ) ); - public const int CLIP_MASK = unchecked( (int)( 0xF ) ); - public const int CLIP_LH_ANGLES = unchecked( (int)( 16 ) ); - public const int CLIP_TT_ALWAYS = unchecked( (int)( 32 ) ); - public const int CLIP_EMBEDDED = unchecked( (int)( 128 ) ); - - public const int DEFAULT_QUALITY = unchecked( (int)( 0 ) ); - public const int DRAFT_QUALITY = unchecked( (int)( 1 ) ); - public const int PROOF_QUALITY = unchecked( (int)( 2 ) ); - - public const int DEFAULT_PITCH = unchecked( (int)( 0 ) ); - public const int FIXED_PITCH = unchecked( (int)( 1 ) ); - public const int VARIABLE_PITCH = unchecked( (int)( 2 ) ); - - public const int ANSI_CHARSET = unchecked( (int)( 0 ) ); - public const int DEFAULT_CHARSET = unchecked( (int)( 1 ) ); - public const int SYMBOL_CHARSET = unchecked( (int)( 2 ) ); - public const int SHIFTJIS_CHARSET = unchecked( (int)( 128 ) ); - public const int HANGEUL_CHARSET = unchecked( (int)( 129 ) ); - public const int CHINESEBIG5_CHARSET = unchecked( (int)( 136 ) ); - public const int OEM_CHARSET = unchecked( (int)( 255 ) ); + public const int OUT_DEFAULT_PRECIS = unchecked((int)(0)); + public const int OUT_STRING_PRECIS = unchecked((int)(1)); + public const int OUT_CHARACTER_PRECIS = unchecked((int)(2)); + public const int OUT_STROKE_PRECIS = unchecked((int)(3)); + public const int OUT_TT_PRECIS = unchecked((int)(4)); + public const int OUT_DEVICE_PRECIS = unchecked((int)(5)); + public const int OUT_RASTER_PRECIS = unchecked((int)(6)); + public const int OUT_TT_ONLY_PRECIS = unchecked((int)(7)); + public const int OUT_OUTLINE_PRECIS = unchecked((int)(8)); + + public const int CLIP_DEFAULT_PRECIS = unchecked((int)(0)); + public const int CLIP_CHARACTER_PRECIS = unchecked((int)(1)); + public const int CLIP_STROKE_PRECIS = unchecked((int)(2)); + public const int CLIP_MASK = unchecked((int)(0xF)); + public const int CLIP_LH_ANGLES = unchecked((int)(16)); + public const int CLIP_TT_ALWAYS = unchecked((int)(32)); + public const int CLIP_EMBEDDED = unchecked((int)(128)); + + public const int DEFAULT_QUALITY = unchecked((int)(0)); + public const int DRAFT_QUALITY = unchecked((int)(1)); + public const int PROOF_QUALITY = unchecked((int)(2)); + + public const int DEFAULT_PITCH = unchecked((int)(0)); + public const int FIXED_PITCH = unchecked((int)(1)); + public const int VARIABLE_PITCH = unchecked((int)(2)); + + public const int ANSI_CHARSET = unchecked((int)(0)); + public const int DEFAULT_CHARSET = unchecked((int)(1)); + public const int SYMBOL_CHARSET = unchecked((int)(2)); + public const int SHIFTJIS_CHARSET = unchecked((int)(128)); + public const int HANGEUL_CHARSET = unchecked((int)(129)); + public const int CHINESEBIG5_CHARSET = unchecked((int)(136)); + public const int OEM_CHARSET = unchecked((int)(255)); // Font Families // - public const int FF_DONTCARE = unchecked( (int)( 0 ) );// Don't care or don't know. - public const int FF_ROMAN = unchecked( (int)( 16 ) );// Variable stroke width, serifed. + public const int FF_DONTCARE = unchecked((int)(0));// Don't care or don't know. + public const int FF_ROMAN = unchecked((int)(16));// Variable stroke width, serifed. // Times Roman, Century Schoolbook, etc. - public const int FF_SWISS = unchecked( (int)( 32 ) );// Variable stroke width, sans-serifed. + public const int FF_SWISS = unchecked((int)(32));// Variable stroke width, sans-serifed. // Helvetica, Swiss, etc. - public const int FF_MODERN = unchecked( (int)( 48 ) );// Constant stroke width, serifed or sans-serifed. + public const int FF_MODERN = unchecked((int)(48));// Constant stroke width, serifed or sans-serifed. // Pica, Elite, Courier, etc. - public const int FF_SCRIPT = unchecked( (int)( 64 ) );// Cursive, etc. - public const int FF_DECORATIVE = unchecked( (int)( 80 ) );// Old English, etc. + public const int FF_SCRIPT = unchecked((int)(64));// Cursive, etc. + public const int FF_DECORATIVE = unchecked((int)(80));// Old English, etc. // Font Weights - public const int FW_DONTCARE = unchecked( (int)( 0 ) ); - public const int FW_THIN = unchecked( (int)( 100 ) ); - public const int FW_EXTRALIGHT = unchecked( (int)( 200 ) ); - public const int FW_LIGHT = unchecked( (int)( 300 ) ); - public const int FW_NORMAL = unchecked( (int)( 400 ) ); - public const int FW_MEDIUM = unchecked( (int)( 500 ) ); - public const int FW_SEMIBOLD = unchecked( (int)( 600 ) ); - public const int FW_BOLD = unchecked( (int)( 700 ) ); - public const int FW_EXTRABOLD = unchecked( (int)( 800 ) ); - public const int FW_HEAVY = unchecked( (int)( 900 ) ); - - public const int FW_ULTRALIGHT = unchecked( (int)( FW_EXTRALIGHT ) ); - public const int FW_REGULAR = unchecked( (int)( FW_NORMAL ) ); - public const int FW_DEMIBOLD = unchecked( (int)( FW_SEMIBOLD ) ); - public const int FW_ULTRABOLD = unchecked( (int)( FW_EXTRABOLD ) ); - public const int FW_BLACK = unchecked( (int)( FW_HEAVY ) ); - - public const int PANOSE_COUNT = unchecked( (int)( 10 ) ); - public const int PAN_FAMILYTYPE_INDEX = unchecked( (int)( 0 ) ); - public const int PAN_SERIFSTYLE_INDEX = unchecked( (int)( 1 ) ); - public const int PAN_WEIGHT_INDEX = unchecked( (int)( 2 ) ); - public const int PAN_PROPORTION_INDEX = unchecked( (int)( 3 ) ); - public const int PAN_CONTRAST_INDEX = unchecked( (int)( 4 ) ); - public const int PAN_STROKEVARIATION_INDEX = unchecked( (int)( 5 ) ); - public const int PAN_ARMSTYLE_INDEX = unchecked( (int)( 6 ) ); - public const int PAN_LETTERFORM_INDEX = unchecked( (int)( 7 ) ); - public const int PAN_MIDLINE_INDEX = unchecked( (int)( 8 ) ); - public const int PAN_XHEIGHT_INDEX = unchecked( (int)( 9 ) ); - - public const int PAN_CULTURE_LATIN = unchecked( (int)( 0 ) ); - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int FW_DONTCARE = unchecked((int)(0)); + public const int FW_THIN = unchecked((int)(100)); + public const int FW_EXTRALIGHT = unchecked((int)(200)); + public const int FW_LIGHT = unchecked((int)(300)); + public const int FW_NORMAL = unchecked((int)(400)); + public const int FW_MEDIUM = unchecked((int)(500)); + public const int FW_SEMIBOLD = unchecked((int)(600)); + public const int FW_BOLD = unchecked((int)(700)); + public const int FW_EXTRABOLD = unchecked((int)(800)); + public const int FW_HEAVY = unchecked((int)(900)); + + public const int FW_ULTRALIGHT = unchecked((int)(FW_EXTRALIGHT)); + public const int FW_REGULAR = unchecked((int)(FW_NORMAL)); + public const int FW_DEMIBOLD = unchecked((int)(FW_SEMIBOLD)); + public const int FW_ULTRABOLD = unchecked((int)(FW_EXTRABOLD)); + public const int FW_BLACK = unchecked((int)(FW_HEAVY)); + + public const int PANOSE_COUNT = unchecked((int)(10)); + public const int PAN_FAMILYTYPE_INDEX = unchecked((int)(0)); + public const int PAN_SERIFSTYLE_INDEX = unchecked((int)(1)); + public const int PAN_WEIGHT_INDEX = unchecked((int)(2)); + public const int PAN_PROPORTION_INDEX = unchecked((int)(3)); + public const int PAN_CONTRAST_INDEX = unchecked((int)(4)); + public const int PAN_STROKEVARIATION_INDEX = unchecked((int)(5)); + public const int PAN_ARMSTYLE_INDEX = unchecked((int)(6)); + public const int PAN_LETTERFORM_INDEX = unchecked((int)(7)); + public const int PAN_MIDLINE_INDEX = unchecked((int)(8)); + public const int PAN_XHEIGHT_INDEX = unchecked((int)(9)); + + public const int PAN_CULTURE_LATIN = unchecked((int)(0)); + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PANOSE { public int ulculture; @@ -4714,115 +4714,115 @@ public struct PANOSE public byte bXHeight; } - public const int PAN_ANY = unchecked( (int)( 0 ) );// Any - public const int PAN_NO_FIT = unchecked( (int)( 1 ) );// No Fit - - public const int PAN_FAMILY_TEXT_DISPLAY = unchecked( (int)( 2 ) );// Text and Display - public const int PAN_FAMILY_SCRIPT = unchecked( (int)( 3 ) );// Script - public const int PAN_FAMILY_DECORATIVE = unchecked( (int)( 4 ) );// Decorative - public const int PAN_FAMILY_PICTORIAL = unchecked( (int)( 5 ) );// Pictorial - - public const int PAN_SERIF_COVE = unchecked( (int)( 2 ) );// Cove - public const int PAN_SERIF_OBTUSE_COVE = unchecked( (int)( 3 ) );// Obtuse Cove - public const int PAN_SERIF_SQUARE_COVE = unchecked( (int)( 4 ) );// Square Cove - public const int PAN_SERIF_OBTUSE_SQUARE_COVE = unchecked( (int)( 5 ) );// Obtuse Square Cove - public const int PAN_SERIF_SQUARE = unchecked( (int)( 6 ) );// Square - public const int PAN_SERIF_THIN = unchecked( (int)( 7 ) );// Thin - public const int PAN_SERIF_BONE = unchecked( (int)( 8 ) );// Bone - public const int PAN_SERIF_EXAGGERATED = unchecked( (int)( 9 ) );// Exaggerated - public const int PAN_SERIF_TRIANGLE = unchecked( (int)( 10 ) );// Triangle - public const int PAN_SERIF_NORMAL_SANS = unchecked( (int)( 11 ) );// Normal Sans - public const int PAN_SERIF_OBTUSE_SANS = unchecked( (int)( 12 ) );// Obtuse Sans - public const int PAN_SERIF_PERP_SANS = unchecked( (int)( 13 ) );// Prep Sans - public const int PAN_SERIF_FLARED = unchecked( (int)( 14 ) );// Flared - public const int PAN_SERIF_ROUNDED = unchecked( (int)( 15 ) );// Rounded - - public const int PAN_WEIGHT_VERY_LIGHT = unchecked( (int)( 2 ) );// Very Light - public const int PAN_WEIGHT_LIGHT = unchecked( (int)( 3 ) );// Light - public const int PAN_WEIGHT_THIN = unchecked( (int)( 4 ) );// Thin - public const int PAN_WEIGHT_BOOK = unchecked( (int)( 5 ) );// Book - public const int PAN_WEIGHT_MEDIUM = unchecked( (int)( 6 ) );// Medium - public const int PAN_WEIGHT_DEMI = unchecked( (int)( 7 ) );// Demi - public const int PAN_WEIGHT_BOLD = unchecked( (int)( 8 ) );// Bold - public const int PAN_WEIGHT_HEAVY = unchecked( (int)( 9 ) );// Heavy - public const int PAN_WEIGHT_BLACK = unchecked( (int)( 10 ) );// Black - public const int PAN_WEIGHT_NORD = unchecked( (int)( 11 ) );// Nord - - public const int PAN_PROP_OLD_STYLE = unchecked( (int)( 2 ) );// Old Style - public const int PAN_PROP_MODERN = unchecked( (int)( 3 ) );// Modern - public const int PAN_PROP_EVEN_WIDTH = unchecked( (int)( 4 ) );// Even Width - public const int PAN_PROP_EXPANDED = unchecked( (int)( 5 ) );// Expanded - public const int PAN_PROP_CONDENSED = unchecked( (int)( 6 ) );// Condensed - public const int PAN_PROP_VERY_EXPANDED = unchecked( (int)( 7 ) );// Very Expanded - public const int PAN_PROP_VERY_CONDENSED = unchecked( (int)( 8 ) );// Very Condensed - public const int PAN_PROP_MONOSPACED = unchecked( (int)( 9 ) );// Monospaced - - public const int PAN_CONTRAST_NONE = unchecked( (int)( 2 ) );// None - public const int PAN_CONTRAST_VERY_LOW = unchecked( (int)( 3 ) );// Very Low - public const int PAN_CONTRAST_LOW = unchecked( (int)( 4 ) );// Low - public const int PAN_CONTRAST_MEDIUM_LOW = unchecked( (int)( 5 ) );// Medium Low - public const int PAN_CONTRAST_MEDIUM = unchecked( (int)( 6 ) );// Medium - public const int PAN_CONTRAST_MEDIUM_HIGH = unchecked( (int)( 7 ) );// Mediim High - public const int PAN_CONTRAST_HIGH = unchecked( (int)( 8 ) );// High - public const int PAN_CONTRAST_VERY_HIGH = unchecked( (int)( 9 ) );// Very High - - public const int PAN_STROKE_GRADUAL_DIAG = unchecked( (int)( 2 ) );// Gradual/Diagonal - public const int PAN_STROKE_GRADUAL_TRAN = unchecked( (int)( 3 ) );// Gradual/Transitional - public const int PAN_STROKE_GRADUAL_VERT = unchecked( (int)( 4 ) );// Gradual/Vertical - public const int PAN_STROKE_GRADUAL_HORZ = unchecked( (int)( 5 ) );// Gradual/Horizontal - public const int PAN_STROKE_RAPID_VERT = unchecked( (int)( 6 ) );// Rapid/Vertical - public const int PAN_STROKE_RAPID_HORZ = unchecked( (int)( 7 ) );// Rapid/Horizontal - public const int PAN_STROKE_INSTANT_VERT = unchecked( (int)( 8 ) );// Instant/Vertical - - public const int PAN_STRAIGHT_ARMS_HORZ = unchecked( (int)( 2 ) );// Straight Arms/Horizontal - public const int PAN_STRAIGHT_ARMS_WEDGE = unchecked( (int)( 3 ) );// Straight Arms/Wedge - public const int PAN_STRAIGHT_ARMS_VERT = unchecked( (int)( 4 ) );// Straight Arms/Vertical - public const int PAN_STRAIGHT_ARMS_SINGLE_SERIF = unchecked( (int)( 5 ) );// Straight Arms/Single-Serif - public const int PAN_STRAIGHT_ARMS_DOUBLE_SERIF = unchecked( (int)( 6 ) );// Straight Arms/Double-Serif - public const int PAN_BENT_ARMS_HORZ = unchecked( (int)( 7 ) );// Non-Straight Arms/Horizontal - public const int PAN_BENT_ARMS_WEDGE = unchecked( (int)( 8 ) );// Non-Straight Arms/Wedge - public const int PAN_BENT_ARMS_VERT = unchecked( (int)( 9 ) );// Non-Straight Arms/Vertical - public const int PAN_BENT_ARMS_SINGLE_SERIF = unchecked( (int)( 10 ) );// Non-Straight Arms/Single-Serif - public const int PAN_BENT_ARMS_DOUBLE_SERIF = unchecked( (int)( 11 ) );// Non-Straight Arms/Double-Serif - - public const int PAN_LETT_NORMAL_CONTACT = unchecked( (int)( 2 ) );// Normal/Contact - public const int PAN_LETT_NORMAL_WEIGHTED = unchecked( (int)( 3 ) );// Normal/Weighted - public const int PAN_LETT_NORMAL_BOXED = unchecked( (int)( 4 ) );// Normal/Boxed - public const int PAN_LETT_NORMAL_FLATTENED = unchecked( (int)( 5 ) );// Normal/Flattened - public const int PAN_LETT_NORMAL_ROUNDED = unchecked( (int)( 6 ) );// Normal/Rounded - public const int PAN_LETT_NORMAL_OFF_CENTER = unchecked( (int)( 7 ) );// Normal/Off Center - public const int PAN_LETT_NORMAL_SQUARE = unchecked( (int)( 8 ) );// Normal/Square - public const int PAN_LETT_OBLIQUE_CONTACT = unchecked( (int)( 9 ) );// Oblique/Contact - public const int PAN_LETT_OBLIQUE_WEIGHTED = unchecked( (int)( 10 ) );// Oblique/Weighted - public const int PAN_LETT_OBLIQUE_BOXED = unchecked( (int)( 11 ) );// Oblique/Boxed - public const int PAN_LETT_OBLIQUE_FLATTENED = unchecked( (int)( 12 ) );// Oblique/Flattened - public const int PAN_LETT_OBLIQUE_ROUNDED = unchecked( (int)( 13 ) );// Oblique/Rounded - public const int PAN_LETT_OBLIQUE_OFF_CENTER = unchecked( (int)( 14 ) );// Oblique/Off Center - public const int PAN_LETT_OBLIQUE_SQUARE = unchecked( (int)( 15 ) );// Oblique/Square - - public const int PAN_MIDLINE_STANDARD_TRIMMED = unchecked( (int)( 2 ) );// Standard/Trimmed - public const int PAN_MIDLINE_STANDARD_POINTED = unchecked( (int)( 3 ) );// Standard/Pointed - public const int PAN_MIDLINE_STANDARD_SERIFED = unchecked( (int)( 4 ) );// Standard/Serifed - public const int PAN_MIDLINE_HIGH_TRIMMED = unchecked( (int)( 5 ) );// High/Trimmed - public const int PAN_MIDLINE_HIGH_POINTED = unchecked( (int)( 6 ) );// High/Pointed - public const int PAN_MIDLINE_HIGH_SERIFED = unchecked( (int)( 7 ) );// High/Serifed - public const int PAN_MIDLINE_CONSTANT_TRIMMED = unchecked( (int)( 8 ) );// Constant/Trimmed - public const int PAN_MIDLINE_CONSTANT_POINTED = unchecked( (int)( 9 ) );// Constant/Pointed - public const int PAN_MIDLINE_CONSTANT_SERIFED = unchecked( (int)( 10 ) );// Constant/Serifed - public const int PAN_MIDLINE_LOW_TRIMMED = unchecked( (int)( 11 ) );// Low/Trimmed - public const int PAN_MIDLINE_LOW_POINTED = unchecked( (int)( 12 ) );// Low/Pointed - public const int PAN_MIDLINE_LOW_SERIFED = unchecked( (int)( 13 ) );// Low/Serifed - - public const int PAN_XHEIGHT_CONSTANT_SMALL = unchecked( (int)( 2 ) );// Constant/Small - public const int PAN_XHEIGHT_CONSTANT_STD = unchecked( (int)( 3 ) );// Constant/Standard - public const int PAN_XHEIGHT_CONSTANT_LARGE = unchecked( (int)( 4 ) );// Constant/Large - public const int PAN_XHEIGHT_DUCKING_SMALL = unchecked( (int)( 5 ) );// Ducking/Small - public const int PAN_XHEIGHT_DUCKING_STD = unchecked( (int)( 6 ) );// Ducking/Standard - public const int PAN_XHEIGHT_DUCKING_LARGE = unchecked( (int)( 7 ) );// Ducking/Large - - public const int ELF_VENDOR_SIZE = unchecked( (int)( 4 ) ); - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int PAN_ANY = unchecked((int)(0));// Any + public const int PAN_NO_FIT = unchecked((int)(1));// No Fit + + public const int PAN_FAMILY_TEXT_DISPLAY = unchecked((int)(2));// Text and Display + public const int PAN_FAMILY_SCRIPT = unchecked((int)(3));// Script + public const int PAN_FAMILY_DECORATIVE = unchecked((int)(4));// Decorative + public const int PAN_FAMILY_PICTORIAL = unchecked((int)(5));// Pictorial + + public const int PAN_SERIF_COVE = unchecked((int)(2));// Cove + public const int PAN_SERIF_OBTUSE_COVE = unchecked((int)(3));// Obtuse Cove + public const int PAN_SERIF_SQUARE_COVE = unchecked((int)(4));// Square Cove + public const int PAN_SERIF_OBTUSE_SQUARE_COVE = unchecked((int)(5));// Obtuse Square Cove + public const int PAN_SERIF_SQUARE = unchecked((int)(6));// Square + public const int PAN_SERIF_THIN = unchecked((int)(7));// Thin + public const int PAN_SERIF_BONE = unchecked((int)(8));// Bone + public const int PAN_SERIF_EXAGGERATED = unchecked((int)(9));// Exaggerated + public const int PAN_SERIF_TRIANGLE = unchecked((int)(10));// Triangle + public const int PAN_SERIF_NORMAL_SANS = unchecked((int)(11));// Normal Sans + public const int PAN_SERIF_OBTUSE_SANS = unchecked((int)(12));// Obtuse Sans + public const int PAN_SERIF_PERP_SANS = unchecked((int)(13));// Prep Sans + public const int PAN_SERIF_FLARED = unchecked((int)(14));// Flared + public const int PAN_SERIF_ROUNDED = unchecked((int)(15));// Rounded + + public const int PAN_WEIGHT_VERY_LIGHT = unchecked((int)(2));// Very Light + public const int PAN_WEIGHT_LIGHT = unchecked((int)(3));// Light + public const int PAN_WEIGHT_THIN = unchecked((int)(4));// Thin + public const int PAN_WEIGHT_BOOK = unchecked((int)(5));// Book + public const int PAN_WEIGHT_MEDIUM = unchecked((int)(6));// Medium + public const int PAN_WEIGHT_DEMI = unchecked((int)(7));// Demi + public const int PAN_WEIGHT_BOLD = unchecked((int)(8));// Bold + public const int PAN_WEIGHT_HEAVY = unchecked((int)(9));// Heavy + public const int PAN_WEIGHT_BLACK = unchecked((int)(10));// Black + public const int PAN_WEIGHT_NORD = unchecked((int)(11));// Nord + + public const int PAN_PROP_OLD_STYLE = unchecked((int)(2));// Old Style + public const int PAN_PROP_MODERN = unchecked((int)(3));// Modern + public const int PAN_PROP_EVEN_WIDTH = unchecked((int)(4));// Even Width + public const int PAN_PROP_EXPANDED = unchecked((int)(5));// Expanded + public const int PAN_PROP_CONDENSED = unchecked((int)(6));// Condensed + public const int PAN_PROP_VERY_EXPANDED = unchecked((int)(7));// Very Expanded + public const int PAN_PROP_VERY_CONDENSED = unchecked((int)(8));// Very Condensed + public const int PAN_PROP_MONOSPACED = unchecked((int)(9));// Monospaced + + public const int PAN_CONTRAST_NONE = unchecked((int)(2));// None + public const int PAN_CONTRAST_VERY_LOW = unchecked((int)(3));// Very Low + public const int PAN_CONTRAST_LOW = unchecked((int)(4));// Low + public const int PAN_CONTRAST_MEDIUM_LOW = unchecked((int)(5));// Medium Low + public const int PAN_CONTRAST_MEDIUM = unchecked((int)(6));// Medium + public const int PAN_CONTRAST_MEDIUM_HIGH = unchecked((int)(7));// Mediim High + public const int PAN_CONTRAST_HIGH = unchecked((int)(8));// High + public const int PAN_CONTRAST_VERY_HIGH = unchecked((int)(9));// Very High + + public const int PAN_STROKE_GRADUAL_DIAG = unchecked((int)(2));// Gradual/Diagonal + public const int PAN_STROKE_GRADUAL_TRAN = unchecked((int)(3));// Gradual/Transitional + public const int PAN_STROKE_GRADUAL_VERT = unchecked((int)(4));// Gradual/Vertical + public const int PAN_STROKE_GRADUAL_HORZ = unchecked((int)(5));// Gradual/Horizontal + public const int PAN_STROKE_RAPID_VERT = unchecked((int)(6));// Rapid/Vertical + public const int PAN_STROKE_RAPID_HORZ = unchecked((int)(7));// Rapid/Horizontal + public const int PAN_STROKE_INSTANT_VERT = unchecked((int)(8));// Instant/Vertical + + public const int PAN_STRAIGHT_ARMS_HORZ = unchecked((int)(2));// Straight Arms/Horizontal + public const int PAN_STRAIGHT_ARMS_WEDGE = unchecked((int)(3));// Straight Arms/Wedge + public const int PAN_STRAIGHT_ARMS_VERT = unchecked((int)(4));// Straight Arms/Vertical + public const int PAN_STRAIGHT_ARMS_SINGLE_SERIF = unchecked((int)(5));// Straight Arms/Single-Serif + public const int PAN_STRAIGHT_ARMS_DOUBLE_SERIF = unchecked((int)(6));// Straight Arms/Double-Serif + public const int PAN_BENT_ARMS_HORZ = unchecked((int)(7));// Non-Straight Arms/Horizontal + public const int PAN_BENT_ARMS_WEDGE = unchecked((int)(8));// Non-Straight Arms/Wedge + public const int PAN_BENT_ARMS_VERT = unchecked((int)(9));// Non-Straight Arms/Vertical + public const int PAN_BENT_ARMS_SINGLE_SERIF = unchecked((int)(10));// Non-Straight Arms/Single-Serif + public const int PAN_BENT_ARMS_DOUBLE_SERIF = unchecked((int)(11));// Non-Straight Arms/Double-Serif + + public const int PAN_LETT_NORMAL_CONTACT = unchecked((int)(2));// Normal/Contact + public const int PAN_LETT_NORMAL_WEIGHTED = unchecked((int)(3));// Normal/Weighted + public const int PAN_LETT_NORMAL_BOXED = unchecked((int)(4));// Normal/Boxed + public const int PAN_LETT_NORMAL_FLATTENED = unchecked((int)(5));// Normal/Flattened + public const int PAN_LETT_NORMAL_ROUNDED = unchecked((int)(6));// Normal/Rounded + public const int PAN_LETT_NORMAL_OFF_CENTER = unchecked((int)(7));// Normal/Off Center + public const int PAN_LETT_NORMAL_SQUARE = unchecked((int)(8));// Normal/Square + public const int PAN_LETT_OBLIQUE_CONTACT = unchecked((int)(9));// Oblique/Contact + public const int PAN_LETT_OBLIQUE_WEIGHTED = unchecked((int)(10));// Oblique/Weighted + public const int PAN_LETT_OBLIQUE_BOXED = unchecked((int)(11));// Oblique/Boxed + public const int PAN_LETT_OBLIQUE_FLATTENED = unchecked((int)(12));// Oblique/Flattened + public const int PAN_LETT_OBLIQUE_ROUNDED = unchecked((int)(13));// Oblique/Rounded + public const int PAN_LETT_OBLIQUE_OFF_CENTER = unchecked((int)(14));// Oblique/Off Center + public const int PAN_LETT_OBLIQUE_SQUARE = unchecked((int)(15));// Oblique/Square + + public const int PAN_MIDLINE_STANDARD_TRIMMED = unchecked((int)(2));// Standard/Trimmed + public const int PAN_MIDLINE_STANDARD_POINTED = unchecked((int)(3));// Standard/Pointed + public const int PAN_MIDLINE_STANDARD_SERIFED = unchecked((int)(4));// Standard/Serifed + public const int PAN_MIDLINE_HIGH_TRIMMED = unchecked((int)(5));// High/Trimmed + public const int PAN_MIDLINE_HIGH_POINTED = unchecked((int)(6));// High/Pointed + public const int PAN_MIDLINE_HIGH_SERIFED = unchecked((int)(7));// High/Serifed + public const int PAN_MIDLINE_CONSTANT_TRIMMED = unchecked((int)(8));// Constant/Trimmed + public const int PAN_MIDLINE_CONSTANT_POINTED = unchecked((int)(9));// Constant/Pointed + public const int PAN_MIDLINE_CONSTANT_SERIFED = unchecked((int)(10));// Constant/Serifed + public const int PAN_MIDLINE_LOW_TRIMMED = unchecked((int)(11));// Low/Trimmed + public const int PAN_MIDLINE_LOW_POINTED = unchecked((int)(12));// Low/Pointed + public const int PAN_MIDLINE_LOW_SERIFED = unchecked((int)(13));// Low/Serifed + + public const int PAN_XHEIGHT_CONSTANT_SMALL = unchecked((int)(2));// Constant/Small + public const int PAN_XHEIGHT_CONSTANT_STD = unchecked((int)(3));// Constant/Standard + public const int PAN_XHEIGHT_CONSTANT_LARGE = unchecked((int)(4));// Constant/Large + public const int PAN_XHEIGHT_DUCKING_SMALL = unchecked((int)(5));// Ducking/Small + public const int PAN_XHEIGHT_DUCKING_STD = unchecked((int)(6));// Ducking/Standard + public const int PAN_XHEIGHT_DUCKING_LARGE = unchecked((int)(7));// Ducking/Large + + public const int ELF_VENDOR_SIZE = unchecked((int)(4)); + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EXTLOGFONT { public LOGFONT elfLogFont; @@ -4837,303 +4837,303 @@ public struct EXTLOGFONT public PANOSE elfPanose; } - public const int ELF_VERSION = unchecked( (int)( 0 ) ); - public const int ELF_CULTURE_LATIN = unchecked( (int)( 0 ) ); + public const int ELF_VERSION = unchecked((int)(0)); + public const int ELF_CULTURE_LATIN = unchecked((int)(0)); // EnumFonts Masks - public const int RASTER_FONTTYPE = unchecked( (int)( 0x1 ) ); - public const int DEVICE_FONTTYPE = unchecked( (int)( 0x2 ) ); - public const int TRUETYPE_FONTTYPE = unchecked( (int)( 0x4 ) ); + public const int RASTER_FONTTYPE = unchecked((int)(0x1)); + public const int DEVICE_FONTTYPE = unchecked((int)(0x2)); + public const int TRUETYPE_FONTTYPE = unchecked((int)(0x4)); // palette entry flags - public const int PC_RESERVED = unchecked( (int)( 0x1 ) );// palette index used for animation - public const int PC_EXPLICIT = unchecked( (int)( 0x2 ) );// palette index is explicit to device - public const int PC_NOCOLLAPSE = unchecked( (int)( 0x4 ) );// do not match color to system palette + public const int PC_RESERVED = unchecked((int)(0x1));// palette index used for animation + public const int PC_EXPLICIT = unchecked((int)(0x2));// palette index is explicit to device + public const int PC_NOCOLLAPSE = unchecked((int)(0x4));// do not match color to system palette // Background Modes - public const int TRANSPARENT = unchecked( (int)( 1 ) ); - public const int OPAQUE = unchecked( (int)( 2 ) ); - public const int BKMODE_LAST = unchecked( (int)( 2 ) ); + public const int TRANSPARENT = unchecked((int)(1)); + public const int OPAQUE = unchecked((int)(2)); + public const int BKMODE_LAST = unchecked((int)(2)); // Graphics Modes - public const int GM_COMPATIBLE = unchecked( (int)( 1 ) ); - public const int GM_ADVANCED = unchecked( (int)( 2 ) ); - public const int GM_LAST = unchecked( (int)( 2 ) ); + public const int GM_COMPATIBLE = unchecked((int)(1)); + public const int GM_ADVANCED = unchecked((int)(2)); + public const int GM_LAST = unchecked((int)(2)); // PolyDraw and GetPath point types - public const int PT_CLOSEFIGURE = unchecked( (int)( 0x1 ) ); - public const int PT_LINETO = unchecked( (int)( 0x2 ) ); - public const int PT_BEZIERTO = unchecked( (int)( 0x4 ) ); - public const int PT_MOVETO = unchecked( (int)( 0x6 ) ); + public const int PT_CLOSEFIGURE = unchecked((int)(0x1)); + public const int PT_LINETO = unchecked((int)(0x2)); + public const int PT_BEZIERTO = unchecked((int)(0x4)); + public const int PT_MOVETO = unchecked((int)(0x6)); // Mapping Modes - public const int MM_TEXT = unchecked( (int)( 1 ) ); - public const int MM_LOMETRIC = unchecked( (int)( 2 ) ); - public const int MM_HIMETRIC = unchecked( (int)( 3 ) ); - public const int MM_LOENGLISH = unchecked( (int)( 4 ) ); - public const int MM_HIENGLISH = unchecked( (int)( 5 ) ); - public const int MM_TWIPS = unchecked( (int)( 6 ) ); - public const int MM_ISOTROPIC = unchecked( (int)( 7 ) ); - public const int MM_ANISOTROPIC = unchecked( (int)( 8 ) ); + public const int MM_TEXT = unchecked((int)(1)); + public const int MM_LOMETRIC = unchecked((int)(2)); + public const int MM_HIMETRIC = unchecked((int)(3)); + public const int MM_LOENGLISH = unchecked((int)(4)); + public const int MM_HIENGLISH = unchecked((int)(5)); + public const int MM_TWIPS = unchecked((int)(6)); + public const int MM_ISOTROPIC = unchecked((int)(7)); + public const int MM_ANISOTROPIC = unchecked((int)(8)); // Min and Max Mapping Mode values - public const int MM_MIN = unchecked( (int)( MM_TEXT ) ); - public const int MM_MAX = unchecked( (int)( MM_ANISOTROPIC ) ); - public const int MM_MAX_FIXEDSCALE = unchecked( (int)( MM_TWIPS ) ); + public const int MM_MIN = unchecked((int)(MM_TEXT)); + public const int MM_MAX = unchecked((int)(MM_ANISOTROPIC)); + public const int MM_MAX_FIXEDSCALE = unchecked((int)(MM_TWIPS)); // Coordinate Modes - public const int ABSOLUTE = unchecked( (int)( 1 ) ); - public const int RELATIVE = unchecked( (int)( 2 ) ); + public const int ABSOLUTE = unchecked((int)(1)); + public const int RELATIVE = unchecked((int)(2)); // Stock Logical Objects - public const int WHITE_BRUSH = unchecked( (int)( 0 ) ); - public const int LTGRAY_BRUSH = unchecked( (int)( 1 ) ); - public const int GRAY_BRUSH = unchecked( (int)( 2 ) ); - public const int DKGRAY_BRUSH = unchecked( (int)( 3 ) ); - public const int BLACK_BRUSH = unchecked( (int)( 4 ) ); - public const int NULL_BRUSH = unchecked( (int)( 5 ) ); - public const int HOLLOW_BRUSH = unchecked( (int)( NULL_BRUSH ) ); - public const int WHITE_PEN = unchecked( (int)( 6 ) ); - public const int BLACK_PEN = unchecked( (int)( 7 ) ); - public const int NULL_PEN = unchecked( (int)( 8 ) ); - public const int OEM_FIXED_FONT = unchecked( (int)( 10 ) ); - public const int ANSI_FIXED_FONT = unchecked( (int)( 11 ) ); - public const int ANSI_VAR_FONT = unchecked( (int)( 12 ) ); - public const int SYSTEM_FONT = unchecked( (int)( 13 ) ); - public const int DEVICE_DEFAULT_FONT = unchecked( (int)( 14 ) ); - public const int DEFAULT_PALETTE = unchecked( (int)( 15 ) ); - public const int SYSTEM_FIXED_FONT = unchecked( (int)( 16 ) ); - public const int STOCK_LAST = unchecked( (int)( 16 ) ); - - public const int CLR_INVALID = unchecked( (int)( 0xFFFF ) ); + public const int WHITE_BRUSH = unchecked((int)(0)); + public const int LTGRAY_BRUSH = unchecked((int)(1)); + public const int GRAY_BRUSH = unchecked((int)(2)); + public const int DKGRAY_BRUSH = unchecked((int)(3)); + public const int BLACK_BRUSH = unchecked((int)(4)); + public const int NULL_BRUSH = unchecked((int)(5)); + public const int HOLLOW_BRUSH = unchecked((int)(NULL_BRUSH)); + public const int WHITE_PEN = unchecked((int)(6)); + public const int BLACK_PEN = unchecked((int)(7)); + public const int NULL_PEN = unchecked((int)(8)); + public const int OEM_FIXED_FONT = unchecked((int)(10)); + public const int ANSI_FIXED_FONT = unchecked((int)(11)); + public const int ANSI_VAR_FONT = unchecked((int)(12)); + public const int SYSTEM_FONT = unchecked((int)(13)); + public const int DEVICE_DEFAULT_FONT = unchecked((int)(14)); + public const int DEFAULT_PALETTE = unchecked((int)(15)); + public const int SYSTEM_FIXED_FONT = unchecked((int)(16)); + public const int STOCK_LAST = unchecked((int)(16)); + + public const int CLR_INVALID = unchecked((int)(0xFFFF)); // Brush Styles - public const int BS_SOLID = unchecked( (int)( 0 ) ); - public const int BS_NULL = unchecked( (int)( 1 ) ); - public const int BS_HOLLOW = unchecked( (int)( BS_NULL ) ); - public const int BS_HATCHED = unchecked( (int)( 2 ) ); - public const int BS_PATTERN = unchecked( (int)( 3 ) ); - public const int BS_INDEXED = unchecked( (int)( 4 ) ); - public const int BS_DIBPATTERN = unchecked( (int)( 5 ) ); - public const int BS_DIBPATTERNPT = unchecked( (int)( 6 ) ); - public const int BS_PATTERN8X8 = unchecked( (int)( 7 ) ); - public const int BS_DIBPATTERN8X8 = unchecked( (int)( 8 ) ); + public const int BS_SOLID = unchecked((int)(0)); + public const int BS_NULL = unchecked((int)(1)); + public const int BS_HOLLOW = unchecked((int)(BS_NULL)); + public const int BS_HATCHED = unchecked((int)(2)); + public const int BS_PATTERN = unchecked((int)(3)); + public const int BS_INDEXED = unchecked((int)(4)); + public const int BS_DIBPATTERN = unchecked((int)(5)); + public const int BS_DIBPATTERNPT = unchecked((int)(6)); + public const int BS_PATTERN8X8 = unchecked((int)(7)); + public const int BS_DIBPATTERN8X8 = unchecked((int)(8)); // Hatch Styles - public const int HS_HORIZONTAL = unchecked( (int)( 0 ) );// ----- - public const int HS_VERTICAL = unchecked( (int)( 1 ) );// ||||| - public const int HS_FDIAGONAL = unchecked( (int)( 2 ) );// \\\\\ - public const int HS_BDIAGONAL = unchecked( (int)( 3 ) );// ///// - public const int HS_CROSS = unchecked( (int)( 4 ) );// +++++ - public const int HS_DIAGCROSS = unchecked( (int)( 5 ) );// xxxxx - public const int HS_FDIAGONAL1 = unchecked( (int)( 6 ) ); - public const int HS_BDIAGONAL1 = unchecked( (int)( 7 ) ); - public const int HS_SOLID = unchecked( (int)( 8 ) ); - public const int HS_DENSE1 = unchecked( (int)( 9 ) ); - public const int HS_DENSE2 = unchecked( (int)( 10 ) ); - public const int HS_DENSE3 = unchecked( (int)( 11 ) ); - public const int HS_DENSE4 = unchecked( (int)( 12 ) ); - public const int HS_DENSE5 = unchecked( (int)( 13 ) ); - public const int HS_DENSE6 = unchecked( (int)( 14 ) ); - public const int HS_DENSE7 = unchecked( (int)( 15 ) ); - public const int HS_DENSE8 = unchecked( (int)( 16 ) ); - public const int HS_NOSHADE = unchecked( (int)( 17 ) ); - public const int HS_HALFTONE = unchecked( (int)( 18 ) ); - public const int HS_SOLIDCLR = unchecked( (int)( 19 ) ); - public const int HS_DITHEREDCLR = unchecked( (int)( 20 ) ); - public const int HS_SOLIDTEXTCLR = unchecked( (int)( 21 ) ); - public const int HS_DITHEREDTEXTCLR = unchecked( (int)( 22 ) ); - public const int HS_SOLIDBKCLR = unchecked( (int)( 23 ) ); - public const int HS_DITHEREDBKCLR = unchecked( (int)( 24 ) ); - public const int HS_API_MAX = unchecked( (int)( 25 ) ); + public const int HS_HORIZONTAL = unchecked((int)(0));// ----- + public const int HS_VERTICAL = unchecked((int)(1));// ||||| + public const int HS_FDIAGONAL = unchecked((int)(2));// \\\\\ + public const int HS_BDIAGONAL = unchecked((int)(3));// ///// + public const int HS_CROSS = unchecked((int)(4));// +++++ + public const int HS_DIAGCROSS = unchecked((int)(5));// xxxxx + public const int HS_FDIAGONAL1 = unchecked((int)(6)); + public const int HS_BDIAGONAL1 = unchecked((int)(7)); + public const int HS_SOLID = unchecked((int)(8)); + public const int HS_DENSE1 = unchecked((int)(9)); + public const int HS_DENSE2 = unchecked((int)(10)); + public const int HS_DENSE3 = unchecked((int)(11)); + public const int HS_DENSE4 = unchecked((int)(12)); + public const int HS_DENSE5 = unchecked((int)(13)); + public const int HS_DENSE6 = unchecked((int)(14)); + public const int HS_DENSE7 = unchecked((int)(15)); + public const int HS_DENSE8 = unchecked((int)(16)); + public const int HS_NOSHADE = unchecked((int)(17)); + public const int HS_HALFTONE = unchecked((int)(18)); + public const int HS_SOLIDCLR = unchecked((int)(19)); + public const int HS_DITHEREDCLR = unchecked((int)(20)); + public const int HS_SOLIDTEXTCLR = unchecked((int)(21)); + public const int HS_DITHEREDTEXTCLR = unchecked((int)(22)); + public const int HS_SOLIDBKCLR = unchecked((int)(23)); + public const int HS_DITHEREDBKCLR = unchecked((int)(24)); + public const int HS_API_MAX = unchecked((int)(25)); // Pen Styles - public const int PS_SOLID = unchecked( (int)( 0 ) ); - public const int PS_DASH = unchecked( (int)( 1 ) );// ------- - public const int PS_DOT = unchecked( (int)( 2 ) );// ....... - public const int PS_DASHDOT = unchecked( (int)( 3 ) );// _._._._ - public const int PS_DASHDOTDOT = unchecked( (int)( 4 ) );// _.._.._ - public const int PS_NULL = unchecked( (int)( 5 ) ); - public const int PS_INSIDEFRAME = unchecked( (int)( 6 ) ); - public const int PS_USERSTYLE = unchecked( (int)( 7 ) ); - public const int PS_ALTERNATE = unchecked( (int)( 8 ) ); - public const int PS_STYLE_MASK = unchecked( (int)( 0xF ) ); - - public const int PS_ENDCAP_ROUND = unchecked( (int)( 0x0 ) ); - public const int PS_ENDCAP_SQUARE = unchecked( (int)( 0x100 ) ); - public const int PS_ENDCAP_FLAT = unchecked( (int)( 0x200 ) ); - public const int PS_ENDCAP_MASK = unchecked( (int)( 0xF00 ) ); - - public const int PS_JOIN_ROUND = unchecked( (int)( 0x0 ) ); - public const int PS_JOIN_BEVEL = unchecked( (int)( 0x1000 ) ); - public const int PS_JOIN_MITER = unchecked( (int)( 0x2000 ) ); - public const int PS_JOIN_MASK = unchecked( (int)( 0xF000 ) ); - - public const int PS_COSMETIC = unchecked( (int)( 0x0 ) ); - public const int PS_GEOMETRIC = unchecked( (int)( 0x10000 ) ); - public const int PS_TYPE_MASK = unchecked( (int)( 0xF0000 ) ); - - public const int AD_COUNTERCLOCKWISE = unchecked( (int)( 1 ) ); - public const int AD_CLOCKWISE = unchecked( (int)( 2 ) ); + public const int PS_SOLID = unchecked((int)(0)); + public const int PS_DASH = unchecked((int)(1));// ------- + public const int PS_DOT = unchecked((int)(2));// ....... + public const int PS_DASHDOT = unchecked((int)(3));// _._._._ + public const int PS_DASHDOTDOT = unchecked((int)(4));// _.._.._ + public const int PS_NULL = unchecked((int)(5)); + public const int PS_INSIDEFRAME = unchecked((int)(6)); + public const int PS_USERSTYLE = unchecked((int)(7)); + public const int PS_ALTERNATE = unchecked((int)(8)); + public const int PS_STYLE_MASK = unchecked((int)(0xF)); + + public const int PS_ENDCAP_ROUND = unchecked((int)(0x0)); + public const int PS_ENDCAP_SQUARE = unchecked((int)(0x100)); + public const int PS_ENDCAP_FLAT = unchecked((int)(0x200)); + public const int PS_ENDCAP_MASK = unchecked((int)(0xF00)); + + public const int PS_JOIN_ROUND = unchecked((int)(0x0)); + public const int PS_JOIN_BEVEL = unchecked((int)(0x1000)); + public const int PS_JOIN_MITER = unchecked((int)(0x2000)); + public const int PS_JOIN_MASK = unchecked((int)(0xF000)); + + public const int PS_COSMETIC = unchecked((int)(0x0)); + public const int PS_GEOMETRIC = unchecked((int)(0x10000)); + public const int PS_TYPE_MASK = unchecked((int)(0xF0000)); + + public const int AD_COUNTERCLOCKWISE = unchecked((int)(1)); + public const int AD_CLOCKWISE = unchecked((int)(2)); // Device Parameters for GetDeviceCaps() - public const int DRIVERVERSION = unchecked( (int)( 0 ) );// Device driver version - public const int TECHNOLOGY = unchecked( (int)( 2 ) );// Device classification - public const int HORZSIZE = unchecked( (int)( 4 ) );// Horizontal size in millimeters - public const int VERTSIZE = unchecked( (int)( 6 ) );// Vertical size in millimeters - public const int HORZRES = unchecked( (int)( 8 ) );// Horizontal width in pixels - public const int VERTRES = unchecked( (int)( 10 ) );// Vertical width in pixels - public const int BITSPIXEL = unchecked( (int)( 12 ) );// Number of bits per pixel - public const int PLANES = unchecked( (int)( 14 ) );// Number of planes - public const int NUMBRUSHES = unchecked( (int)( 16 ) );// Number of brushes the device has - public const int NUMPENS = unchecked( (int)( 18 ) );// Number of pens the device has - public const int NUMMARKERS = unchecked( (int)( 20 ) );// Number of markers the device has - public const int NUMFONTS = unchecked( (int)( 22 ) );// Number of fonts the device has - public const int NUMCOLORS = unchecked( (int)( 24 ) );// Number of colors the device supports - public const int PDEVICESIZE = unchecked( (int)( 26 ) );// Size required for device descriptor - public const int CURVECAPS = unchecked( (int)( 28 ) );// Curve capabilities - public const int LINECAPS = unchecked( (int)( 30 ) );// Line capabilities - public const int POLYGONALCAPS = unchecked( (int)( 32 ) );// Polygonal capabilities - public const int TEXTCAPS = unchecked( (int)( 34 ) );// Text capabilities - public const int CLIPCAPS = unchecked( (int)( 36 ) );// Clipping capabilities - public const int RASTERCAPS = unchecked( (int)( 38 ) );// Bitblt capabilities - public const int ASPECTX = unchecked( (int)( 40 ) );// Length of the X leg - public const int ASPECTY = unchecked( (int)( 42 ) );// Length of the Y leg - public const int ASPECTXY = unchecked( (int)( 44 ) );// Length of the hypotenuse - - public const int LOGPIXELSX = unchecked( (int)( 88 ) );// Logical pixels/inch in X - public const int LOGPIXELSY = unchecked( (int)( 90 ) );// Logical pixels/inch in Y - - public const int SIZEPALETTE = unchecked( (int)( 104 ) );// Number of entries in physical palette - public const int NUMRESERVED = unchecked( (int)( 106 ) );// Number of reserved entries in palette - public const int COLORRES = unchecked( (int)( 108 ) );// Actual color resolution + public const int DRIVERVERSION = unchecked((int)(0));// Device driver version + public const int TECHNOLOGY = unchecked((int)(2));// Device classification + public const int HORZSIZE = unchecked((int)(4));// Horizontal size in millimeters + public const int VERTSIZE = unchecked((int)(6));// Vertical size in millimeters + public const int HORZRES = unchecked((int)(8));// Horizontal width in pixels + public const int VERTRES = unchecked((int)(10));// Vertical width in pixels + public const int BITSPIXEL = unchecked((int)(12));// Number of bits per pixel + public const int PLANES = unchecked((int)(14));// Number of planes + public const int NUMBRUSHES = unchecked((int)(16));// Number of brushes the device has + public const int NUMPENS = unchecked((int)(18));// Number of pens the device has + public const int NUMMARKERS = unchecked((int)(20));// Number of markers the device has + public const int NUMFONTS = unchecked((int)(22));// Number of fonts the device has + public const int NUMCOLORS = unchecked((int)(24));// Number of colors the device supports + public const int PDEVICESIZE = unchecked((int)(26));// Size required for device descriptor + public const int CURVECAPS = unchecked((int)(28));// Curve capabilities + public const int LINECAPS = unchecked((int)(30));// Line capabilities + public const int POLYGONALCAPS = unchecked((int)(32));// Polygonal capabilities + public const int TEXTCAPS = unchecked((int)(34));// Text capabilities + public const int CLIPCAPS = unchecked((int)(36));// Clipping capabilities + public const int RASTERCAPS = unchecked((int)(38));// Bitblt capabilities + public const int ASPECTX = unchecked((int)(40));// Length of the X leg + public const int ASPECTY = unchecked((int)(42));// Length of the Y leg + public const int ASPECTXY = unchecked((int)(44));// Length of the hypotenuse + + public const int LOGPIXELSX = unchecked((int)(88));// Logical pixels/inch in X + public const int LOGPIXELSY = unchecked((int)(90));// Logical pixels/inch in Y + + public const int SIZEPALETTE = unchecked((int)(104));// Number of entries in physical palette + public const int NUMRESERVED = unchecked((int)(106));// Number of reserved entries in palette + public const int COLORRES = unchecked((int)(108));// Actual color resolution // Printing related DeviceCaps. These replace the appropriate Escapes - public const int PHYSICALWIDTH = unchecked( (int)( 110 ) );// Physical Width in device units - public const int PHYSICALHEIGHT = unchecked( (int)( 111 ) );// Physical Height in device units - public const int PHYSICALOFFSETX = unchecked( (int)( 112 ) );// Physical Printable Area x margin - public const int PHYSICALOFFSETY = unchecked( (int)( 113 ) );// Physical Printable Area y margin - public const int SCALINGFACTORX = unchecked( (int)( 114 ) );// Scaling factor x - public const int SCALINGFACTORY = unchecked( (int)( 115 ) );// Scaling factor y + public const int PHYSICALWIDTH = unchecked((int)(110));// Physical Width in device units + public const int PHYSICALHEIGHT = unchecked((int)(111));// Physical Height in device units + public const int PHYSICALOFFSETX = unchecked((int)(112));// Physical Printable Area x margin + public const int PHYSICALOFFSETY = unchecked((int)(113));// Physical Printable Area y margin + public const int SCALINGFACTORX = unchecked((int)(114));// Scaling factor x + public const int SCALINGFACTORY = unchecked((int)(115));// Scaling factor y // Device Capability Masks: // Device Technologies - public const int DT_PLOTTER = unchecked( (int)( 0 ) );// Vector plotter - public const int DT_RASDISPLAY = unchecked( (int)( 1 ) );// Raster display - public const int DT_RASPRINTER = unchecked( (int)( 2 ) );// Raster printer - public const int DT_RASCAMERA = unchecked( (int)( 3 ) );// Raster camera - public const int DT_CHARSTREAM = unchecked( (int)( 4 ) );// Character-stream, PLP - public const int DT_METAFILE = unchecked( (int)( 5 ) );// Metafile, VDM - public const int DT_DISPFILE = unchecked( (int)( 6 ) );// Display-file + public const int DT_PLOTTER = unchecked((int)(0));// Vector plotter + public const int DT_RASDISPLAY = unchecked((int)(1));// Raster display + public const int DT_RASPRINTER = unchecked((int)(2));// Raster printer + public const int DT_RASCAMERA = unchecked((int)(3));// Raster camera + public const int DT_CHARSTREAM = unchecked((int)(4));// Character-stream, PLP + public const int DT_METAFILE = unchecked((int)(5));// Metafile, VDM + public const int DT_DISPFILE = unchecked((int)(6));// Display-file // Curve Capabilities - public const int CC_NONE = unchecked( (int)( 0 ) );// Curves not supported - public const int CC_CIRCLES = unchecked( (int)( 1 ) );// Can do circles - public const int CC_PIE = unchecked( (int)( 2 ) );// Can do pie wedges - public const int CC_CHORD = unchecked( (int)( 4 ) );// Can do chord arcs - public const int CC_ELLIPSES = unchecked( (int)( 8 ) );// Can do ellipese - public const int CC_WIDE = unchecked( (int)( 16 ) );// Can do wide lines - public const int CC_STYLED = unchecked( (int)( 32 ) );// Can do styled lines - public const int CC_WIDESTYLED = unchecked( (int)( 64 ) );// Can do wide styled lines - public const int CC_INTERIORS = unchecked( (int)( 128 ) );// Can do interiors - public const int CC_ROUNDRECT = unchecked( (int)( 256 ) );// + public const int CC_NONE = unchecked((int)(0));// Curves not supported + public const int CC_CIRCLES = unchecked((int)(1));// Can do circles + public const int CC_PIE = unchecked((int)(2));// Can do pie wedges + public const int CC_CHORD = unchecked((int)(4));// Can do chord arcs + public const int CC_ELLIPSES = unchecked((int)(8));// Can do ellipese + public const int CC_WIDE = unchecked((int)(16));// Can do wide lines + public const int CC_STYLED = unchecked((int)(32));// Can do styled lines + public const int CC_WIDESTYLED = unchecked((int)(64));// Can do wide styled lines + public const int CC_INTERIORS = unchecked((int)(128));// Can do interiors + public const int CC_ROUNDRECT = unchecked((int)(256));// // Line Capabilities - public const int LC_NONE = unchecked( (int)( 0 ) );// Lines not supported - public const int LC_POLYLINE = unchecked( (int)( 2 ) );// Can do polylines - public const int LC_MARKER = unchecked( (int)( 4 ) );// Can do markers - public const int LC_POLYMARKER = unchecked( (int)( 8 ) );// Can do polymarkers - public const int LC_WIDE = unchecked( (int)( 16 ) );// Can do wide lines - public const int LC_STYLED = unchecked( (int)( 32 ) );// Can do styled lines - public const int LC_WIDESTYLED = unchecked( (int)( 64 ) );// Can do wide styled lines - public const int LC_INTERIORS = unchecked( (int)( 128 ) );// Can do interiors + public const int LC_NONE = unchecked((int)(0));// Lines not supported + public const int LC_POLYLINE = unchecked((int)(2));// Can do polylines + public const int LC_MARKER = unchecked((int)(4));// Can do markers + public const int LC_POLYMARKER = unchecked((int)(8));// Can do polymarkers + public const int LC_WIDE = unchecked((int)(16));// Can do wide lines + public const int LC_STYLED = unchecked((int)(32));// Can do styled lines + public const int LC_WIDESTYLED = unchecked((int)(64));// Can do wide styled lines + public const int LC_INTERIORS = unchecked((int)(128));// Can do interiors // Polygonal Capabilities - public const int PC_NONE = unchecked( (int)( 0 ) );// Polygonals not supported - public const int PC_POLYGON = unchecked( (int)( 1 ) );// Can do polygons - public const int PC_RECTANGLE = unchecked( (int)( 2 ) );// Can do rectangles - public const int PC_WINDPOLYGON = unchecked( (int)( 4 ) );// Can do winding polygons - public const int PC_TRAPEZOID = unchecked( (int)( 4 ) );// Can do trapezoids - public const int PC_SCANLINE = unchecked( (int)( 8 ) );// Can do scanlines - public const int PC_WIDE = unchecked( (int)( 16 ) );// Can do wide borders - public const int PC_STYLED = unchecked( (int)( 32 ) );// Can do styled borders - public const int PC_WIDESTYLED = unchecked( (int)( 64 ) );// Can do wide styled borders - public const int PC_INTERIORS = unchecked( (int)( 128 ) );// Can do interiors + public const int PC_NONE = unchecked((int)(0));// Polygonals not supported + public const int PC_POLYGON = unchecked((int)(1));// Can do polygons + public const int PC_RECTANGLE = unchecked((int)(2));// Can do rectangles + public const int PC_WINDPOLYGON = unchecked((int)(4));// Can do winding polygons + public const int PC_TRAPEZOID = unchecked((int)(4));// Can do trapezoids + public const int PC_SCANLINE = unchecked((int)(8));// Can do scanlines + public const int PC_WIDE = unchecked((int)(16));// Can do wide borders + public const int PC_STYLED = unchecked((int)(32));// Can do styled borders + public const int PC_WIDESTYLED = unchecked((int)(64));// Can do wide styled borders + public const int PC_INTERIORS = unchecked((int)(128));// Can do interiors // Polygonal Capabilities - public const int CP_NONE = unchecked( (int)( 0 ) );// No clipping of output - public const int CP_RECTANGLE = unchecked( (int)( 1 ) );// Output clipped to rects - public const int CP_REGION = unchecked( (int)( 2 ) );// + public const int CP_NONE = unchecked((int)(0));// No clipping of output + public const int CP_RECTANGLE = unchecked((int)(1));// Output clipped to rects + public const int CP_REGION = unchecked((int)(2));// // Text Capabilities - public const int TC_OP_CHARACTER = unchecked( (int)( 0x1 ) );// Can do OutputPrecision CHARACTER - public const int TC_OP_STROKE = unchecked( (int)( 0x2 ) );// Can do OutputPrecision STROKE - public const int TC_CP_STROKE = unchecked( (int)( 0x4 ) );// Can do ClipPrecision STROKE - public const int TC_CR_90 = unchecked( (int)( 0x8 ) );// Can do CharRotAbility 90 - public const int TC_CR_ANY = unchecked( (int)( 0x10 ) );// Can do CharRotAbility ANY - public const int TC_SF_X_YINDEP = unchecked( (int)( 0x20 ) );// Can do ScaleFreedom X_YINDEPENDENT - public const int TC_SA_DOUBLE = unchecked( (int)( 0x40 ) );// Can do ScaleAbility DOUBLE - public const int TC_SA_INTEGER = unchecked( (int)( 0x80 ) );// Can do ScaleAbility INTEGER - public const int TC_SA_CONTIN = unchecked( (int)( 0x100 ) );// Can do ScaleAbility CONTINUOUS - public const int TC_EA_DOUBLE = unchecked( (int)( 0x200 ) );// Can do EmboldenAbility DOUBLE - public const int TC_IA_ABLE = unchecked( (int)( 0x400 ) );// Can do ItalisizeAbility ABLE - public const int TC_UA_ABLE = unchecked( (int)( 0x800 ) );// Can do UnderlineAbility ABLE - public const int TC_SO_ABLE = unchecked( (int)( 0x1000 ) );// Can do StrikeOutAbility ABLE - public const int TC_RA_ABLE = unchecked( (int)( 0x2000 ) );// Can do RasterFontAble ABLE - public const int TC_VA_ABLE = unchecked( (int)( 0x4000 ) );// Can do VectorFontAble ABLE - public const int TC_RESERVED = unchecked( (int)( 0x8000 ) ); - public const int TC_SCROLLBLT = unchecked( (int)( 0x10000 ) );// do text scroll with blt + public const int TC_OP_CHARACTER = unchecked((int)(0x1));// Can do OutputPrecision CHARACTER + public const int TC_OP_STROKE = unchecked((int)(0x2));// Can do OutputPrecision STROKE + public const int TC_CP_STROKE = unchecked((int)(0x4));// Can do ClipPrecision STROKE + public const int TC_CR_90 = unchecked((int)(0x8));// Can do CharRotAbility 90 + public const int TC_CR_ANY = unchecked((int)(0x10));// Can do CharRotAbility ANY + public const int TC_SF_X_YINDEP = unchecked((int)(0x20));// Can do ScaleFreedom X_YINDEPENDENT + public const int TC_SA_DOUBLE = unchecked((int)(0x40));// Can do ScaleAbility DOUBLE + public const int TC_SA_INTEGER = unchecked((int)(0x80));// Can do ScaleAbility INTEGER + public const int TC_SA_CONTIN = unchecked((int)(0x100));// Can do ScaleAbility CONTINUOUS + public const int TC_EA_DOUBLE = unchecked((int)(0x200));// Can do EmboldenAbility DOUBLE + public const int TC_IA_ABLE = unchecked((int)(0x400));// Can do ItalisizeAbility ABLE + public const int TC_UA_ABLE = unchecked((int)(0x800));// Can do UnderlineAbility ABLE + public const int TC_SO_ABLE = unchecked((int)(0x1000));// Can do StrikeOutAbility ABLE + public const int TC_RA_ABLE = unchecked((int)(0x2000));// Can do RasterFontAble ABLE + public const int TC_VA_ABLE = unchecked((int)(0x4000));// Can do VectorFontAble ABLE + public const int TC_RESERVED = unchecked((int)(0x8000)); + public const int TC_SCROLLBLT = unchecked((int)(0x10000));// do text scroll with blt // Raster Capabilities - public const int RC_NONE = unchecked( (int)( 0 ) ); - public const int RC_BITBLT = unchecked( (int)( 1 ) );// Can do standard BLT. - public const int RC_BANDING = unchecked( (int)( 2 ) );// Device requires banding support - public const int RC_SCALING = unchecked( (int)( 4 ) );// Device requires scaling support - public const int RC_BITMAP64 = unchecked( (int)( 8 ) );// Device can support >64K bitmap - public const int RC_GDI20_OUTPUT = unchecked( (int)( 0x10 ) );// has 2.0 output calls - public const int RC_GDI20_STATE = unchecked( (int)( 0x20 ) ); - public const int RC_SAVEBITMAP = unchecked( (int)( 0x40 ) ); - public const int RC_DI_BITMAP = unchecked( (int)( 0x80 ) );// supports DIB to memory - public const int RC_PALETTE = unchecked( (int)( 0x100 ) );// supports a palette - public const int RC_DIBTODEV = unchecked( (int)( 0x200 ) );// supports DIBitsToDevice - public const int RC_BIGFONT = unchecked( (int)( 0x400 ) );// supports >64K fonts - public const int RC_STRETCHBLT = unchecked( (int)( 0x800 ) );// supports StretchBlt - public const int RC_FLOODFILL = unchecked( (int)( 0x1000 ) );// supports FloodFill - public const int RC_STRETCHDIB = unchecked( (int)( 0x2000 ) );// supports StretchDIBits - public const int RC_OP_DX_OUTPUT = unchecked( (int)( 0x4000 ) ); - public const int RC_DEVBITS = unchecked( (int)( 0x8000 ) ); + public const int RC_NONE = unchecked((int)(0)); + public const int RC_BITBLT = unchecked((int)(1));// Can do standard BLT. + public const int RC_BANDING = unchecked((int)(2));// Device requires banding support + public const int RC_SCALING = unchecked((int)(4));// Device requires scaling support + public const int RC_BITMAP64 = unchecked((int)(8));// Device can support >64K bitmap + public const int RC_GDI20_OUTPUT = unchecked((int)(0x10));// has 2.0 output calls + public const int RC_GDI20_STATE = unchecked((int)(0x20)); + public const int RC_SAVEBITMAP = unchecked((int)(0x40)); + public const int RC_DI_BITMAP = unchecked((int)(0x80));// supports DIB to memory + public const int RC_PALETTE = unchecked((int)(0x100));// supports a palette + public const int RC_DIBTODEV = unchecked((int)(0x200));// supports DIBitsToDevice + public const int RC_BIGFONT = unchecked((int)(0x400));// supports >64K fonts + public const int RC_STRETCHBLT = unchecked((int)(0x800));// supports StretchBlt + public const int RC_FLOODFILL = unchecked((int)(0x1000));// supports FloodFill + public const int RC_STRETCHDIB = unchecked((int)(0x2000));// supports StretchDIBits + public const int RC_OP_DX_OUTPUT = unchecked((int)(0x4000)); + public const int RC_DEVBITS = unchecked((int)(0x8000)); // DIB color table identifiers - public const int DIB_RGB_COLORS = unchecked( (int)( 0 ) );// color table in RGBs - public const int DIB_PAL_COLORS = unchecked( (int)( 1 ) );// color table in palette indices - public const int DIB_PAL_INDICES = unchecked( (int)( 2 ) );// No color table indices into surf palette - public const int DIB_PAL_PHYSINDICES = unchecked( (int)( 2 ) );// No color table indices into surf palette - public const int DIB_PAL_LOGINDICES = unchecked( (int)( 4 ) );// No color table indices into DC palette + public const int DIB_RGB_COLORS = unchecked((int)(0));// color table in RGBs + public const int DIB_PAL_COLORS = unchecked((int)(1));// color table in palette indices + public const int DIB_PAL_INDICES = unchecked((int)(2));// No color table indices into surf palette + public const int DIB_PAL_PHYSINDICES = unchecked((int)(2));// No color table indices into surf palette + public const int DIB_PAL_LOGINDICES = unchecked((int)(4));// No color table indices into DC palette // constants for Get/SetSystemPaletteUse() - public const int SYSPAL_ERROR = unchecked( (int)( 0 ) ); - public const int SYSPAL_STATIC = unchecked( (int)( 1 ) ); - public const int SYSPAL_NOSTATIC = unchecked( (int)( 2 ) ); + public const int SYSPAL_ERROR = unchecked((int)(0)); + public const int SYSPAL_STATIC = unchecked((int)(1)); + public const int SYSPAL_NOSTATIC = unchecked((int)(2)); // constants for CreateDIBitmap - public const int CBM_CREATEDIB = unchecked( (int)( 0x2 ) );// create DIB bitmap - public const int CBM_INIT = unchecked( (int)( 0x4 ) );// initialize bitmap + public const int CBM_CREATEDIB = unchecked((int)(0x2));// create DIB bitmap + public const int CBM_INIT = unchecked((int)(0x4));// initialize bitmap // ExtFloodFill style flags - public const int FLOODFILLBORDER = unchecked( (int)( 0 ) ); - public const int FLOODFILLSURFACE = unchecked( (int)( 1 ) ); + public const int FLOODFILLBORDER = unchecked((int)(0)); + public const int FLOODFILLSURFACE = unchecked((int)(1)); // size of a device name string - public const int CCHDEVICENAME = unchecked( (int)( 32 ) ); + public const int CCHDEVICENAME = unchecked((int)(32)); // size of a form name string - public const int CCHFORMNAME = unchecked( (int)( 32 ) ); + public const int CCHFORMNAME = unchecked((int)(32)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DEVMODE { - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = CCHDEVICENAME )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = CCHDEVICENAME)] public string dmDeviceName; public int dmSpecVersion; public int dmDriverVersion; @@ -5153,7 +5153,7 @@ public struct DEVMODE public int dmYResolution; public int dmTTOption; public int dmCollate; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = CCHFORMNAME )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = CCHFORMNAME)] public string dmFormName; public int dmUnusedPadding; public int dmBitsPerPel; @@ -5164,131 +5164,131 @@ public struct DEVMODE } // current version of specification - public const int DM_SPECVERSION = unchecked( (int)( 0x320 ) ); + public const int DM_SPECVERSION = unchecked((int)(0x320)); // field selection bits - public const int DM_ORIENTATION = unchecked( (int)( 0x1 ) ); - public const int DM_PAPERSIZE = unchecked( (int)( 0x2 ) ); - public const int DM_PAPERLENGTH = unchecked( (int)( 0x4 ) ); - public const int DM_PAPERWIDTH = unchecked( (int)( 0x8 ) ); - public const int DM_SCALE = unchecked( (int)( 0x10 ) ); - public const int DM_COPIES = unchecked( (int)( 0x100 ) ); - public const int DM_DEFAULTSOURCE = unchecked( (int)( 0x200 ) ); - public const int DM_PRINTQUALITY = unchecked( (int)( 0x400 ) ); - public const int DM_COLOR = unchecked( (int)( 0x800 ) ); - public const int DM_DUPLEX = unchecked( (int)( 0x1000 ) ); - public const int DM_YRESOLUTION = unchecked( (int)( 0x2000 ) ); - public const int DM_TTOPTION = unchecked( (int)( 0x4000 ) ); - public const int DM_COLLATE = unchecked( (int)( 0x8000 ) ); - public const int DM_FORMNAME = unchecked( (int)( 0x10000 ) ); + public const int DM_ORIENTATION = unchecked((int)(0x1)); + public const int DM_PAPERSIZE = unchecked((int)(0x2)); + public const int DM_PAPERLENGTH = unchecked((int)(0x4)); + public const int DM_PAPERWIDTH = unchecked((int)(0x8)); + public const int DM_SCALE = unchecked((int)(0x10)); + public const int DM_COPIES = unchecked((int)(0x100)); + public const int DM_DEFAULTSOURCE = unchecked((int)(0x200)); + public const int DM_PRINTQUALITY = unchecked((int)(0x400)); + public const int DM_COLOR = unchecked((int)(0x800)); + public const int DM_DUPLEX = unchecked((int)(0x1000)); + public const int DM_YRESOLUTION = unchecked((int)(0x2000)); + public const int DM_TTOPTION = unchecked((int)(0x4000)); + public const int DM_COLLATE = unchecked((int)(0x8000)); + public const int DM_FORMNAME = unchecked((int)(0x10000)); // orientation selections - public const int DMORIENT_PORTRAIT = unchecked( (int)( 1 ) ); - public const int DMORIENT_LANDSCAPE = unchecked( (int)( 2 ) ); + public const int DMORIENT_PORTRAIT = unchecked((int)(1)); + public const int DMORIENT_LANDSCAPE = unchecked((int)(2)); // paper selections - public const int DMPAPER_LETTER = unchecked( (int)( 1 ) ); - public const int DMPAPER_FIRST = unchecked( (int)( DMPAPER_LETTER ) ); + public const int DMPAPER_LETTER = unchecked((int)(1)); + public const int DMPAPER_FIRST = unchecked((int)(DMPAPER_LETTER)); // Letter 8 1/2 x 11 in - public const int DMPAPER_LETTERSMALL = unchecked( (int)( 2 ) );// Letter Small 8 1/2 x 11 in - public const int DMPAPER_TABLOID = unchecked( (int)( 3 ) );// Tabloid 11 x 17 in - public const int DMPAPER_LEDGER = unchecked( (int)( 4 ) );// Ledger 17 x 11 in - public const int DMPAPER_LEGAL = unchecked( (int)( 5 ) );// Legal 8 1/2 x 14 in - public const int DMPAPER_STATEMENT = unchecked( (int)( 6 ) );// Statement 5 1/2 x 8 1/2 in - public const int DMPAPER_EXECUTIVE = unchecked( (int)( 7 ) );// Executive 7 1/4 x 10 1/2 in - public const int DMPAPER_A3 = unchecked( (int)( 8 ) );// A3 297 x 420 mm - public const int DMPAPER_A4 = unchecked( (int)( 9 ) );// A4 210 x 297 mm - public const int DMPAPER_A4SMALL = unchecked( (int)( 10 ) );// A4 Small 210 x 297 mm - public const int DMPAPER_A5 = unchecked( (int)( 11 ) );// A5 148 x 210 mm - public const int DMPAPER_B4 = unchecked( (int)( 12 ) );// B4 250 x 354 - public const int DMPAPER_B5 = unchecked( (int)( 13 ) );// B5 182 x 257 mm - public const int DMPAPER_FOLIO = unchecked( (int)( 14 ) );// Folio 8 1/2 x 13 in - public const int DMPAPER_QUARTO = unchecked( (int)( 15 ) );// Quarto 215 x 275 mm - public const int DMPAPER_10X14 = unchecked( (int)( 16 ) );// 10x14 in - public const int DMPAPER_11X17 = unchecked( (int)( 17 ) );// 11x17 in - public const int DMPAPER_NOTE = unchecked( (int)( 18 ) );// Note 8 1/2 x 11 in - public const int DMPAPER_ENV_9 = unchecked( (int)( 19 ) );// Envelope #9 3 7/8 x 8 7/8 - public const int DMPAPER_ENV_10 = unchecked( (int)( 20 ) );// Envelope #10 4 1/8 x 9 1/2 - public const int DMPAPER_ENV_11 = unchecked( (int)( 21 ) );// Envelope #11 4 1/2 x 10 3/8 - public const int DMPAPER_ENV_12 = unchecked( (int)( 22 ) );// Envelope #12 4 \276 x 11 - public const int DMPAPER_ENV_14 = unchecked( (int)( 23 ) );// Envelope #14 5 x 11 1/2 - public const int DMPAPER_CSHEET = unchecked( (int)( 24 ) );// C size sheet - public const int DMPAPER_DSHEET = unchecked( (int)( 25 ) );// D size sheet - public const int DMPAPER_ESHEET = unchecked( (int)( 26 ) );// E size sheet - public const int DMPAPER_ENV_DL = unchecked( (int)( 27 ) );// Envelope DL 110 x 220mm - public const int DMPAPER_ENV_C5 = unchecked( (int)( 28 ) );// Envelope C5 162 x 229 mm - public const int DMPAPER_ENV_C3 = unchecked( (int)( 29 ) );// Envelope C3 324 x 458 mm - public const int DMPAPER_ENV_C4 = unchecked( (int)( 30 ) );// Envelope C4 229 x 324 mm - public const int DMPAPER_ENV_C6 = unchecked( (int)( 31 ) );// Envelope C6 114 x 162 mm - public const int DMPAPER_ENV_C65 = unchecked( (int)( 32 ) );// Envelope C65 114 x 229 mm - public const int DMPAPER_ENV_B4 = unchecked( (int)( 33 ) );// Envelope B4 250 x 353 mm - public const int DMPAPER_ENV_B5 = unchecked( (int)( 34 ) );// Envelope B5 176 x 250 mm - public const int DMPAPER_ENV_B6 = unchecked( (int)( 35 ) );// Envelope B6 176 x 125 mm - public const int DMPAPER_ENV_ITALY = unchecked( (int)( 36 ) );// Envelope 110 x 230 mm - public const int DMPAPER_ENV_MONARCH = unchecked( (int)( 37 ) );// Envelope Monarch 3.875 x 7.5 in - public const int DMPAPER_ENV_PERSONAL = unchecked( (int)( 38 ) );// 6 3/4 Envelope 3 5/8 x 6 1/2 in - public const int DMPAPER_FANFOLD_US = unchecked( (int)( 39 ) );// US Std Fanfold 14 7/8 x 11 in - public const int DMPAPER_FANFOLD_STD_GERMAN = unchecked( (int)( 40 ) );// German Std Fanfold 8 1/2 x 12 in - public const int DMPAPER_FANFOLD_LGL_GERMAN = unchecked( (int)( 41 ) );// German Legal Fanfold 8 1/2 x 13 in - - public const int DMPAPER_LAST = unchecked( (int)( DMPAPER_FANFOLD_LGL_GERMAN ) ); - - public const int DMPAPER_USER = unchecked( (int)( 256 ) ); + public const int DMPAPER_LETTERSMALL = unchecked((int)(2));// Letter Small 8 1/2 x 11 in + public const int DMPAPER_TABLOID = unchecked((int)(3));// Tabloid 11 x 17 in + public const int DMPAPER_LEDGER = unchecked((int)(4));// Ledger 17 x 11 in + public const int DMPAPER_LEGAL = unchecked((int)(5));// Legal 8 1/2 x 14 in + public const int DMPAPER_STATEMENT = unchecked((int)(6));// Statement 5 1/2 x 8 1/2 in + public const int DMPAPER_EXECUTIVE = unchecked((int)(7));// Executive 7 1/4 x 10 1/2 in + public const int DMPAPER_A3 = unchecked((int)(8));// A3 297 x 420 mm + public const int DMPAPER_A4 = unchecked((int)(9));// A4 210 x 297 mm + public const int DMPAPER_A4SMALL = unchecked((int)(10));// A4 Small 210 x 297 mm + public const int DMPAPER_A5 = unchecked((int)(11));// A5 148 x 210 mm + public const int DMPAPER_B4 = unchecked((int)(12));// B4 250 x 354 + public const int DMPAPER_B5 = unchecked((int)(13));// B5 182 x 257 mm + public const int DMPAPER_FOLIO = unchecked((int)(14));// Folio 8 1/2 x 13 in + public const int DMPAPER_QUARTO = unchecked((int)(15));// Quarto 215 x 275 mm + public const int DMPAPER_10X14 = unchecked((int)(16));// 10x14 in + public const int DMPAPER_11X17 = unchecked((int)(17));// 11x17 in + public const int DMPAPER_NOTE = unchecked((int)(18));// Note 8 1/2 x 11 in + public const int DMPAPER_ENV_9 = unchecked((int)(19));// Envelope #9 3 7/8 x 8 7/8 + public const int DMPAPER_ENV_10 = unchecked((int)(20));// Envelope #10 4 1/8 x 9 1/2 + public const int DMPAPER_ENV_11 = unchecked((int)(21));// Envelope #11 4 1/2 x 10 3/8 + public const int DMPAPER_ENV_12 = unchecked((int)(22));// Envelope #12 4 \276 x 11 + public const int DMPAPER_ENV_14 = unchecked((int)(23));// Envelope #14 5 x 11 1/2 + public const int DMPAPER_CSHEET = unchecked((int)(24));// C size sheet + public const int DMPAPER_DSHEET = unchecked((int)(25));// D size sheet + public const int DMPAPER_ESHEET = unchecked((int)(26));// E size sheet + public const int DMPAPER_ENV_DL = unchecked((int)(27));// Envelope DL 110 x 220mm + public const int DMPAPER_ENV_C5 = unchecked((int)(28));// Envelope C5 162 x 229 mm + public const int DMPAPER_ENV_C3 = unchecked((int)(29));// Envelope C3 324 x 458 mm + public const int DMPAPER_ENV_C4 = unchecked((int)(30));// Envelope C4 229 x 324 mm + public const int DMPAPER_ENV_C6 = unchecked((int)(31));// Envelope C6 114 x 162 mm + public const int DMPAPER_ENV_C65 = unchecked((int)(32));// Envelope C65 114 x 229 mm + public const int DMPAPER_ENV_B4 = unchecked((int)(33));// Envelope B4 250 x 353 mm + public const int DMPAPER_ENV_B5 = unchecked((int)(34));// Envelope B5 176 x 250 mm + public const int DMPAPER_ENV_B6 = unchecked((int)(35));// Envelope B6 176 x 125 mm + public const int DMPAPER_ENV_ITALY = unchecked((int)(36));// Envelope 110 x 230 mm + public const int DMPAPER_ENV_MONARCH = unchecked((int)(37));// Envelope Monarch 3.875 x 7.5 in + public const int DMPAPER_ENV_PERSONAL = unchecked((int)(38));// 6 3/4 Envelope 3 5/8 x 6 1/2 in + public const int DMPAPER_FANFOLD_US = unchecked((int)(39));// US Std Fanfold 14 7/8 x 11 in + public const int DMPAPER_FANFOLD_STD_GERMAN = unchecked((int)(40));// German Std Fanfold 8 1/2 x 12 in + public const int DMPAPER_FANFOLD_LGL_GERMAN = unchecked((int)(41));// German Legal Fanfold 8 1/2 x 13 in + + public const int DMPAPER_LAST = unchecked((int)(DMPAPER_FANFOLD_LGL_GERMAN)); + + public const int DMPAPER_USER = unchecked((int)(256)); // bin selections - public const int DMBIN_UPPER = unchecked( (int)( 1 ) ); - public const int DMBIN_FIRST = unchecked( (int)( DMBIN_UPPER ) ); - - public const int DMBIN_ONLYONE = unchecked( (int)( 1 ) ); - public const int DMBIN_LOWER = unchecked( (int)( 2 ) ); - public const int DMBIN_MIDDLE = unchecked( (int)( 3 ) ); - public const int DMBIN_MANUAL = unchecked( (int)( 4 ) ); - public const int DMBIN_ENVELOPE = unchecked( (int)( 5 ) ); - public const int DMBIN_ENVMANUAL = unchecked( (int)( 6 ) ); - public const int DMBIN_AUTO = unchecked( (int)( 7 ) ); - public const int DMBIN_TRACTOR = unchecked( (int)( 8 ) ); - public const int DMBIN_SMALLFMT = unchecked( (int)( 9 ) ); - public const int DMBIN_LARGEFMT = unchecked( (int)( 10 ) ); - public const int DMBIN_LARGECAPACITY = unchecked( (int)( 11 ) ); - public const int DMBIN_CASSETTE = unchecked( (int)( 14 ) ); - public const int DMBIN_LAST = unchecked( (int)( DMBIN_CASSETTE ) ); - - public const int DMBIN_USER = unchecked( (int)( 256 ) );// device specific bins start here + public const int DMBIN_UPPER = unchecked((int)(1)); + public const int DMBIN_FIRST = unchecked((int)(DMBIN_UPPER)); + + public const int DMBIN_ONLYONE = unchecked((int)(1)); + public const int DMBIN_LOWER = unchecked((int)(2)); + public const int DMBIN_MIDDLE = unchecked((int)(3)); + public const int DMBIN_MANUAL = unchecked((int)(4)); + public const int DMBIN_ENVELOPE = unchecked((int)(5)); + public const int DMBIN_ENVMANUAL = unchecked((int)(6)); + public const int DMBIN_AUTO = unchecked((int)(7)); + public const int DMBIN_TRACTOR = unchecked((int)(8)); + public const int DMBIN_SMALLFMT = unchecked((int)(9)); + public const int DMBIN_LARGEFMT = unchecked((int)(10)); + public const int DMBIN_LARGECAPACITY = unchecked((int)(11)); + public const int DMBIN_CASSETTE = unchecked((int)(14)); + public const int DMBIN_LAST = unchecked((int)(DMBIN_CASSETTE)); + + public const int DMBIN_USER = unchecked((int)(256));// device specific bins start here // print qualities - public const int DMRES_DRAFT = unchecked( (int)( ( -1 ) ) ); - public const int DMRES_LOW = unchecked( (int)( ( -2 ) ) ); - public const int DMRES_MEDIUM = unchecked( (int)( ( -3 ) ) ); - public const int DMRES_HIGH = unchecked( (int)( ( -4 ) ) ); + public const int DMRES_DRAFT = unchecked((int)((-1))); + public const int DMRES_LOW = unchecked((int)((-2))); + public const int DMRES_MEDIUM = unchecked((int)((-3))); + public const int DMRES_HIGH = unchecked((int)((-4))); // color enable/disable for color printers - public const int DMCOLOR_MONOCHROME = unchecked( (int)( 1 ) ); - public const int DMCOLOR_COLOR = unchecked( (int)( 2 ) ); + public const int DMCOLOR_MONOCHROME = unchecked((int)(1)); + public const int DMCOLOR_COLOR = unchecked((int)(2)); // duplex enable - public const int DMDUP_SIMPLEX = unchecked( (int)( 1 ) ); - public const int DMDUP_VERTICAL = unchecked( (int)( 2 ) ); - public const int DMDUP_HORIZONTAL = unchecked( (int)( 3 ) ); + public const int DMDUP_SIMPLEX = unchecked((int)(1)); + public const int DMDUP_VERTICAL = unchecked((int)(2)); + public const int DMDUP_HORIZONTAL = unchecked((int)(3)); // TrueType options - public const int DMTT_BITMAP = unchecked( (int)( 1 ) );// print TT fonts as graphics - public const int DMTT_DOWNLOAD = unchecked( (int)( 2 ) );// download TT fonts as soft fonts - public const int DMTT_SUBDEV = unchecked( (int)( 3 ) );// substitute device fonts for TT fonts + public const int DMTT_BITMAP = unchecked((int)(1));// print TT fonts as graphics + public const int DMTT_DOWNLOAD = unchecked((int)(2));// download TT fonts as soft fonts + public const int DMTT_SUBDEV = unchecked((int)(3));// substitute device fonts for TT fonts // Collation selections - public const int DMCOLLATE_FALSE = unchecked( (int)( 0 ) ); - public const int DMCOLLATE_TRUE = unchecked( (int)( 1 ) ); + public const int DMCOLLATE_FALSE = unchecked((int)(0)); + public const int DMCOLLATE_TRUE = unchecked((int)(1)); // DEVMODE dmDisplayFlags flags - public const int DM_GRAYSCALE = unchecked( (int)( 0x1 ) ); - public const int DM_INTERLACED = unchecked( (int)( 0x2 ) ); + public const int DM_GRAYSCALE = unchecked((int)(0x1)); + public const int DM_INTERLACED = unchecked((int)(0x2)); // GetRegionData/ExtCreateRegion - public const int RDH_RECTANGLES = unchecked( (int)( 1 ) ); + public const int RDH_RECTANGLES = unchecked((int)(1)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct RGNDATAHEADER { public int dwSize; @@ -5298,14 +5298,14 @@ public struct RGNDATAHEADER public RECT rcBound; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct RGNDATA { public RGNDATAHEADER rdh; public byte Buffer; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ABC { public int abcA; @@ -5313,7 +5313,7 @@ public struct ABC public int abcC; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ABCFLOAT { public double abcfA; @@ -5321,7 +5321,7 @@ public struct ABCFLOAT public double abcfC; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct OUTLINETEXTMETRIC { public int otmSize; @@ -5358,7 +5358,7 @@ public struct OUTLINETEXTMETRIC public string otmpFullName; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct POLYTEXT { public int x; @@ -5370,14 +5370,14 @@ public struct POLYTEXT public int pdx; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct FIXED { public int fract; public int Value; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MAT2 { public FIXED eM11; @@ -5386,7 +5386,7 @@ public struct MAT2 public FIXED eM22; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct GLYPHMETRICS { public int gmBlackBoxX; @@ -5398,23 +5398,23 @@ public struct GLYPHMETRICS // GetGlyphOutline constants - public const int GGO_METRICS = unchecked( (int)( 0 ) ); - public const int GGO_BITMAP = unchecked( (int)( 1 ) ); - public const int GGO_NATIVE = unchecked( (int)( 2 ) ); + public const int GGO_METRICS = unchecked((int)(0)); + public const int GGO_BITMAP = unchecked((int)(1)); + public const int GGO_NATIVE = unchecked((int)(2)); - public const int TT_POLYGON_TYPE = unchecked( (int)( 24 ) ); + public const int TT_POLYGON_TYPE = unchecked((int)(24)); - public const int TT_PRIM_LINE = unchecked( (int)( 1 ) ); - public const int TT_PRIM_QSPLINE = unchecked( (int)( 2 ) ); + public const int TT_PRIM_LINE = unchecked((int)(1)); + public const int TT_PRIM_QSPLINE = unchecked((int)(2)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct POINTFX { public FIXED x; public FIXED y; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct TTPOLYCURVE { public int wType; @@ -5422,7 +5422,7 @@ public struct TTPOLYCURVE public POINTFX apfx; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct TTPOLYGONHEADER { public int cb; @@ -5430,7 +5430,7 @@ public struct TTPOLYGONHEADER public POINTFX pfxStart; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct RASTERIZER_STATUS { public int nSize; @@ -5439,648 +5439,648 @@ public struct RASTERIZER_STATUS } // bits defined in wFlags of RASTERIZER_STATUS - public const int TT_AVAILABLE = unchecked( (int)( 0x1 ) ); - public const int TT_ENABLED = unchecked( (int)( 0x2 ) ); + public const int TT_AVAILABLE = unchecked((int)(0x1)); + public const int TT_ENABLED = unchecked((int)(0x2)); - [DllImport( "gdi32", EntryPoint = "AddFontResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AddFontResource( string lpFileName ); + [DllImport("gdi32", EntryPoint = "AddFontResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AddFontResource(string lpFileName); - [DllImport( "gdi32", EntryPoint = "AnimatePalette", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AnimatePalette( IntPtr hPalette, int wStartIndex, int wNumEntries, ref PALETTEENTRY lpPaletteColors ); + [DllImport("gdi32", EntryPoint = "AnimatePalette", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AnimatePalette(IntPtr hPalette, int wStartIndex, int wNumEntries, ref PALETTEENTRY lpPaletteColors); - [DllImport( "gdi32", EntryPoint = "Arc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int Arc( IntPtr hdc, int X1, int Y1, int X2, int Y2, int X3, int Y3, int X4, int Y4 ); + [DllImport("gdi32", EntryPoint = "Arc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int Arc(IntPtr hdc, int X1, int Y1, int X2, int Y2, int X3, int Y3, int X4, int Y4); - [DllImport( "gdi32", EntryPoint = "BitBlt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int BitBlt( IntPtr hDestDC, int x, int y, int nWidth, int nHeight, IntPtr hSrcDC, int xSrc, int ySrc, int dwRop ); + [DllImport("gdi32", EntryPoint = "BitBlt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int BitBlt(IntPtr hDestDC, int x, int y, int nWidth, int nHeight, IntPtr hSrcDC, int xSrc, int ySrc, int dwRop); - [DllImport( "gdi32", EntryPoint = "CancelDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CancelDC( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "CancelDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CancelDC(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "Chord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int Chord( IntPtr hdc, int X1, int Y1, int X2, int Y2, int X3, int Y3, int X4, int Y4 ); + [DllImport("gdi32", EntryPoint = "Chord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int Chord(IntPtr hdc, int X1, int Y1, int X2, int Y2, int X3, int Y3, int X4, int Y4); - [DllImport( "gdi32", EntryPoint = "CloseMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CloseMetaFile( IntPtr hMF ); + [DllImport("gdi32", EntryPoint = "CloseMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CloseMetaFile(IntPtr hMF); - [DllImport( "gdi32", EntryPoint = "CombineRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CombineRgn( IntPtr hDestRgn, IntPtr hSrcRgn1, IntPtr hSrcRgn2, int nCombineMode ); + [DllImport("gdi32", EntryPoint = "CombineRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CombineRgn(IntPtr hDestRgn, IntPtr hSrcRgn1, IntPtr hSrcRgn2, int nCombineMode); - [DllImport( "gdi32", EntryPoint = "CopyMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CopyMetaFile( IntPtr hMF, string lpFileName ); + [DllImport("gdi32", EntryPoint = "CopyMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CopyMetaFile(IntPtr hMF, string lpFileName); - [DllImport( "gdi32", EntryPoint = "CreateBitmap", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateBitmap( int nWidth, int nHeight, int nPlanes, int nBitCount, IntPtr lpBits ); + [DllImport("gdi32", EntryPoint = "CreateBitmap", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateBitmap(int nWidth, int nHeight, int nPlanes, int nBitCount, IntPtr lpBits); - [DllImport( "gdi32", EntryPoint = "CreateBitmapIndirect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateBitmapIndirect( ref BITMAP lpBitmap ); + [DllImport("gdi32", EntryPoint = "CreateBitmapIndirect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateBitmapIndirect(ref BITMAP lpBitmap); - [DllImport( "gdi32", EntryPoint = "CreateBrushIndirect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateBrushIndirect( ref LOGBRUSH lpLogBrush ); + [DllImport("gdi32", EntryPoint = "CreateBrushIndirect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateBrushIndirect(ref LOGBRUSH lpLogBrush); - [DllImport( "gdi32", EntryPoint = "CreateCompatibleBitmap", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateCompatibleBitmap( IntPtr hdc, int nWidth, int nHeight ); + [DllImport("gdi32", EntryPoint = "CreateCompatibleBitmap", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateCompatibleBitmap(IntPtr hdc, int nWidth, int nHeight); - [DllImport( "gdi32", EntryPoint = "CreateDiscardableBitmap", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateDiscardableBitmap( IntPtr hdc, int nWidth, int nHeight ); + [DllImport("gdi32", EntryPoint = "CreateDiscardableBitmap", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateDiscardableBitmap(IntPtr hdc, int nWidth, int nHeight); - [DllImport( "gdi32", EntryPoint = "CreateCompatibleDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateCompatibleDC( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "CreateCompatibleDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateCompatibleDC(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "CreateDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateDC( string lpDriverName, string lpDeviceName, string lpOutput, ref DEVMODE lpInitData ); + [DllImport("gdi32", EntryPoint = "CreateDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateDC(string lpDriverName, string lpDeviceName, string lpOutput, ref DEVMODE lpInitData); - [DllImport( "gdi32", EntryPoint = "CreateDIBitmap", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateDIBitmap( IntPtr hdc, ref BITMAPINFOHEADER lpInfoHeader, int dwUsage, IntPtr lpInitBits, ref BITMAPINFO lpInitInfo, int wUsage ); + [DllImport("gdi32", EntryPoint = "CreateDIBitmap", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateDIBitmap(IntPtr hdc, ref BITMAPINFOHEADER lpInfoHeader, int dwUsage, IntPtr lpInitBits, ref BITMAPINFO lpInitInfo, int wUsage); - [DllImport( "gdi32", EntryPoint = "CreateDIBPatternBrush", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateDIBPatternBrush( IntPtr hPackedDIB, int wUsage ); + [DllImport("gdi32", EntryPoint = "CreateDIBPatternBrush", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateDIBPatternBrush(IntPtr hPackedDIB, int wUsage); - [DllImport( "gdi32", EntryPoint = "CreateDIBPatternBrushPt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateDIBPatternBrushPt( IntPtr lpPackedDIB, int iUsage ); + [DllImport("gdi32", EntryPoint = "CreateDIBPatternBrushPt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateDIBPatternBrushPt(IntPtr lpPackedDIB, int iUsage); - [DllImport( "gdi32", EntryPoint = "CreateEllipticRgnIndirect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateEllipticRgnIndirect( ref RECT lpRect ); + [DllImport("gdi32", EntryPoint = "CreateEllipticRgnIndirect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateEllipticRgnIndirect(ref RECT lpRect); - [DllImport( "gdi32", EntryPoint = "CreateEllipticRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateEllipticRgn( int X1, int Y1, int X2, int Y2 ); + [DllImport("gdi32", EntryPoint = "CreateEllipticRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateEllipticRgn(int X1, int Y1, int X2, int Y2); - [DllImport( "gdi32", EntryPoint = "CreateFontIndirect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateFontIndirect( ref LOGFONT lpLogFont ); + [DllImport("gdi32", EntryPoint = "CreateFontIndirect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateFontIndirect(ref LOGFONT lpLogFont); - [DllImport( "gdi32", EntryPoint = "CreateFont", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateFont( int nHeight, int nWidth, int nEscapement, int nOrientation, int fnWeight, int fdwItalic, int fdwUnderline, int fdwStrikeOut, int fdwCharSet, int fdwOutputPrecision, int fdwClipPrecision, int fdwQuality, int fdwPitchAndFamily, string lpszFace ); + [DllImport("gdi32", EntryPoint = "CreateFont", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateFont(int nHeight, int nWidth, int nEscapement, int nOrientation, int fnWeight, int fdwItalic, int fdwUnderline, int fdwStrikeOut, int fdwCharSet, int fdwOutputPrecision, int fdwClipPrecision, int fdwQuality, int fdwPitchAndFamily, string lpszFace); - [DllImport( "gdi32", EntryPoint = "CreateHatchBrush", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateHatchBrush( int nIndex, int crColor ); + [DllImport("gdi32", EntryPoint = "CreateHatchBrush", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateHatchBrush(int nIndex, int crColor); - [DllImport( "gdi32", EntryPoint = "CreateIC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateIC( string lpDriverName, string lpDeviceName, string lpOutput, ref DEVMODE lpInitData ); + [DllImport("gdi32", EntryPoint = "CreateIC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateIC(string lpDriverName, string lpDeviceName, string lpOutput, ref DEVMODE lpInitData); - [DllImport( "gdi32", EntryPoint = "CreateMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateMetaFile( string lpString ); + [DllImport("gdi32", EntryPoint = "CreateMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateMetaFile(string lpString); - [DllImport( "gdi32", EntryPoint = "CreatePalette", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreatePalette( ref LOGPALETTE lpLogPalette ); + [DllImport("gdi32", EntryPoint = "CreatePalette", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreatePalette(ref LOGPALETTE lpLogPalette); - [DllImport( "gdi32", EntryPoint = "CreatePen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreatePen( int nPenStyle, int nWidth, int crColor ); + [DllImport("gdi32", EntryPoint = "CreatePen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreatePen(int nPenStyle, int nWidth, int crColor); - [DllImport( "gdi32", EntryPoint = "CreatePenIndirect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreatePenIndirect( ref LOGPEN lpLogPen ); + [DllImport("gdi32", EntryPoint = "CreatePenIndirect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreatePenIndirect(ref LOGPEN lpLogPen); - [DllImport( "gdi32", EntryPoint = "CreateRectRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateRectRgn( int X1, int Y1, int X2, int Y2 ); + [DllImport("gdi32", EntryPoint = "CreateRectRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateRectRgn(int X1, int Y1, int X2, int Y2); - [DllImport( "gdi32", EntryPoint = "CreateRectRgnIndirect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateRectRgnIndirect( ref RECT lpRect ); + [DllImport("gdi32", EntryPoint = "CreateRectRgnIndirect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateRectRgnIndirect(ref RECT lpRect); - [DllImport( "gdi32", EntryPoint = "CreatePolyPolygonRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreatePolyPolygonRgn( ref POINTAPI lpPoint, IntPtr lpPolyCounts, int nCount, int nPolyFillMode ); + [DllImport("gdi32", EntryPoint = "CreatePolyPolygonRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreatePolyPolygonRgn(ref POINTAPI lpPoint, IntPtr lpPolyCounts, int nCount, int nPolyFillMode); - [DllImport( "gdi32", EntryPoint = "CreatePatternBrush", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreatePatternBrush( IntPtr hBitmap ); + [DllImport("gdi32", EntryPoint = "CreatePatternBrush", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreatePatternBrush(IntPtr hBitmap); - [DllImport( "gdi32", EntryPoint = "CreateRoundRectRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateRoundRectRgn( int X1, int Y1, int X2, int Y2, int X3, int Y3 ); + [DllImport("gdi32", EntryPoint = "CreateRoundRectRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateRoundRectRgn(int X1, int Y1, int X2, int Y2, int X3, int Y3); - [DllImport( "gdi32", EntryPoint = "CreateScalableFontResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateScalableFontResource( int fHidden, string lpszResourceFile, string lpszFontFile, string lpszCurrentPath ); + [DllImport("gdi32", EntryPoint = "CreateScalableFontResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateScalableFontResource(int fHidden, string lpszResourceFile, string lpszFontFile, string lpszCurrentPath); - [DllImport( "gdi32", EntryPoint = "CreateSolidBrush", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateSolidBrush( int crColor ); + [DllImport("gdi32", EntryPoint = "CreateSolidBrush", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateSolidBrush(int crColor); - [DllImport( "gdi32", EntryPoint = "DeleteDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeleteDC( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "DeleteDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeleteDC(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "DeleteObject", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeleteObject( IntPtr hObject ); + [DllImport("gdi32", EntryPoint = "DeleteObject", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeleteObject(IntPtr hObject); - [DllImport( "gdi32", EntryPoint = "DeleteMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeleteMetaFile( IntPtr hMF ); + [DllImport("gdi32", EntryPoint = "DeleteMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeleteMetaFile(IntPtr hMF); // mode selections for the device mode function - public const int DM_UPDATE = unchecked( (int)( 1 ) ); - public const int DM_COPY = unchecked( (int)( 2 ) ); - public const int DM_PROMPT = unchecked( (int)( 4 ) ); - public const int DM_MODIFY = unchecked( (int)( 8 ) ); + public const int DM_UPDATE = unchecked((int)(1)); + public const int DM_COPY = unchecked((int)(2)); + public const int DM_PROMPT = unchecked((int)(4)); + public const int DM_MODIFY = unchecked((int)(8)); - public const int DM_IN_BUFFER = unchecked( (int)( DM_MODIFY ) ); - public const int DM_IN_PROMPT = unchecked( (int)( DM_PROMPT ) ); - public const int DM_OUT_BUFFER = unchecked( (int)( DM_COPY ) ); - public const int DM_OUT_DEFAULT = unchecked( (int)( DM_UPDATE ) ); + public const int DM_IN_BUFFER = unchecked((int)(DM_MODIFY)); + public const int DM_IN_PROMPT = unchecked((int)(DM_PROMPT)); + public const int DM_OUT_BUFFER = unchecked((int)(DM_COPY)); + public const int DM_OUT_DEFAULT = unchecked((int)(DM_UPDATE)); // device capabilities indices - public const int DC_FIELDS = unchecked( (int)( 1 ) ); - public const int DC_PAPERS = unchecked( (int)( 2 ) ); - public const int DC_PAPERSIZE = unchecked( (int)( 3 ) ); - public const int DC_MINEXTENT = unchecked( (int)( 4 ) ); - public const int DC_MAXEXTENT = unchecked( (int)( 5 ) ); - public const int DC_BINS = unchecked( (int)( 6 ) ); - public const int DC_DUPLEX = unchecked( (int)( 7 ) ); - public const int DC_SIZE = unchecked( (int)( 8 ) ); - public const int DC_EXTRA = unchecked( (int)( 9 ) ); - public const int DC_VERSION = unchecked( (int)( 10 ) ); - public const int DC_DRIVER = unchecked( (int)( 11 ) ); - public const int DC_BINNAMES = unchecked( (int)( 12 ) ); - public const int DC_ENUMRESOLUTIONS = unchecked( (int)( 13 ) ); - public const int DC_FILEDEPENDENCIES = unchecked( (int)( 14 ) ); - public const int DC_TRUETYPE = unchecked( (int)( 15 ) ); - public const int DC_PAPERNAMES = unchecked( (int)( 16 ) ); - public const int DC_ORIENTATION = unchecked( (int)( 17 ) ); - public const int DC_COPIES = unchecked( (int)( 18 ) ); + public const int DC_FIELDS = unchecked((int)(1)); + public const int DC_PAPERS = unchecked((int)(2)); + public const int DC_PAPERSIZE = unchecked((int)(3)); + public const int DC_MINEXTENT = unchecked((int)(4)); + public const int DC_MAXEXTENT = unchecked((int)(5)); + public const int DC_BINS = unchecked((int)(6)); + public const int DC_DUPLEX = unchecked((int)(7)); + public const int DC_SIZE = unchecked((int)(8)); + public const int DC_EXTRA = unchecked((int)(9)); + public const int DC_VERSION = unchecked((int)(10)); + public const int DC_DRIVER = unchecked((int)(11)); + public const int DC_BINNAMES = unchecked((int)(12)); + public const int DC_ENUMRESOLUTIONS = unchecked((int)(13)); + public const int DC_FILEDEPENDENCIES = unchecked((int)(14)); + public const int DC_TRUETYPE = unchecked((int)(15)); + public const int DC_PAPERNAMES = unchecked((int)(16)); + public const int DC_ORIENTATION = unchecked((int)(17)); + public const int DC_COPIES = unchecked((int)(18)); // bit fields of the return value (DWORD) for DC_TRUETYPE - public const int DCTT_BITMAP = unchecked( (int)( 0x1 ) ); - public const int DCTT_DOWNLOAD = unchecked( (int)( 0x2 ) ); - public const int DCTT_SUBDEV = unchecked( (int)( 0x4 ) ); + public const int DCTT_BITMAP = unchecked((int)(0x1)); + public const int DCTT_DOWNLOAD = unchecked((int)(0x2)); + public const int DCTT_SUBDEV = unchecked((int)(0x4)); - [DllImport( "winspool.drv", EntryPoint = "DeviceCapabilities", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeviceCapabilities( string lpDeviceName, string lpPort, int iIndex, string lpOutput, ref DEVMODE lpDevMode ); + [DllImport("winspool.drv", EntryPoint = "DeviceCapabilities", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeviceCapabilities(string lpDeviceName, string lpPort, int iIndex, string lpOutput, ref DEVMODE lpDevMode); - [DllImport( "gdi32", EntryPoint = "Ellipse", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int Ellipse( IntPtr hdc, int X1, int Y1, int X2, int Y2 ); + [DllImport("gdi32", EntryPoint = "Ellipse", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int Ellipse(IntPtr hdc, int X1, int Y1, int X2, int Y2); - [DllImport( "gdi32", EntryPoint = "EqualRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EqualRgn( IntPtr hSrcRgn1, IntPtr hSrcRgn2 ); + [DllImport("gdi32", EntryPoint = "EqualRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EqualRgn(IntPtr hSrcRgn1, IntPtr hSrcRgn2); - [DllImport( "gdi32", EntryPoint = "Escape", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int Escape( IntPtr hdc, int nEscape, int nCount, string lpInData, IntPtr lpOutData ); + [DllImport("gdi32", EntryPoint = "Escape", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int Escape(IntPtr hdc, int nEscape, int nCount, string lpInData, IntPtr lpOutData); - [DllImport( "gdi32", EntryPoint = "ExtEscape", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ExtEscape( IntPtr hdc, int nEscape, int cbInput, string lpszInData, int cbOutput, string lpszOutData ); + [DllImport("gdi32", EntryPoint = "ExtEscape", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ExtEscape(IntPtr hdc, int nEscape, int cbInput, string lpszInData, int cbOutput, string lpszOutData); - [DllImport( "gdi32", EntryPoint = "DrawEscape", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DrawEscape( IntPtr hdc, int nEscape, int cbInput, string lpszInData ); + [DllImport("gdi32", EntryPoint = "DrawEscape", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DrawEscape(IntPtr hdc, int nEscape, int cbInput, string lpszInData); - [DllImport( "gdi32", EntryPoint = "ExcludeClipRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ExcludeClipRect( IntPtr hdc, int X1, int Y1, int X2, int Y2 ); + [DllImport("gdi32", EntryPoint = "ExcludeClipRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ExcludeClipRect(IntPtr hdc, int X1, int Y1, int X2, int Y2); - [DllImport( "gdi32", EntryPoint = "ExtCreateRegion", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ExtCreateRegion( ref XFORM lpXform, int nCount, ref RGNDATA lpRgnData ); + [DllImport("gdi32", EntryPoint = "ExtCreateRegion", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ExtCreateRegion(ref XFORM lpXform, int nCount, ref RGNDATA lpRgnData); - [DllImport( "gdi32", EntryPoint = "ExtFloodFill", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ExtFloodFill( IntPtr hdc, int x, int y, int crColor, int wFillType ); + [DllImport("gdi32", EntryPoint = "ExtFloodFill", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ExtFloodFill(IntPtr hdc, int x, int y, int crColor, int wFillType); - [DllImport( "gdi32", EntryPoint = "FillRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FillRgn( IntPtr hdc, IntPtr hRgn, IntPtr hBrush ); + [DllImport("gdi32", EntryPoint = "FillRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FillRgn(IntPtr hdc, IntPtr hRgn, IntPtr hBrush); - [DllImport( "gdi32", EntryPoint = "FrameRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FrameRgn( IntPtr hdc, IntPtr hRgn, IntPtr hBrush, int nWidth, int nHeight ); + [DllImport("gdi32", EntryPoint = "FrameRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FrameRgn(IntPtr hdc, IntPtr hRgn, IntPtr hBrush, int nWidth, int nHeight); - [DllImport( "gdi32", EntryPoint = "FloodFill", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FloodFill( IntPtr hdc, int x, int y, int crColor ); + [DllImport("gdi32", EntryPoint = "FloodFill", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FloodFill(IntPtr hdc, int x, int y, int crColor); - [DllImport( "gdi32", EntryPoint = "GetROP2", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetROP2( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "GetROP2", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetROP2(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "GetAspectRatioFilterEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetAspectRatioFilterEx( IntPtr hdc, ref SIZE lpAspectRatio ); + [DllImport("gdi32", EntryPoint = "GetAspectRatioFilterEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetAspectRatioFilterEx(IntPtr hdc, ref SIZE lpAspectRatio); - [DllImport( "gdi32", EntryPoint = "GetBkColor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetBkColor( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "GetBkColor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetBkColor(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "GetBkMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetBkMode( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "GetBkMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetBkMode(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "GetBitmapBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetBitmapBits( IntPtr hBitmap, int dwCount, IntPtr lpBits ); + [DllImport("gdi32", EntryPoint = "GetBitmapBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetBitmapBits(IntPtr hBitmap, int dwCount, IntPtr lpBits); - [DllImport( "gdi32", EntryPoint = "GetBitmapDimensionEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetBitmapDimensionEx( IntPtr hBitmap, ref SIZE lpDimension ); + [DllImport("gdi32", EntryPoint = "GetBitmapDimensionEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetBitmapDimensionEx(IntPtr hBitmap, ref SIZE lpDimension); - [DllImport( "gdi32", EntryPoint = "GetBoundsRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetBoundsRect( IntPtr hdc, ref RECT lprcBounds, int flags ); + [DllImport("gdi32", EntryPoint = "GetBoundsRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetBoundsRect(IntPtr hdc, ref RECT lprcBounds, int flags); - [DllImport( "gdi32", EntryPoint = "GetCharWidth", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCharWidth( IntPtr hdc, int wFirstChar, int wLastChar, IntPtr lpBuffer ); + [DllImport("gdi32", EntryPoint = "GetCharWidth", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCharWidth(IntPtr hdc, int wFirstChar, int wLastChar, IntPtr lpBuffer); - [DllImport( "gdi32", EntryPoint = "GetCharWidth32", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCharWidth32( IntPtr hdc, int iFirstChar, int iLastChar, IntPtr lpBuffer ); + [DllImport("gdi32", EntryPoint = "GetCharWidth32", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCharWidth32(IntPtr hdc, int iFirstChar, int iLastChar, IntPtr lpBuffer); - [DllImport( "gdi32", EntryPoint = "GetCharWidthFloat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCharWidthFloat( IntPtr hdc, int iFirstChar, int iLastChar, double pxBuffer ); + [DllImport("gdi32", EntryPoint = "GetCharWidthFloat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCharWidthFloat(IntPtr hdc, int iFirstChar, int iLastChar, double pxBuffer); - [DllImport( "gdi32", EntryPoint = "GetCharABCWidths", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCharABCWidths( IntPtr hdc, int uFirstChar, int uLastChar, ref ABC lpabc ); + [DllImport("gdi32", EntryPoint = "GetCharABCWidths", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCharABCWidths(IntPtr hdc, int uFirstChar, int uLastChar, ref ABC lpabc); - [DllImport( "gdi32", EntryPoint = "GetCharABCWidthsFloat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCharABCWidthsFloat( IntPtr hdc, int iFirstChar, int iLastChar, ref ABCFLOAT lpABCF ); + [DllImport("gdi32", EntryPoint = "GetCharABCWidthsFloat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCharABCWidthsFloat(IntPtr hdc, int iFirstChar, int iLastChar, ref ABCFLOAT lpABCF); - [DllImport( "gdi32", EntryPoint = "GetClipBox", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetClipBox( IntPtr hdc, ref RECT lpRect ); + [DllImport("gdi32", EntryPoint = "GetClipBox", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetClipBox(IntPtr hdc, ref RECT lpRect); - [DllImport( "gdi32", EntryPoint = "GetClipRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetClipRgn( IntPtr hdc, IntPtr hRgn ); + [DllImport("gdi32", EntryPoint = "GetClipRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetClipRgn(IntPtr hdc, IntPtr hRgn); - [DllImport( "gdi32", EntryPoint = "GetMetaRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetMetaRgn( IntPtr hdc, IntPtr hRgn ); + [DllImport("gdi32", EntryPoint = "GetMetaRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetMetaRgn(IntPtr hdc, IntPtr hRgn); - [DllImport( "gdi32", EntryPoint = "GetCurrentObject", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCurrentObject( IntPtr hdc, int uObjectType ); + [DllImport("gdi32", EntryPoint = "GetCurrentObject", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCurrentObject(IntPtr hdc, int uObjectType); - [DllImport( "gdi32", EntryPoint = "GetCurrentPositionEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCurrentPositionEx( IntPtr hdc, ref POINTAPI lpPoint ); + [DllImport("gdi32", EntryPoint = "GetCurrentPositionEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCurrentPositionEx(IntPtr hdc, ref POINTAPI lpPoint); - [DllImport( "gdi32", EntryPoint = "GetDeviceCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetDeviceCaps( IntPtr hdc, int nIndex ); + [DllImport("gdi32", EntryPoint = "GetDeviceCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetDeviceCaps(IntPtr hdc, int nIndex); - [DllImport( "gdi32", EntryPoint = "GetDIBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetDIBits( int aHDC, IntPtr hBitmap, int nStartScan, int nNumScans, IntPtr lpBits, ref BITMAPINFO lpBI, int wUsage ); + [DllImport("gdi32", EntryPoint = "GetDIBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetDIBits(int aHDC, IntPtr hBitmap, int nStartScan, int nNumScans, IntPtr lpBits, ref BITMAPINFO lpBI, int wUsage); - [DllImport( "gdi32", EntryPoint = "GetFontData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetFontData( IntPtr hdc, int dwTable, int dwOffset, IntPtr lpvBuffer, int cbData ); + [DllImport("gdi32", EntryPoint = "GetFontData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetFontData(IntPtr hdc, int dwTable, int dwOffset, IntPtr lpvBuffer, int cbData); - [DllImport( "gdi32", EntryPoint = "GetGlyphOutline", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetGlyphOutline( IntPtr hdc, int uChar, int fuFormat, ref GLYPHMETRICS lpgm, int cbBuffer, IntPtr lpBuffer, ref MAT2 lpmat2 ); + [DllImport("gdi32", EntryPoint = "GetGlyphOutline", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetGlyphOutline(IntPtr hdc, int uChar, int fuFormat, ref GLYPHMETRICS lpgm, int cbBuffer, IntPtr lpBuffer, ref MAT2 lpmat2); - [DllImport( "gdi32", EntryPoint = "GetGraphicsMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetGraphicsMode( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "GetGraphicsMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetGraphicsMode(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "GetMapMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetMapMode( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "GetMapMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetMapMode(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "GetMetaFileBitsEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetMetaFileBitsEx( IntPtr hMF, int nSize, IntPtr lpvData ); + [DllImport("gdi32", EntryPoint = "GetMetaFileBitsEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetMetaFileBitsEx(IntPtr hMF, int nSize, IntPtr lpvData); - [DllImport( "gdi32", EntryPoint = "GetMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetMetaFile( string lpFileName ); + [DllImport("gdi32", EntryPoint = "GetMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetMetaFile(string lpFileName); - [DllImport( "gdi32", EntryPoint = "GetNearestColor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetNearestColor( IntPtr hdc, int crColor ); + [DllImport("gdi32", EntryPoint = "GetNearestColor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetNearestColor(IntPtr hdc, int crColor); - [DllImport( "gdi32", EntryPoint = "GetNearestPaletteIndex", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetNearestPaletteIndex( IntPtr hPalette, int crColor ); + [DllImport("gdi32", EntryPoint = "GetNearestPaletteIndex", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetNearestPaletteIndex(IntPtr hPalette, int crColor); - [DllImport( "gdi32", EntryPoint = "GetObjectType", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetObjectType( IntPtr hgdiobj ); + [DllImport("gdi32", EntryPoint = "GetObjectType", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetObjectType(IntPtr hgdiobj); - [DllImport( "gdi32", EntryPoint = "GetOutlineTextMetrics", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetOutlineTextMetrics( IntPtr hdc, int cbData, ref OUTLINETEXTMETRIC lpotm ); + [DllImport("gdi32", EntryPoint = "GetOutlineTextMetrics", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetOutlineTextMetrics(IntPtr hdc, int cbData, ref OUTLINETEXTMETRIC lpotm); - [DllImport( "gdi32", EntryPoint = "GetPaletteEntries", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetPaletteEntries( IntPtr hPalette, int wStartIndex, int wNumEntries, ref PALETTEENTRY lpPaletteEntries ); + [DllImport("gdi32", EntryPoint = "GetPaletteEntries", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetPaletteEntries(IntPtr hPalette, int wStartIndex, int wNumEntries, ref PALETTEENTRY lpPaletteEntries); - [DllImport( "gdi32", EntryPoint = "GetPixel", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetPixel( IntPtr hdc, int x, int y ); + [DllImport("gdi32", EntryPoint = "GetPixel", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetPixel(IntPtr hdc, int x, int y); - [DllImport( "gdi32", EntryPoint = "GetPolyFillMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetPolyFillMode( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "GetPolyFillMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetPolyFillMode(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "GetRasterizerCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetRasterizerCaps( ref RASTERIZER_STATUS lpraststat, int cb ); + [DllImport("gdi32", EntryPoint = "GetRasterizerCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetRasterizerCaps(ref RASTERIZER_STATUS lpraststat, int cb); - [DllImport( "gdi32", EntryPoint = "GetRegionData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetRegionData( IntPtr hRgn, int dwCount, ref RGNDATA lpRgnData ); + [DllImport("gdi32", EntryPoint = "GetRegionData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetRegionData(IntPtr hRgn, int dwCount, ref RGNDATA lpRgnData); - [DllImport( "gdi32", EntryPoint = "GetRgnBox", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetRgnBox( IntPtr hRgn, ref RECT lpRect ); + [DllImport("gdi32", EntryPoint = "GetRgnBox", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetRgnBox(IntPtr hRgn, ref RECT lpRect); - [DllImport( "gdi32", EntryPoint = "GetStockObject", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetStockObject( int nIndex ); + [DllImport("gdi32", EntryPoint = "GetStockObject", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetStockObject(int nIndex); - [DllImport( "gdi32", EntryPoint = "GetStretchBltMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetStretchBltMode( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "GetStretchBltMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetStretchBltMode(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "GetSystemPaletteEntries", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSystemPaletteEntries( IntPtr hdc, int wStartIndex, int wNumEntries, ref PALETTEENTRY lpPaletteEntries ); + [DllImport("gdi32", EntryPoint = "GetSystemPaletteEntries", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSystemPaletteEntries(IntPtr hdc, int wStartIndex, int wNumEntries, ref PALETTEENTRY lpPaletteEntries); - [DllImport( "gdi32", EntryPoint = "GetSystemPaletteUse", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSystemPaletteUse( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "GetSystemPaletteUse", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSystemPaletteUse(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "GetTextCharacterExtra", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTextCharacterExtra( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "GetTextCharacterExtra", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTextCharacterExtra(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "GetTextAlign", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTextAlign( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "GetTextAlign", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTextAlign(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "GetTextColor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTextColor( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "GetTextColor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTextColor(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "GetTextExtentPoint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTextExtentPoint( IntPtr hdc, string lpszString, int cbString, ref SIZE lpSize ); + [DllImport("gdi32", EntryPoint = "GetTextExtentPoint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTextExtentPoint(IntPtr hdc, string lpszString, int cbString, ref SIZE lpSize); - [DllImport( "gdi32", EntryPoint = "GetTextExtentPoint32", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTextExtentPoint32( IntPtr hdc, string lpsz, int cbString, ref SIZE lpSize ); + [DllImport("gdi32", EntryPoint = "GetTextExtentPoint32", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTextExtentPoint32(IntPtr hdc, string lpsz, int cbString, ref SIZE lpSize); - [DllImport( "gdi32", EntryPoint = "GetTextExtentExPoint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTextExtentExPoint( IntPtr hdc, string lpszStr, int cchString, int nMaxExtent, IntPtr lpnFit, int alpDx, ref SIZE lpSize ); + [DllImport("gdi32", EntryPoint = "GetTextExtentExPoint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTextExtentExPoint(IntPtr hdc, string lpszStr, int cchString, int nMaxExtent, IntPtr lpnFit, int alpDx, ref SIZE lpSize); - [DllImport( "gdi32", EntryPoint = "GetViewportExtEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetViewportExtEx( IntPtr hdc, ref SIZE lpSize ); + [DllImport("gdi32", EntryPoint = "GetViewportExtEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetViewportExtEx(IntPtr hdc, ref SIZE lpSize); - [DllImport( "gdi32", EntryPoint = "GetViewportOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetViewportOrgEx( IntPtr hdc, ref POINTAPI lpPoint ); + [DllImport("gdi32", EntryPoint = "GetViewportOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetViewportOrgEx(IntPtr hdc, ref POINTAPI lpPoint); - [DllImport( "gdi32", EntryPoint = "GetWindowExtEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWindowExtEx( IntPtr hdc, ref SIZE lpSize ); + [DllImport("gdi32", EntryPoint = "GetWindowExtEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWindowExtEx(IntPtr hdc, ref SIZE lpSize); - [DllImport( "gdi32", EntryPoint = "GetWindowOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWindowOrgEx( IntPtr hdc, ref POINTAPI lpPoint ); + [DllImport("gdi32", EntryPoint = "GetWindowOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWindowOrgEx(IntPtr hdc, ref POINTAPI lpPoint); - [DllImport( "gdi32", EntryPoint = "IntersectClipRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IntersectClipRect( IntPtr hdc, int X1, int Y1, int X2, int Y2 ); + [DllImport("gdi32", EntryPoint = "IntersectClipRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IntersectClipRect(IntPtr hdc, int X1, int Y1, int X2, int Y2); - [DllImport( "gdi32", EntryPoint = "InvertRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int InvertRgn( IntPtr hdc, IntPtr hRgn ); + [DllImport("gdi32", EntryPoint = "InvertRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int InvertRgn(IntPtr hdc, IntPtr hRgn); - [DllImport( "gdi32", EntryPoint = "LineTo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LineTo( IntPtr hdc, int x, int y ); + [DllImport("gdi32", EntryPoint = "LineTo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LineTo(IntPtr hdc, int x, int y); - [DllImport( "gdi32", EntryPoint = "MaskBlt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MaskBlt( IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, IntPtr hdcSrc, int nXSrc, int nYSrc, IntPtr hbmMask, int xMask, int yMask, int dwRop ); + [DllImport("gdi32", EntryPoint = "MaskBlt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MaskBlt(IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, IntPtr hdcSrc, int nXSrc, int nYSrc, IntPtr hbmMask, int xMask, int yMask, int dwRop); - [DllImport( "gdi32", EntryPoint = "PlgBlt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PlgBlt( IntPtr hdcDest, ref POINTAPI lpPoint, IntPtr hdcSrc, int nXSrc, int nYSrc, int nWidth, int nHeight, IntPtr hbmMask, int xMask, int yMask ); + [DllImport("gdi32", EntryPoint = "PlgBlt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PlgBlt(IntPtr hdcDest, ref POINTAPI lpPoint, IntPtr hdcSrc, int nXSrc, int nYSrc, int nWidth, int nHeight, IntPtr hbmMask, int xMask, int yMask); - [DllImport( "gdi32", EntryPoint = "OffsetClipRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OffsetClipRgn( IntPtr hdc, int x, int y ); + [DllImport("gdi32", EntryPoint = "OffsetClipRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OffsetClipRgn(IntPtr hdc, int x, int y); - [DllImport( "gdi32", EntryPoint = "OffsetRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OffsetRgn( IntPtr hRgn, int x, int y ); + [DllImport("gdi32", EntryPoint = "OffsetRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OffsetRgn(IntPtr hRgn, int x, int y); - [DllImport( "gdi32", EntryPoint = "PatBlt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PatBlt( IntPtr hdc, int x, int y, int nWidth, int nHeight, int dwRop ); + [DllImport("gdi32", EntryPoint = "PatBlt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PatBlt(IntPtr hdc, int x, int y, int nWidth, int nHeight, int dwRop); - [DllImport( "gdi32", EntryPoint = "Pie", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int Pie( IntPtr hdc, int X1, int Y1, int X2, int Y2, int X3, int Y3, int X4, int Y4 ); + [DllImport("gdi32", EntryPoint = "Pie", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int Pie(IntPtr hdc, int X1, int Y1, int X2, int Y2, int X3, int Y3, int X4, int Y4); - [DllImport( "gdi32", EntryPoint = "PlayMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PlayMetaFile( IntPtr hdc, IntPtr hMF ); + [DllImport("gdi32", EntryPoint = "PlayMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PlayMetaFile(IntPtr hdc, IntPtr hMF); - [DllImport( "gdi32", EntryPoint = "PaintRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PaintRgn( IntPtr hdc, IntPtr hRgn ); + [DllImport("gdi32", EntryPoint = "PaintRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PaintRgn(IntPtr hdc, IntPtr hRgn); - [DllImport( "gdi32", EntryPoint = "PolyPolygon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PolyPolygon( IntPtr hdc, ref POINTAPI lpPoint, IntPtr lpPolyCounts, int nCount ); + [DllImport("gdi32", EntryPoint = "PolyPolygon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PolyPolygon(IntPtr hdc, ref POINTAPI lpPoint, IntPtr lpPolyCounts, int nCount); - [DllImport( "gdi32", EntryPoint = "PtInRegion", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PtInRegion( IntPtr hRgn, int x, int y ); + [DllImport("gdi32", EntryPoint = "PtInRegion", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PtInRegion(IntPtr hRgn, int x, int y); - [DllImport( "gdi32", EntryPoint = "PtVisible", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PtVisible( IntPtr hdc, int x, int y ); + [DllImport("gdi32", EntryPoint = "PtVisible", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PtVisible(IntPtr hdc, int x, int y); - [DllImport( "gdi32", EntryPoint = "RectVisible", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RectVisible( IntPtr hdc, ref RECT lpRect ); + [DllImport("gdi32", EntryPoint = "RectVisible", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RectVisible(IntPtr hdc, ref RECT lpRect); - [DllImport( "gdi32", EntryPoint = "RectInRegion", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RectInRegion( IntPtr hRgn, ref RECT lpRect ); + [DllImport("gdi32", EntryPoint = "RectInRegion", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RectInRegion(IntPtr hRgn, ref RECT lpRect); - [DllImport( "gdi32", EntryPoint = "Rectangle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int Rectangle( IntPtr hdc, int X1, int Y1, int X2, int Y2 ); + [DllImport("gdi32", EntryPoint = "Rectangle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int Rectangle(IntPtr hdc, int X1, int Y1, int X2, int Y2); - [DllImport( "gdi32", EntryPoint = "RestoreDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RestoreDC( IntPtr hdc, int nSavedDC ); + [DllImport("gdi32", EntryPoint = "RestoreDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RestoreDC(IntPtr hdc, int nSavedDC); - [DllImport( "gdi32", EntryPoint = "ResetDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ResetDC( IntPtr hdc, ref DEVMODE lpInitData ); + [DllImport("gdi32", EntryPoint = "ResetDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ResetDC(IntPtr hdc, ref DEVMODE lpInitData); - [DllImport( "gdi32", EntryPoint = "RealizePalette", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RealizePalette( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "RealizePalette", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RealizePalette(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "RemoveFontResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RemoveFontResource( string lpFileName ); + [DllImport("gdi32", EntryPoint = "RemoveFontResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RemoveFontResource(string lpFileName); - [DllImport( "gdi32", EntryPoint = "RoundRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RoundRect( IntPtr hdc, int X1, int Y1, int X2, int Y2, int X3, int Y3 ); + [DllImport("gdi32", EntryPoint = "RoundRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RoundRect(IntPtr hdc, int X1, int Y1, int X2, int Y2, int X3, int Y3); - [DllImport( "gdi32", EntryPoint = "ResizePalette", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ResizePalette( IntPtr hPalette, int nNumEntries ); + [DllImport("gdi32", EntryPoint = "ResizePalette", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ResizePalette(IntPtr hPalette, int nNumEntries); - [DllImport( "gdi32", EntryPoint = "SaveDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SaveDC( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "SaveDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SaveDC(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "SelectClipRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SelectClipRgn( IntPtr hdc, IntPtr hRgn ); + [DllImport("gdi32", EntryPoint = "SelectClipRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SelectClipRgn(IntPtr hdc, IntPtr hRgn); - [DllImport( "gdi32", EntryPoint = "ExtSelectClipRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ExtSelectClipRgn( IntPtr hdc, IntPtr hRgn, int fnMode ); + [DllImport("gdi32", EntryPoint = "ExtSelectClipRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ExtSelectClipRgn(IntPtr hdc, IntPtr hRgn, int fnMode); - [DllImport( "gdi32", EntryPoint = "SetMetaRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetMetaRgn( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "SetMetaRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetMetaRgn(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "SelectObject", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SelectObject( IntPtr hdc, IntPtr hObject ); + [DllImport("gdi32", EntryPoint = "SelectObject", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SelectObject(IntPtr hdc, IntPtr hObject); - [DllImport( "gdi32", EntryPoint = "SelectPalette", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SelectPalette( IntPtr hdc, IntPtr hPalette, int bForceBackground ); + [DllImport("gdi32", EntryPoint = "SelectPalette", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SelectPalette(IntPtr hdc, IntPtr hPalette, int bForceBackground); - [DllImport( "gdi32", EntryPoint = "SetBkColor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetBkColor( IntPtr hdc, int crColor ); + [DllImport("gdi32", EntryPoint = "SetBkColor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetBkColor(IntPtr hdc, int crColor); - [DllImport( "gdi32", EntryPoint = "SetBkMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetBkMode( IntPtr hdc, int nBkMode ); + [DllImport("gdi32", EntryPoint = "SetBkMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetBkMode(IntPtr hdc, int nBkMode); - [DllImport( "gdi32", EntryPoint = "SetBitmapBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetBitmapBits( IntPtr hBitmap, int dwCount, IntPtr lpBits ); + [DllImport("gdi32", EntryPoint = "SetBitmapBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetBitmapBits(IntPtr hBitmap, int dwCount, IntPtr lpBits); - [DllImport( "gdi32", EntryPoint = "SetBoundsRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetBoundsRect( IntPtr hdc, ref RECT lprcBounds, int flags ); + [DllImport("gdi32", EntryPoint = "SetBoundsRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetBoundsRect(IntPtr hdc, ref RECT lprcBounds, int flags); - [DllImport( "gdi32", EntryPoint = "SetDIBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetDIBits( IntPtr hdc, IntPtr hBitmap, int nStartScan, int nNumScans, IntPtr lpBits, ref BITMAPINFO lpBI, int wUsage ); + [DllImport("gdi32", EntryPoint = "SetDIBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetDIBits(IntPtr hdc, IntPtr hBitmap, int nStartScan, int nNumScans, IntPtr lpBits, ref BITMAPINFO lpBI, int wUsage); - [DllImport( "gdi32", EntryPoint = "SetDIBitsToDevice", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetDIBitsToDevice( IntPtr hdc, int x, int y, int dx, int dy, int SrcX, int SrcY, int Scan, int NumScans, object Bits, BITMAPINFO BitsInfo, int wUsage ); + [DllImport("gdi32", EntryPoint = "SetDIBitsToDevice", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetDIBitsToDevice(IntPtr hdc, int x, int y, int dx, int dy, int SrcX, int SrcY, int Scan, int NumScans, object Bits, BITMAPINFO BitsInfo, int wUsage); - [DllImport( "gdi32", EntryPoint = "SetMapperFlags", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetMapperFlags( IntPtr hdc, int dwFlag ); + [DllImport("gdi32", EntryPoint = "SetMapperFlags", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetMapperFlags(IntPtr hdc, int dwFlag); - [DllImport( "gdi32", EntryPoint = "SetGraphicsMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetGraphicsMode( IntPtr hdc, int iMode ); + [DllImport("gdi32", EntryPoint = "SetGraphicsMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetGraphicsMode(IntPtr hdc, int iMode); - [DllImport( "gdi32", EntryPoint = "SetMapMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetMapMode( IntPtr hdc, int nMapMode ); + [DllImport("gdi32", EntryPoint = "SetMapMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetMapMode(IntPtr hdc, int nMapMode); - [DllImport( "gdi32", EntryPoint = "SetMetaFileBitsEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetMetaFileBitsEx( int nSize, ref byte lpData ); + [DllImport("gdi32", EntryPoint = "SetMetaFileBitsEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetMetaFileBitsEx(int nSize, ref byte lpData); - [DllImport( "gdi32", EntryPoint = "SetPaletteEntries", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetPaletteEntries( IntPtr hPalette, int wStartIndex, int wNumEntries, ref PALETTEENTRY lpPaletteEntries ); + [DllImport("gdi32", EntryPoint = "SetPaletteEntries", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetPaletteEntries(IntPtr hPalette, int wStartIndex, int wNumEntries, ref PALETTEENTRY lpPaletteEntries); - [DllImport( "gdi32", EntryPoint = "SetPixel", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetPixel( IntPtr hdc, int x, int y, int crColor ); + [DllImport("gdi32", EntryPoint = "SetPixel", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetPixel(IntPtr hdc, int x, int y, int crColor); - [DllImport( "gdi32", EntryPoint = "SetPixelV", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetPixelV( IntPtr hdc, int x, int y, int crColor ); + [DllImport("gdi32", EntryPoint = "SetPixelV", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetPixelV(IntPtr hdc, int x, int y, int crColor); - [DllImport( "gdi32", EntryPoint = "SetPolyFillMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetPolyFillMode( IntPtr hdc, int nPolyFillMode ); + [DllImport("gdi32", EntryPoint = "SetPolyFillMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetPolyFillMode(IntPtr hdc, int nPolyFillMode); - [DllImport( "gdi32", EntryPoint = "StretchBlt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int StretchBlt( IntPtr hdc, int x, int y, int nWidth, int nHeight, IntPtr hSrcDC, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, int dwRop ); + [DllImport("gdi32", EntryPoint = "StretchBlt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int StretchBlt(IntPtr hdc, int x, int y, int nWidth, int nHeight, IntPtr hSrcDC, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, int dwRop); - [DllImport( "gdi32", EntryPoint = "SetRectRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetRectRgn( IntPtr hRgn, int X1, int Y1, int X2, int Y2 ); + [DllImport("gdi32", EntryPoint = "SetRectRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetRectRgn(IntPtr hRgn, int X1, int Y1, int X2, int Y2); - [DllImport( "gdi32", EntryPoint = "StretchDIBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int StretchDIBits( IntPtr hdc, int x, int y, int dx, int dy, int SrcX, int SrcY, int wSrcWidth, int wSrcHeight, IntPtr lpBits, ref BITMAPINFO lpBitsInfo, int wUsage, int dwRop ); + [DllImport("gdi32", EntryPoint = "StretchDIBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int StretchDIBits(IntPtr hdc, int x, int y, int dx, int dy, int SrcX, int SrcY, int wSrcWidth, int wSrcHeight, IntPtr lpBits, ref BITMAPINFO lpBitsInfo, int wUsage, int dwRop); - [DllImport( "gdi32", EntryPoint = "SetROP2", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetROP2( IntPtr hdc, int nDrawMode ); + [DllImport("gdi32", EntryPoint = "SetROP2", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetROP2(IntPtr hdc, int nDrawMode); - [DllImport( "gdi32", EntryPoint = "SetStretchBltMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetStretchBltMode( IntPtr hdc, int nStretchMode ); + [DllImport("gdi32", EntryPoint = "SetStretchBltMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetStretchBltMode(IntPtr hdc, int nStretchMode); - [DllImport( "gdi32", EntryPoint = "SetSystemPaletteUse", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetSystemPaletteUse( IntPtr hdc, int wUsage ); + [DllImport("gdi32", EntryPoint = "SetSystemPaletteUse", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetSystemPaletteUse(IntPtr hdc, int wUsage); - [DllImport( "gdi32", EntryPoint = "SetTextCharacterExtra", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetTextCharacterExtra( IntPtr hdc, int nCharExtra ); + [DllImport("gdi32", EntryPoint = "SetTextCharacterExtra", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetTextCharacterExtra(IntPtr hdc, int nCharExtra); - [DllImport( "gdi32", EntryPoint = "SetTextColor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetTextColor( IntPtr hdc, int crColor ); + [DllImport("gdi32", EntryPoint = "SetTextColor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetTextColor(IntPtr hdc, int crColor); - [DllImport( "gdi32", EntryPoint = "SetTextAlign", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetTextAlign( IntPtr hdc, int wFlags ); + [DllImport("gdi32", EntryPoint = "SetTextAlign", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetTextAlign(IntPtr hdc, int wFlags); - [DllImport( "gdi32", EntryPoint = "SetTextJustification", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetTextJustification( IntPtr hdc, int nBreakExtra, int nBreakCount ); + [DllImport("gdi32", EntryPoint = "SetTextJustification", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetTextJustification(IntPtr hdc, int nBreakExtra, int nBreakCount); - [DllImport( "gdi32", EntryPoint = "UpdateColors", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int UpdateColors( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "UpdateColors", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int UpdateColors(IntPtr hdc); - [DllImport( "kernel32", EntryPoint = "GetProcAddress", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetProcAddress( IntPtr hModule, string lpProcName ); + [DllImport("kernel32", EntryPoint = "GetProcAddress", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetProcAddress(IntPtr hModule, string lpProcName); - [DllImport( "gdi32", EntryPoint = "PlayMetaFileRecord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PlayMetaFileRecord( IntPtr hdc, ref HANDLETABLE lpHandletable, ref METARECORD lpMetaRecord, int nHandles ); + [DllImport("gdi32", EntryPoint = "PlayMetaFileRecord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PlayMetaFileRecord(IntPtr hdc, ref HANDLETABLE lpHandletable, ref METARECORD lpMetaRecord, int nHandles); - [DllImport( "gdi32", EntryPoint = "CloseEnhMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CloseEnhMetaFile( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "CloseEnhMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CloseEnhMetaFile(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "CopyEnhMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CopyEnhMetaFile( IntPtr hemfSrc, string lpszFile ); + [DllImport("gdi32", EntryPoint = "CopyEnhMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CopyEnhMetaFile(IntPtr hemfSrc, string lpszFile); - [DllImport( "gdi32", EntryPoint = "CreateEnhMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateEnhMetaFile( IntPtr hdcRef, string lpFileName, ref RECT lpRect, string lpDescription ); + [DllImport("gdi32", EntryPoint = "CreateEnhMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateEnhMetaFile(IntPtr hdcRef, string lpFileName, ref RECT lpRect, string lpDescription); - [DllImport( "gdi32", EntryPoint = "DeleteEnhMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeleteEnhMetaFile( IntPtr hemf ); + [DllImport("gdi32", EntryPoint = "DeleteEnhMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeleteEnhMetaFile(IntPtr hemf); - [DllImport( "gdi32", EntryPoint = "EnumEnhMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumEnhMetaFile( IntPtr hdc, IntPtr hemf, IntPtr lpEnhMetaFunc, IntPtr lpData, ref RECT lpRect ); + [DllImport("gdi32", EntryPoint = "EnumEnhMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumEnhMetaFile(IntPtr hdc, IntPtr hemf, IntPtr lpEnhMetaFunc, IntPtr lpData, ref RECT lpRect); - [DllImport( "gdi32", EntryPoint = "GetEnhMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetEnhMetaFile( string lpszMetaFile ); + [DllImport("gdi32", EntryPoint = "GetEnhMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetEnhMetaFile(string lpszMetaFile); - [DllImport( "gdi32", EntryPoint = "GetEnhMetaFileBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetEnhMetaFileBits( IntPtr hemf, int cbBuffer, ref byte lpbBuffer ); + [DllImport("gdi32", EntryPoint = "GetEnhMetaFileBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetEnhMetaFileBits(IntPtr hemf, int cbBuffer, ref byte lpbBuffer); - [DllImport( "gdi32", EntryPoint = "GetEnhMetaFileDescription", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetEnhMetaFileDescription( IntPtr hemf, int cchBuffer, string lpszDescription ); + [DllImport("gdi32", EntryPoint = "GetEnhMetaFileDescription", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetEnhMetaFileDescription(IntPtr hemf, int cchBuffer, string lpszDescription); - [DllImport( "gdi32", EntryPoint = "GetEnhMetaFileHeader", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetEnhMetaFileHeader( IntPtr hemf, int cbBuffer, ref ENHMETAHEADER lpemh ); + [DllImport("gdi32", EntryPoint = "GetEnhMetaFileHeader", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetEnhMetaFileHeader(IntPtr hemf, int cbBuffer, ref ENHMETAHEADER lpemh); - [DllImport( "gdi32", EntryPoint = "GetEnhMetaFilePaletteEntries", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetEnhMetaFilePaletteEntries( IntPtr hemf, int cEntries, ref PALETTEENTRY lppe ); + [DllImport("gdi32", EntryPoint = "GetEnhMetaFilePaletteEntries", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetEnhMetaFilePaletteEntries(IntPtr hemf, int cEntries, ref PALETTEENTRY lppe); - [DllImport( "gdi32", EntryPoint = "GetWinMetaFileBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWinMetaFileBits( IntPtr hemf, int cbBuffer, ref byte lpbBuffer, int fnMapMode, IntPtr hdcRef ); + [DllImport("gdi32", EntryPoint = "GetWinMetaFileBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWinMetaFileBits(IntPtr hemf, int cbBuffer, ref byte lpbBuffer, int fnMapMode, IntPtr hdcRef); - [DllImport( "gdi32", EntryPoint = "PlayEnhMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PlayEnhMetaFile( IntPtr hdc, IntPtr hemf, ref RECT lpRect ); + [DllImport("gdi32", EntryPoint = "PlayEnhMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PlayEnhMetaFile(IntPtr hdc, IntPtr hemf, ref RECT lpRect); - [DllImport( "gdi32", EntryPoint = "PlayEnhMetaFileRecord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PlayEnhMetaFileRecord( IntPtr hdc, ref HANDLETABLE lpHandletable, ref ENHMETARECORD lpEnhMetaRecord, int nHandles ); + [DllImport("gdi32", EntryPoint = "PlayEnhMetaFileRecord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PlayEnhMetaFileRecord(IntPtr hdc, ref HANDLETABLE lpHandletable, ref ENHMETARECORD lpEnhMetaRecord, int nHandles); - [DllImport( "gdi32", EntryPoint = "SetEnhMetaFileBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetEnhMetaFileBits( int cbBuffer, ref byte lpData ); + [DllImport("gdi32", EntryPoint = "SetEnhMetaFileBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetEnhMetaFileBits(int cbBuffer, ref byte lpData); - [DllImport( "gdi32", EntryPoint = "SetWinMetaFileBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetWinMetaFileBits( int cbBuffer, ref byte lpbBuffer, IntPtr hdcRef, ref METAFILEPICT lpmfp ); + [DllImport("gdi32", EntryPoint = "SetWinMetaFileBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetWinMetaFileBits(int cbBuffer, ref byte lpbBuffer, IntPtr hdcRef, ref METAFILEPICT lpmfp); - [DllImport( "gdi32", EntryPoint = "GdiComment", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GdiComment( IntPtr hdc, int cbSize, ref byte lpData ); + [DllImport("gdi32", EntryPoint = "GdiComment", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GdiComment(IntPtr hdc, int cbSize, ref byte lpData); - [DllImport( "gdi32", EntryPoint = "GetTextMetrics", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTextMetrics( IntPtr hdc, ref TEXTMETRIC lpMetrics ); + [DllImport("gdi32", EntryPoint = "GetTextMetrics", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTextMetrics(IntPtr hdc, ref TEXTMETRIC lpMetrics); - [DllImport( "gdi32", EntryPoint = "AngleArc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AngleArc( IntPtr hdc, int x, int y, int dwRadius, double eStartAngle, double eSweepAngle ); + [DllImport("gdi32", EntryPoint = "AngleArc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AngleArc(IntPtr hdc, int x, int y, int dwRadius, double eStartAngle, double eSweepAngle); - [DllImport( "gdi32", EntryPoint = "PolyPolyline", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PolyPolyline( IntPtr hdc, ref POINTAPI lppt, IntPtr lpdwPolyPoints, int cCount ); + [DllImport("gdi32", EntryPoint = "PolyPolyline", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PolyPolyline(IntPtr hdc, ref POINTAPI lppt, IntPtr lpdwPolyPoints, int cCount); - [DllImport( "gdi32", EntryPoint = "GetWorldTransform", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWorldTransform( IntPtr hdc, ref XFORM lpXform ); + [DllImport("gdi32", EntryPoint = "GetWorldTransform", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWorldTransform(IntPtr hdc, ref XFORM lpXform); - [DllImport( "gdi32", EntryPoint = "SetWorldTransform", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetWorldTransform( IntPtr hdc, ref XFORM lpXform ); + [DllImport("gdi32", EntryPoint = "SetWorldTransform", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetWorldTransform(IntPtr hdc, ref XFORM lpXform); - [DllImport( "gdi32", EntryPoint = "ModifyWorldTransform", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ModifyWorldTransform( IntPtr hdc, ref XFORM lpXform, int iMode ); + [DllImport("gdi32", EntryPoint = "ModifyWorldTransform", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ModifyWorldTransform(IntPtr hdc, ref XFORM lpXform, int iMode); - [DllImport( "gdi32", EntryPoint = "CombineTransform", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CombineTransform( ref XFORM lpxformResult, ref XFORM lpxform1, ref XFORM lpxform2 ); + [DllImport("gdi32", EntryPoint = "CombineTransform", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CombineTransform(ref XFORM lpxformResult, ref XFORM lpxform1, ref XFORM lpxform2); // Flags value for COLORADJUSTMENT - public const int CA_NEGATIVE = unchecked( (int)( 0x1 ) ); - public const int CA_LOG_FILTER = unchecked( (int)( 0x2 ) ); + public const int CA_NEGATIVE = unchecked((int)(0x1)); + public const int CA_LOG_FILTER = unchecked((int)(0x2)); // IlluminantIndex values - public const int ILLUMINANT_DEVICE_DEFAULT = unchecked( (int)( 0 ) ); - public const int ILLUMINANT_A = unchecked( (int)( 1 ) ); - public const int ILLUMINANT_B = unchecked( (int)( 2 ) ); - public const int ILLUMINANT_C = unchecked( (int)( 3 ) ); - public const int ILLUMINANT_D50 = unchecked( (int)( 4 ) ); - public const int ILLUMINANT_D55 = unchecked( (int)( 5 ) ); - public const int ILLUMINANT_D65 = unchecked( (int)( 6 ) ); - public const int ILLUMINANT_D75 = unchecked( (int)( 7 ) ); - public const int ILLUMINANT_F2 = unchecked( (int)( 8 ) ); - public const int ILLUMINANT_MAX_INDEX = unchecked( (int)( ILLUMINANT_F2 ) ); - - public const int ILLUMINANT_TUNGSTEN = unchecked( (int)( ILLUMINANT_A ) ); - public const int ILLUMINANT_DAYLIGHT = unchecked( (int)( ILLUMINANT_C ) ); - public const int ILLUMINANT_FLUORESCENT = unchecked( (int)( ILLUMINANT_F2 ) ); - public const int ILLUMINANT_NTSC = unchecked( (int)( ILLUMINANT_C ) ); + public const int ILLUMINANT_DEVICE_DEFAULT = unchecked((int)(0)); + public const int ILLUMINANT_A = unchecked((int)(1)); + public const int ILLUMINANT_B = unchecked((int)(2)); + public const int ILLUMINANT_C = unchecked((int)(3)); + public const int ILLUMINANT_D50 = unchecked((int)(4)); + public const int ILLUMINANT_D55 = unchecked((int)(5)); + public const int ILLUMINANT_D65 = unchecked((int)(6)); + public const int ILLUMINANT_D75 = unchecked((int)(7)); + public const int ILLUMINANT_F2 = unchecked((int)(8)); + public const int ILLUMINANT_MAX_INDEX = unchecked((int)(ILLUMINANT_F2)); + + public const int ILLUMINANT_TUNGSTEN = unchecked((int)(ILLUMINANT_A)); + public const int ILLUMINANT_DAYLIGHT = unchecked((int)(ILLUMINANT_C)); + public const int ILLUMINANT_FLUORESCENT = unchecked((int)(ILLUMINANT_F2)); + public const int ILLUMINANT_NTSC = unchecked((int)(ILLUMINANT_C)); // Min and max for RedGamma, GreenGamma, BlueGamma - public const int RGB_GAMMA_MIN = unchecked( (int)( 2500 ) );//words - public const int RGB_GAMMA_MAX = unchecked( (int)( 65000 ) ); + public const int RGB_GAMMA_MIN = unchecked((int)(2500));//words + public const int RGB_GAMMA_MAX = unchecked((int)(65000)); // Min and max for ReferenceBlack and ReferenceWhite - public const int REFERENCE_WHITE_MIN = unchecked( (int)( 6000 ) );//words - public const int REFERENCE_WHITE_MAX = unchecked( (int)( 10000 ) ); - public const int REFERENCE_BLACK_MIN = unchecked( (int)( 0 ) ); - public const int REFERENCE_BLACK_MAX = unchecked( (int)( 4000 ) ); + public const int REFERENCE_WHITE_MIN = unchecked((int)(6000));//words + public const int REFERENCE_WHITE_MAX = unchecked((int)(10000)); + public const int REFERENCE_BLACK_MIN = unchecked((int)(0)); + public const int REFERENCE_BLACK_MAX = unchecked((int)(4000)); // Min and max for Contrast, Brightness, Colorfulness, RedGreenTint - public const int COLOR_ADJ_MIN = unchecked( (int)( -100 ) );//shorts - public const int COLOR_ADJ_MAX = unchecked( (int)( 100 ) ); + public const int COLOR_ADJ_MIN = unchecked((int)(-100));//shorts + public const int COLOR_ADJ_MAX = unchecked((int)(100)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct COLORADJUSTMENT { public int caSize; @@ -6098,16 +6098,16 @@ public struct COLORADJUSTMENT } - [DllImport( "gdi32", EntryPoint = "SetColorAdjustment", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetColorAdjustment( IntPtr hdc, ref COLORADJUSTMENT lpca ); + [DllImport("gdi32", EntryPoint = "SetColorAdjustment", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetColorAdjustment(IntPtr hdc, ref COLORADJUSTMENT lpca); - [DllImport( "gdi32", EntryPoint = "GetColorAdjustment", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetColorAdjustment( IntPtr hdc, ref COLORADJUSTMENT lpca ); + [DllImport("gdi32", EntryPoint = "GetColorAdjustment", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetColorAdjustment(IntPtr hdc, ref COLORADJUSTMENT lpca); - [DllImport( "gdi32", EntryPoint = "CreateHalftonePalette", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateHalftonePalette( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "CreateHalftonePalette", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateHalftonePalette(IntPtr hdc); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DOCINFO { public int cbSize; @@ -6116,160 +6116,160 @@ public struct DOCINFO } - [DllImport( "gdi32", EntryPoint = "StartDoc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int StartDoc( IntPtr hdc, ref DOCINFO lpdi ); + [DllImport("gdi32", EntryPoint = "StartDoc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int StartDoc(IntPtr hdc, ref DOCINFO lpdi); - [DllImport( "gdi32", EntryPoint = "StartPage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int StartPage( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "StartPage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int StartPage(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "EndPage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EndPage( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "EndPage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EndPage(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "EndDoc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EndDoc( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "EndDoc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EndDoc(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "AbortDoc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AbortDoc( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "AbortDoc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AbortDoc(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "AbortPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AbortPath( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "AbortPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AbortPath(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "ArcTo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ArcTo( IntPtr hdc, int X1, int Y1, int X2, int Y2, int X3, int Y3, int X4, int Y4 ); + [DllImport("gdi32", EntryPoint = "ArcTo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ArcTo(IntPtr hdc, int X1, int Y1, int X2, int Y2, int X3, int Y3, int X4, int Y4); - [DllImport( "gdi32", EntryPoint = "BeginPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int BeginPath( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "BeginPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int BeginPath(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "CloseFigure", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CloseFigure( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "CloseFigure", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CloseFigure(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "EndPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EndPath( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "EndPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EndPath(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "FillPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FillPath( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "FillPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FillPath(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "FlattenPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FlattenPath( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "FlattenPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FlattenPath(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "GetPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetPath( IntPtr hdc, ref POINTAPI lpPoint, ref byte lpTypes, int nSize ); + [DllImport("gdi32", EntryPoint = "GetPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetPath(IntPtr hdc, ref POINTAPI lpPoint, ref byte lpTypes, int nSize); - [DllImport( "gdi32", EntryPoint = "PathToRegion", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PathToRegion( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "PathToRegion", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PathToRegion(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "PolyDraw", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PolyDraw( IntPtr hdc, ref POINTAPI lppt, ref byte lpbTypes, int cCount ); + [DllImport("gdi32", EntryPoint = "PolyDraw", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PolyDraw(IntPtr hdc, ref POINTAPI lppt, ref byte lpbTypes, int cCount); - [DllImport( "gdi32", EntryPoint = "SelectClipPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SelectClipPath( IntPtr hdc, int iMode ); + [DllImport("gdi32", EntryPoint = "SelectClipPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SelectClipPath(IntPtr hdc, int iMode); - [DllImport( "gdi32", EntryPoint = "SetArcDirection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetArcDirection( IntPtr hdc, int ArcDirection ); + [DllImport("gdi32", EntryPoint = "SetArcDirection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetArcDirection(IntPtr hdc, int ArcDirection); - [DllImport( "gdi32", EntryPoint = "SetMiterLimit", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetMiterLimit( IntPtr hdc, double eNewLimit, double peOldLimit ); + [DllImport("gdi32", EntryPoint = "SetMiterLimit", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetMiterLimit(IntPtr hdc, double eNewLimit, double peOldLimit); - [DllImport( "gdi32", EntryPoint = "StrokeAndFillPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int StrokeAndFillPath( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "StrokeAndFillPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int StrokeAndFillPath(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "StrokePath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int StrokePath( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "StrokePath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int StrokePath(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "WidenPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WidenPath( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "WidenPath", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WidenPath(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "ExtCreatePen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ExtCreatePen( int dwPenStyle, int dwWidth, ref LOGBRUSH lplb, int dwStyleCount, IntPtr lpStyle ); + [DllImport("gdi32", EntryPoint = "ExtCreatePen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ExtCreatePen(int dwPenStyle, int dwWidth, ref LOGBRUSH lplb, int dwStyleCount, IntPtr lpStyle); - [DllImport( "gdi32", EntryPoint = "GetMiterLimit", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetMiterLimit( IntPtr hdc, double peLimit ); + [DllImport("gdi32", EntryPoint = "GetMiterLimit", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetMiterLimit(IntPtr hdc, double peLimit); - [DllImport( "gdi32", EntryPoint = "GetArcDirection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetArcDirection( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "GetArcDirection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetArcDirection(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "GetObject", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetObject( IntPtr hObject, int nCount, IntPtr lpObject ); + [DllImport("gdi32", EntryPoint = "GetObject", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetObject(IntPtr hObject, int nCount, IntPtr lpObject); - [DllImport( "gdi32", EntryPoint = "MoveToEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MoveToEx( IntPtr hdc, int x, int y, ref POINTAPI lpPoint ); + [DllImport("gdi32", EntryPoint = "MoveToEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MoveToEx(IntPtr hdc, int x, int y, ref POINTAPI lpPoint); - [DllImport( "gdi32", EntryPoint = "TextOut", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int TextOut( IntPtr hdc, int x, int y, string lpString, int nCount ); + [DllImport("gdi32", EntryPoint = "TextOut", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int TextOut(IntPtr hdc, int x, int y, string lpString, int nCount); - [DllImport( "gdi32", EntryPoint = "ExtTextOut", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ExtTextOut( IntPtr hdc, int x, int y, int wOptions, ref RECT lpRect, string lpString, int nCount, IntPtr lpDx ); + [DllImport("gdi32", EntryPoint = "ExtTextOut", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ExtTextOut(IntPtr hdc, int x, int y, int wOptions, ref RECT lpRect, string lpString, int nCount, IntPtr lpDx); - [DllImport( "gdi32", EntryPoint = "PolyTextOut", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PolyTextOut( IntPtr hdc, POLYTEXT pptxt, int cStrings ); + [DllImport("gdi32", EntryPoint = "PolyTextOut", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PolyTextOut(IntPtr hdc, POLYTEXT pptxt, int cStrings); - [DllImport( "gdi32", EntryPoint = "CreatePolygonRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreatePolygonRgn( ref POINTAPI lpPoint, int nCount, int nPolyFillMode ); + [DllImport("gdi32", EntryPoint = "CreatePolygonRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreatePolygonRgn(ref POINTAPI lpPoint, int nCount, int nPolyFillMode); - [DllImport( "gdi32", EntryPoint = "DPtoLP", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DPtoLP( IntPtr hdc, ref POINTAPI lpPoint, int nCount ); + [DllImport("gdi32", EntryPoint = "DPtoLP", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DPtoLP(IntPtr hdc, ref POINTAPI lpPoint, int nCount); - [DllImport( "gdi32", EntryPoint = "LPtoDP", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LPtoDP( IntPtr hdc, ref POINTAPI lpPoint, int nCount ); + [DllImport("gdi32", EntryPoint = "LPtoDP", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LPtoDP(IntPtr hdc, ref POINTAPI lpPoint, int nCount); - [DllImport( "gdi32", EntryPoint = "Polyline", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int Polyline( IntPtr hdc, ref POINTAPI lpPoint, int nCount ); + [DllImport("gdi32", EntryPoint = "Polyline", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int Polyline(IntPtr hdc, ref POINTAPI lpPoint, int nCount); - [DllImport( "gdi32", EntryPoint = "Polygon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int Polygon( IntPtr hdc, ref POINTAPI lpPoint, int nCount ); + [DllImport("gdi32", EntryPoint = "Polygon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int Polygon(IntPtr hdc, ref POINTAPI lpPoint, int nCount); - [DllImport( "gdi32", EntryPoint = "PolyBezier", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PolyBezier( IntPtr hdc, ref POINTAPI lppt, int cPoints ); + [DllImport("gdi32", EntryPoint = "PolyBezier", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PolyBezier(IntPtr hdc, ref POINTAPI lppt, int cPoints); - [DllImport( "gdi32", EntryPoint = "PolyBezierTo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PolyBezierTo( IntPtr hdc, ref POINTAPI lppt, int cCount ); + [DllImport("gdi32", EntryPoint = "PolyBezierTo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PolyBezierTo(IntPtr hdc, ref POINTAPI lppt, int cCount); - [DllImport( "gdi32", EntryPoint = "PolylineTo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PolylineTo( IntPtr hdc, ref POINTAPI lppt, int cCount ); + [DllImport("gdi32", EntryPoint = "PolylineTo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PolylineTo(IntPtr hdc, ref POINTAPI lppt, int cCount); - [DllImport( "gdi32", EntryPoint = "SetViewportExtEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetViewportExtEx( IntPtr hdc, int nX, int nY, ref SIZE lpSize ); + [DllImport("gdi32", EntryPoint = "SetViewportExtEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetViewportExtEx(IntPtr hdc, int nX, int nY, ref SIZE lpSize); - [DllImport( "gdi32", EntryPoint = "SetViewportOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetViewportOrgEx( IntPtr hdc, int nX, int nY, ref POINTAPI lpPoint ); + [DllImport("gdi32", EntryPoint = "SetViewportOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetViewportOrgEx(IntPtr hdc, int nX, int nY, ref POINTAPI lpPoint); - [DllImport( "gdi32", EntryPoint = "SetWindowOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetWindowOrgEx( IntPtr hdc, int nX, int nY, ref POINTAPI lpPoint ); + [DllImport("gdi32", EntryPoint = "SetWindowOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetWindowOrgEx(IntPtr hdc, int nX, int nY, ref POINTAPI lpPoint); - [DllImport( "gdi32", EntryPoint = "SetWindowExtEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetWindowExtEx( IntPtr hdc, int nX, int nY, ref SIZE lpSize ); + [DllImport("gdi32", EntryPoint = "SetWindowExtEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetWindowExtEx(IntPtr hdc, int nX, int nY, ref SIZE lpSize); - [DllImport( "gdi32", EntryPoint = "OffsetViewportOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OffsetViewportOrgEx( IntPtr hdc, int nX, int nY, ref POINTAPI lpPoint ); + [DllImport("gdi32", EntryPoint = "OffsetViewportOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OffsetViewportOrgEx(IntPtr hdc, int nX, int nY, ref POINTAPI lpPoint); - [DllImport( "gdi32", EntryPoint = "OffsetWindowOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OffsetWindowOrgEx( IntPtr hdc, int nX, int nY, ref POINTAPI lpPoint ); + [DllImport("gdi32", EntryPoint = "OffsetWindowOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OffsetWindowOrgEx(IntPtr hdc, int nX, int nY, ref POINTAPI lpPoint); - [DllImport( "gdi32", EntryPoint = "ScaleWindowExtEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ScaleWindowExtEx( IntPtr hdc, int nXnum, int nXdenom, int nYnum, int nYdenom, ref SIZE lpSize ); + [DllImport("gdi32", EntryPoint = "ScaleWindowExtEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ScaleWindowExtEx(IntPtr hdc, int nXnum, int nXdenom, int nYnum, int nYdenom, ref SIZE lpSize); - [DllImport( "gdi32", EntryPoint = "ScaleViewportExtEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ScaleViewportExtEx( IntPtr hdc, int nXnum, int nXdenom, int nYnum, int nYdenom, ref SIZE lpSize ); + [DllImport("gdi32", EntryPoint = "ScaleViewportExtEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ScaleViewportExtEx(IntPtr hdc, int nXnum, int nXdenom, int nYnum, int nYdenom, ref SIZE lpSize); - [DllImport( "gdi32", EntryPoint = "SetBitmapDimensionEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetBitmapDimensionEx( IntPtr hbm, int nX, int nY, ref SIZE lpSize ); + [DllImport("gdi32", EntryPoint = "SetBitmapDimensionEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetBitmapDimensionEx(IntPtr hbm, int nX, int nY, ref SIZE lpSize); - [DllImport( "gdi32", EntryPoint = "SetBrushOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetBrushOrgEx( IntPtr hdc, int nXOrg, int nYOrg, ref POINTAPI lppt ); + [DllImport("gdi32", EntryPoint = "SetBrushOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetBrushOrgEx(IntPtr hdc, int nXOrg, int nYOrg, ref POINTAPI lppt); - [DllImport( "gdi32", EntryPoint = "GetTextFace", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTextFace( IntPtr hdc, int nCount, string lpFacename ); + [DllImport("gdi32", EntryPoint = "GetTextFace", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTextFace(IntPtr hdc, int nCount, string lpFacename); - public const int FONTMAPPER_MAX = unchecked( (int)( 10 ) ); + public const int FONTMAPPER_MAX = unchecked((int)(10)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct KERNINGPAIR { public int wFirst; @@ -6278,148 +6278,148 @@ public struct KERNINGPAIR } - [DllImport( "gdi32", EntryPoint = "GetKerningPairs", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetKerningPairs( IntPtr hdc, int cPairs, ref KERNINGPAIR lpkrnpair ); + [DllImport("gdi32", EntryPoint = "GetKerningPairs", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetKerningPairs(IntPtr hdc, int cPairs, ref KERNINGPAIR lpkrnpair); - [DllImport( "gdi32", EntryPoint = "GetDCOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetDCOrgEx( IntPtr hdc, ref POINTAPI lpPoint ); + [DllImport("gdi32", EntryPoint = "GetDCOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetDCOrgEx(IntPtr hdc, ref POINTAPI lpPoint); - [DllImport( "gdi32", EntryPoint = "UnrealizeObject", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int UnrealizeObject( IntPtr hObject ); + [DllImport("gdi32", EntryPoint = "UnrealizeObject", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int UnrealizeObject(IntPtr hObject); - [DllImport( "gdi32", EntryPoint = "GdiFlush", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("gdi32", EntryPoint = "GdiFlush", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GdiFlush(); - [DllImport( "gdi32", EntryPoint = "GdiSetBatchLimit", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GdiSetBatchLimit( int dwLimit ); + [DllImport("gdi32", EntryPoint = "GdiSetBatchLimit", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GdiSetBatchLimit(int dwLimit); - [DllImport( "gdi32", EntryPoint = "GdiGetBatchLimit", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("gdi32", EntryPoint = "GdiGetBatchLimit", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GdiGetBatchLimit(); // Enhanced metafile constants - public const int ENHMETA_SIGNATURE = unchecked( (int)( 0x464D4520 ) ); + public const int ENHMETA_SIGNATURE = unchecked((int)(0x464D4520)); // Stock object flag used in the object handle // index in the enhanced metafile records. // E.g. The object handle index (META_STOCK_OBJECT Or BLACK_BRUSH) // represents the stock object BLACK_BRUSH. - public const int ENHMETA_STOCK_OBJECT = unchecked( (int)( 0x80000000 ) ); + public const int ENHMETA_STOCK_OBJECT = unchecked((int)(0x80000000)); // Enhanced metafile record types. - public const int EMR_HEADER = unchecked( (int)( 1 ) ); - public const int EMR_POLYBEZIER = unchecked( (int)( 2 ) ); - public const int EMR_POLYGON = unchecked( (int)( 3 ) ); - public const int EMR_POLYLINE = unchecked( (int)( 4 ) ); - public const int EMR_POLYBEZIERTO = unchecked( (int)( 5 ) ); - public const int EMR_POLYLINETO = unchecked( (int)( 6 ) ); - public const int EMR_POLYPOLYLINE = unchecked( (int)( 7 ) ); - public const int EMR_POLYPOLYGON = unchecked( (int)( 8 ) ); - public const int EMR_SETWINDOWEXTEX = unchecked( (int)( 9 ) ); - public const int EMR_SETWINDOWORGEX = unchecked( (int)( 10 ) ); - public const int EMR_SETVIEWPORTEXTEX = unchecked( (int)( 11 ) ); - public const int EMR_SETVIEWPORTORGEX = unchecked( (int)( 12 ) ); - public const int EMR_SETBRUSHORGEX = unchecked( (int)( 13 ) ); - public const int EMR_EOF = unchecked( (int)( 14 ) ); - public const int EMR_SETPIXELV = unchecked( (int)( 15 ) ); - public const int EMR_SETMAPPERFLAGS = unchecked( (int)( 16 ) ); - public const int EMR_SETMAPMODE = unchecked( (int)( 17 ) ); - public const int EMR_SETBKMODE = unchecked( (int)( 18 ) ); - public const int EMR_SETPOLYFILLMODE = unchecked( (int)( 19 ) ); - public const int EMR_SETROP2 = unchecked( (int)( 20 ) ); - public const int EMR_SETSTRETCHBLTMODE = unchecked( (int)( 21 ) ); - public const int EMR_SETTEXTALIGN = unchecked( (int)( 22 ) ); - public const int EMR_SETCOLORADJUSTMENT = unchecked( (int)( 23 ) ); - public const int EMR_SETTEXTCOLOR = unchecked( (int)( 24 ) ); - public const int EMR_SETBKCOLOR = unchecked( (int)( 25 ) ); - public const int EMR_OFFSETCLIPRGN = unchecked( (int)( 26 ) ); - public const int EMR_MOVETOEX = unchecked( (int)( 27 ) ); - public const int EMR_SETMETARGN = unchecked( (int)( 28 ) ); - public const int EMR_EXCLUDECLIPRECT = unchecked( (int)( 29 ) ); - public const int EMR_INTERSECTCLIPRECT = unchecked( (int)( 30 ) ); - public const int EMR_SCALEVIEWPORTEXTEX = unchecked( (int)( 31 ) ); - public const int EMR_SCALEWINDOWEXTEX = unchecked( (int)( 32 ) ); - public const int EMR_SAVEDC = unchecked( (int)( 33 ) ); - public const int EMR_RESTOREDC = unchecked( (int)( 34 ) ); - public const int EMR_SETWORLDTRANSFORM = unchecked( (int)( 35 ) ); - public const int EMR_MODIFYWORLDTRANSFORM = unchecked( (int)( 36 ) ); - public const int EMR_SELECTOBJECT = unchecked( (int)( 37 ) ); - public const int EMR_CREATEPEN = unchecked( (int)( 38 ) ); - public const int EMR_CREATEBRUSHINDIRECT = unchecked( (int)( 39 ) ); - public const int EMR_DELETEOBJECT = unchecked( (int)( 40 ) ); - public const int EMR_ANGLEARC = unchecked( (int)( 41 ) ); - public const int EMR_ELLIPSE = unchecked( (int)( 42 ) ); - public const int EMR_RECTANGLE = unchecked( (int)( 43 ) ); - public const int EMR_ROUNDRECT = unchecked( (int)( 44 ) ); - public const int EMR_ARC = unchecked( (int)( 45 ) ); - public const int EMR_CHORD = unchecked( (int)( 46 ) ); - public const int EMR_PIE = unchecked( (int)( 47 ) ); - public const int EMR_SELECTPALETTE = unchecked( (int)( 48 ) ); - public const int EMR_CREATEPALETTE = unchecked( (int)( 49 ) ); - public const int EMR_SETPALETTEENTRIES = unchecked( (int)( 50 ) ); - public const int EMR_RESIZEPALETTE = unchecked( (int)( 51 ) ); - public const int EMR_REALIZEPALETTE = unchecked( (int)( 52 ) ); - public const int EMR_EXTFLOODFILL = unchecked( (int)( 53 ) ); - public const int EMR_LINETO = unchecked( (int)( 54 ) ); - public const int EMR_ARCTO = unchecked( (int)( 55 ) ); - public const int EMR_POLYDRAW = unchecked( (int)( 56 ) ); - public const int EMR_SETARCDIRECTION = unchecked( (int)( 57 ) ); - public const int EMR_SETMITERLIMIT = unchecked( (int)( 58 ) ); - public const int EMR_BEGINPATH = unchecked( (int)( 59 ) ); - public const int EMR_ENDPATH = unchecked( (int)( 60 ) ); - public const int EMR_CLOSEFIGURE = unchecked( (int)( 61 ) ); - public const int EMR_FILLPATH = unchecked( (int)( 62 ) ); - public const int EMR_STROKEANDFILLPATH = unchecked( (int)( 63 ) ); - public const int EMR_STROKEPATH = unchecked( (int)( 64 ) ); - public const int EMR_FLATTENPATH = unchecked( (int)( 65 ) ); - public const int EMR_WIDENPATH = unchecked( (int)( 66 ) ); - public const int EMR_SELECTCLIPPATH = unchecked( (int)( 67 ) ); - public const int EMR_ABORTPATH = unchecked( (int)( 68 ) ); - - public const int EMR_GDICOMMENT = unchecked( (int)( 70 ) ); - public const int EMR_FILLRGN = unchecked( (int)( 71 ) ); - public const int EMR_FRAMERGN = unchecked( (int)( 72 ) ); - public const int EMR_INVERTRGN = unchecked( (int)( 73 ) ); - public const int EMR_PAINTRGN = unchecked( (int)( 74 ) ); - public const int EMR_EXTSELECTCLIPRGN = unchecked( (int)( 75 ) ); - public const int EMR_BITBLT = unchecked( (int)( 76 ) ); - public const int EMR_STRETCHBLT = unchecked( (int)( 77 ) ); - public const int EMR_MASKBLT = unchecked( (int)( 78 ) ); - public const int EMR_PLGBLT = unchecked( (int)( 79 ) ); - public const int EMR_SETDIBITSTODEVICE = unchecked( (int)( 80 ) ); - public const int EMR_STRETCHDIBITS = unchecked( (int)( 81 ) ); - public const int EMR_EXTCREATEFONTINDIRECTW = unchecked( (int)( 82 ) ); - public const int EMR_EXTTEXTOUTA = unchecked( (int)( 83 ) ); - public const int EMR_EXTTEXTOUTW = unchecked( (int)( 84 ) ); - public const int EMR_POLYBEZIER16 = unchecked( (int)( 85 ) ); - public const int EMR_POLYGON16 = unchecked( (int)( 86 ) ); - public const int EMR_POLYLINE16 = unchecked( (int)( 87 ) ); - public const int EMR_POLYBEZIERTO16 = unchecked( (int)( 88 ) ); - public const int EMR_POLYLINETO16 = unchecked( (int)( 89 ) ); - public const int EMR_POLYPOLYLINE16 = unchecked( (int)( 90 ) ); - public const int EMR_POLYPOLYGON16 = unchecked( (int)( 91 ) ); - public const int EMR_POLYDRAW16 = unchecked( (int)( 92 ) ); - public const int EMR_CREATEMONOBRUSH = unchecked( (int)( 93 ) ); - public const int EMR_CREATEDIBPATTERNBRUSHPT = unchecked( (int)( 94 ) ); - public const int EMR_EXTCREATEPEN = unchecked( (int)( 95 ) ); - public const int EMR_POLYTEXTOUTA = unchecked( (int)( 96 ) ); - public const int EMR_POLYTEXTOUTW = unchecked( (int)( 97 ) ); - - public const int EMR_MIN = unchecked( (int)( 1 ) ); - public const int EMR_MAX = unchecked( (int)( 97 ) ); - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int EMR_HEADER = unchecked((int)(1)); + public const int EMR_POLYBEZIER = unchecked((int)(2)); + public const int EMR_POLYGON = unchecked((int)(3)); + public const int EMR_POLYLINE = unchecked((int)(4)); + public const int EMR_POLYBEZIERTO = unchecked((int)(5)); + public const int EMR_POLYLINETO = unchecked((int)(6)); + public const int EMR_POLYPOLYLINE = unchecked((int)(7)); + public const int EMR_POLYPOLYGON = unchecked((int)(8)); + public const int EMR_SETWINDOWEXTEX = unchecked((int)(9)); + public const int EMR_SETWINDOWORGEX = unchecked((int)(10)); + public const int EMR_SETVIEWPORTEXTEX = unchecked((int)(11)); + public const int EMR_SETVIEWPORTORGEX = unchecked((int)(12)); + public const int EMR_SETBRUSHORGEX = unchecked((int)(13)); + public const int EMR_EOF = unchecked((int)(14)); + public const int EMR_SETPIXELV = unchecked((int)(15)); + public const int EMR_SETMAPPERFLAGS = unchecked((int)(16)); + public const int EMR_SETMAPMODE = unchecked((int)(17)); + public const int EMR_SETBKMODE = unchecked((int)(18)); + public const int EMR_SETPOLYFILLMODE = unchecked((int)(19)); + public const int EMR_SETROP2 = unchecked((int)(20)); + public const int EMR_SETSTRETCHBLTMODE = unchecked((int)(21)); + public const int EMR_SETTEXTALIGN = unchecked((int)(22)); + public const int EMR_SETCOLORADJUSTMENT = unchecked((int)(23)); + public const int EMR_SETTEXTCOLOR = unchecked((int)(24)); + public const int EMR_SETBKCOLOR = unchecked((int)(25)); + public const int EMR_OFFSETCLIPRGN = unchecked((int)(26)); + public const int EMR_MOVETOEX = unchecked((int)(27)); + public const int EMR_SETMETARGN = unchecked((int)(28)); + public const int EMR_EXCLUDECLIPRECT = unchecked((int)(29)); + public const int EMR_INTERSECTCLIPRECT = unchecked((int)(30)); + public const int EMR_SCALEVIEWPORTEXTEX = unchecked((int)(31)); + public const int EMR_SCALEWINDOWEXTEX = unchecked((int)(32)); + public const int EMR_SAVEDC = unchecked((int)(33)); + public const int EMR_RESTOREDC = unchecked((int)(34)); + public const int EMR_SETWORLDTRANSFORM = unchecked((int)(35)); + public const int EMR_MODIFYWORLDTRANSFORM = unchecked((int)(36)); + public const int EMR_SELECTOBJECT = unchecked((int)(37)); + public const int EMR_CREATEPEN = unchecked((int)(38)); + public const int EMR_CREATEBRUSHINDIRECT = unchecked((int)(39)); + public const int EMR_DELETEOBJECT = unchecked((int)(40)); + public const int EMR_ANGLEARC = unchecked((int)(41)); + public const int EMR_ELLIPSE = unchecked((int)(42)); + public const int EMR_RECTANGLE = unchecked((int)(43)); + public const int EMR_ROUNDRECT = unchecked((int)(44)); + public const int EMR_ARC = unchecked((int)(45)); + public const int EMR_CHORD = unchecked((int)(46)); + public const int EMR_PIE = unchecked((int)(47)); + public const int EMR_SELECTPALETTE = unchecked((int)(48)); + public const int EMR_CREATEPALETTE = unchecked((int)(49)); + public const int EMR_SETPALETTEENTRIES = unchecked((int)(50)); + public const int EMR_RESIZEPALETTE = unchecked((int)(51)); + public const int EMR_REALIZEPALETTE = unchecked((int)(52)); + public const int EMR_EXTFLOODFILL = unchecked((int)(53)); + public const int EMR_LINETO = unchecked((int)(54)); + public const int EMR_ARCTO = unchecked((int)(55)); + public const int EMR_POLYDRAW = unchecked((int)(56)); + public const int EMR_SETARCDIRECTION = unchecked((int)(57)); + public const int EMR_SETMITERLIMIT = unchecked((int)(58)); + public const int EMR_BEGINPATH = unchecked((int)(59)); + public const int EMR_ENDPATH = unchecked((int)(60)); + public const int EMR_CLOSEFIGURE = unchecked((int)(61)); + public const int EMR_FILLPATH = unchecked((int)(62)); + public const int EMR_STROKEANDFILLPATH = unchecked((int)(63)); + public const int EMR_STROKEPATH = unchecked((int)(64)); + public const int EMR_FLATTENPATH = unchecked((int)(65)); + public const int EMR_WIDENPATH = unchecked((int)(66)); + public const int EMR_SELECTCLIPPATH = unchecked((int)(67)); + public const int EMR_ABORTPATH = unchecked((int)(68)); + + public const int EMR_GDICOMMENT = unchecked((int)(70)); + public const int EMR_FILLRGN = unchecked((int)(71)); + public const int EMR_FRAMERGN = unchecked((int)(72)); + public const int EMR_INVERTRGN = unchecked((int)(73)); + public const int EMR_PAINTRGN = unchecked((int)(74)); + public const int EMR_EXTSELECTCLIPRGN = unchecked((int)(75)); + public const int EMR_BITBLT = unchecked((int)(76)); + public const int EMR_STRETCHBLT = unchecked((int)(77)); + public const int EMR_MASKBLT = unchecked((int)(78)); + public const int EMR_PLGBLT = unchecked((int)(79)); + public const int EMR_SETDIBITSTODEVICE = unchecked((int)(80)); + public const int EMR_STRETCHDIBITS = unchecked((int)(81)); + public const int EMR_EXTCREATEFONTINDIRECTW = unchecked((int)(82)); + public const int EMR_EXTTEXTOUTA = unchecked((int)(83)); + public const int EMR_EXTTEXTOUTW = unchecked((int)(84)); + public const int EMR_POLYBEZIER16 = unchecked((int)(85)); + public const int EMR_POLYGON16 = unchecked((int)(86)); + public const int EMR_POLYLINE16 = unchecked((int)(87)); + public const int EMR_POLYBEZIERTO16 = unchecked((int)(88)); + public const int EMR_POLYLINETO16 = unchecked((int)(89)); + public const int EMR_POLYPOLYLINE16 = unchecked((int)(90)); + public const int EMR_POLYPOLYGON16 = unchecked((int)(91)); + public const int EMR_POLYDRAW16 = unchecked((int)(92)); + public const int EMR_CREATEMONOBRUSH = unchecked((int)(93)); + public const int EMR_CREATEDIBPATTERNBRUSHPT = unchecked((int)(94)); + public const int EMR_EXTCREATEPEN = unchecked((int)(95)); + public const int EMR_POLYTEXTOUTA = unchecked((int)(96)); + public const int EMR_POLYTEXTOUTW = unchecked((int)(97)); + + public const int EMR_MIN = unchecked((int)(1)); + public const int EMR_MAX = unchecked((int)(97)); + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMR { public int iType; public int nSize; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRTEXT { public POINTL ptlReference; @@ -6430,173 +6430,173 @@ public struct EMRTEXT public int offDx; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRABORTPATH { public EMR pEmr; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRBEGINPATH { public EMR pEmr; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRENDPATH { public EMR pEmr; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRCLOSEFIGURE { public EMR pEmr; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRFLATTENPATH { public EMR pEmr; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRWIDENPATH { public EMR pEmr; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETMETARGN { public EMR pEmr; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMREMRSAVEDC { public EMR pEmr; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRREALIZEPALETTE { public EMR pEmr; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSELECTCLIPPATH { public EMR pEmr; public int iMode; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETBKMODE { public EMR pEmr; public int iMode; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETMAPMODE { public EMR pEmr; public int iMode; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETPOLYFILLMODE { public EMR pEmr; public int iMode; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETROP2 { public EMR pEmr; public int iMode; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETSTRETCHBLTMODE { public EMR pEmr; public int iMode; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETTEXTALIGN { public EMR pEmr; public int iMode; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETMITERLIMIT { public EMR pEmr; public double eMiterLimit; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRRESTOREDC { public EMR pEmr; public int iRelative; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETARCDIRECTION { public EMR pEmr; public int iArcDirection; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETMAPPERFLAGS { public EMR pEmr; public int dwFlags; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETTEXTCOLOR { public EMR pEmr; public int crColor; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETBKCOLOR { public EMR pEmr; public int crColor; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSELECTOBJECT { public EMR pEmr; public int ihObject; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRDELETEOBJECT { public EMR pEmr; public int ihObject; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSELECTPALETTE { public EMR pEmr; public int ihPal; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRRESIZEPALETTE { public EMR pEmr; @@ -6604,7 +6604,7 @@ public struct EMRRESIZEPALETTE public int cEntries; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETPALETTEENTRIES { public EMR pEmr; @@ -6614,14 +6614,14 @@ public struct EMRSETPALETTEENTRIES public int aPalEntries; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETCOLORADJUSTMENT { public EMR pEmr; public COLORADJUSTMENT ColorAdjustment; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRGDICOMMENT { public EMR pEmr; @@ -6629,7 +6629,7 @@ public struct EMRGDICOMMENT public int Data; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMREOF { public EMR pEmr; @@ -6638,98 +6638,98 @@ public struct EMREOF public int nSizeLast; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRLINETO { public EMR pEmr; public POINTL ptl; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRMOVETOEX { public EMR pEmr; public POINTL ptl; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMROFFSETCLIPRGN { public EMR pEmr; public POINTL ptlOffset; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRFILLPATH { public EMR pEmr; public RECTL rclBounds; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSTROKEANDFILLPATH { public EMR pEmr; public RECTL rclBounds; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSTROKEPATH { public EMR pEmr; public RECTL rclBounds; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMREXCLUDECLIPRECT { public EMR pEmr; public RECTL rclClip; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRINTERSECTCLIPRECT { public EMR pEmr; public RECTL rclClip; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETVIEWPORTORGEX { public EMR pEmr; public POINTL ptlOrigin; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETWINDOWORGEX { public EMR pEmr; public POINTL ptlOrigin; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETBRUSHORGEX { public EMR pEmr; public POINTL ptlOrigin; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETVIEWPORTEXTEX { public EMR pEmr; public SIZEL szlExtent; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETWINDOWEXTEX { public EMR pEmr; public SIZEL szlExtent; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSCALEVIEWPORTEXTEX { public EMR pEmr; @@ -6739,7 +6739,7 @@ public struct EMRSCALEVIEWPORTEXTEX public int yDemon; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSCALEWINDOWEXTEX { public EMR pEmr; @@ -6749,14 +6749,14 @@ public struct EMRSCALEWINDOWEXTEX public int yDemon; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETWORLDTRANSFORM { public EMR pEmr; public XFORM xform; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRMODIFYWORLDTRANSFORM { public EMR pEmr; @@ -6764,7 +6764,7 @@ public struct EMRMODIFYWORLDTRANSFORM public int iMode; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETPIXELV { public EMR pEmr; @@ -6772,7 +6772,7 @@ public struct EMRSETPIXELV public int crColor; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMREXTFLOODFILL { public EMR pEmr; @@ -6781,21 +6781,21 @@ public struct EMREXTFLOODFILL public int iMode; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRELLIPSE { public EMR pEmr; public RECTL rclBox; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRRECTANGLE { public EMR pEmr; public RECTL rclBox; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRROUNDRECT { public EMR pEmr; @@ -6803,7 +6803,7 @@ public struct EMRROUNDRECT public SIZEL szlCorner; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRARC { public EMR pEmr; @@ -6812,7 +6812,7 @@ public struct EMRARC public POINTL ptlEnd; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRARCTO { public EMR pEmr; @@ -6821,7 +6821,7 @@ public struct EMRARCTO public POINTL ptlEnd; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRCHORD { public EMR pEmr; @@ -6830,7 +6830,7 @@ public struct EMRCHORD public POINTL ptlEnd; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRPIE { public EMR pEmr; @@ -6839,7 +6839,7 @@ public struct EMRPIE public POINTL ptlEnd; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRANGLEARC { public EMR pEmr; @@ -6849,7 +6849,7 @@ public struct EMRANGLEARC public double eSweepAngle; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRPOLYLINE { public EMR pEmr; @@ -6858,7 +6858,7 @@ public struct EMRPOLYLINE public int aptl; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRPOLYBEZIER { public EMR pEmr; @@ -6867,7 +6867,7 @@ public struct EMRPOLYBEZIER public int aptl; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRPOLYGON { public EMR pEmr; @@ -6876,7 +6876,7 @@ public struct EMRPOLYGON public int aptl; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRPOLYBEZIERTO { public EMR pEmr; @@ -6885,7 +6885,7 @@ public struct EMRPOLYBEZIERTO public int aptl; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRPOLYLINE16 { public EMR pEmr; @@ -6894,7 +6894,7 @@ public struct EMRPOLYLINE16 public int apts; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRPOLYBEZIER16 { public EMR pEmr; @@ -6903,7 +6903,7 @@ public struct EMRPOLYBEZIER16 public int apts; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRPOLYGON16 { public EMR pEmr; @@ -6912,7 +6912,7 @@ public struct EMRPOLYGON16 public int apts; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRPLOYBEZIERTO16 { public EMR pEmr; @@ -6921,7 +6921,7 @@ public struct EMRPLOYBEZIERTO16 public int apts; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRPOLYLINETO16 { public EMR pEmr; @@ -6930,7 +6930,7 @@ public struct EMRPOLYLINETO16 public int apts; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRPOLYDRAW { public EMR pEmr; @@ -6940,7 +6940,7 @@ public struct EMRPOLYDRAW public int abTypes; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRPOLYDRAW16 { public EMR pEmr; @@ -6950,7 +6950,7 @@ public struct EMRPOLYDRAW16 public int abTypes; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRPOLYPOLYLINE { public EMR pEmr; @@ -6961,7 +6961,7 @@ public struct EMRPOLYPOLYLINE public int aptl; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRPOLYPOLYGON { public EMR pEmr; @@ -6972,7 +6972,7 @@ public struct EMRPOLYPOLYGON public int aptl; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRPOLYPOLYLINE16 { public EMR pEmr; @@ -6983,7 +6983,7 @@ public struct EMRPOLYPOLYLINE16 public int apts; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRPOLYPOLYGON16 { public EMR pEmr; @@ -6994,7 +6994,7 @@ public struct EMRPOLYPOLYGON16 public int apts; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRINVERTRGN { public EMR pEmr; @@ -7003,7 +7003,7 @@ public struct EMRINVERTRGN public int RgnData; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRPAINTRGN { public EMR pEmr; @@ -7012,7 +7012,7 @@ public struct EMRPAINTRGN public int RgnData; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRFILLRGN { public EMR pEmr; @@ -7022,7 +7022,7 @@ public struct EMRFILLRGN public int RgnData; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRFRAMERGN { public EMR pEmr; @@ -7033,7 +7033,7 @@ public struct EMRFRAMERGN public int RgnData; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMREXTSELECTCLIPRGN { public EMR pEmr; @@ -7042,7 +7042,7 @@ public struct EMREXTSELECTCLIPRGN public int RgnData; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMREXTTEXTOUT { public EMR pEmr; @@ -7053,7 +7053,7 @@ public struct EMREXTTEXTOUT public EMRTEXT emrtext; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRBITBLT { public EMR pEmr; @@ -7074,7 +7074,7 @@ public struct EMRBITBLT public int cbBitsSrc; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSTRETCHBLT { public EMR pEmr; @@ -7097,7 +7097,7 @@ public struct EMRSTRETCHBLT public int cySrc; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRMASKBLT { public EMR pEmr; @@ -7128,7 +7128,7 @@ public struct EMRMASKBLT public int cbBitsMask; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRPLGBLT { public EMR pEmr; @@ -7154,7 +7154,7 @@ public struct EMRPLGBLT public int cbBitsMask; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSETDIBITSTODEVICE { public EMR pEmr; @@ -7174,7 +7174,7 @@ public struct EMRSETDIBITSTODEVICE public int cScans; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSTRETCHDIBITS { public EMR pEmr; @@ -7195,7 +7195,7 @@ public struct EMRSTRETCHDIBITS public int cyDest; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMREXTCREATEFONTINDIRECT { public EMR pEmr; @@ -7203,7 +7203,7 @@ public struct EMREXTCREATEFONTINDIRECT public EXTLOGFONT elfw; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRCREATEPALETTE { public EMR pEmr; @@ -7211,7 +7211,7 @@ public struct EMRCREATEPALETTE public LOGPALETTE lgpl; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRCREATEPEN { public EMR pEmr; @@ -7219,7 +7219,7 @@ public struct EMRCREATEPEN public LOGPEN lopn; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMREXTCREATEPEN { public EMR pEmr; @@ -7231,7 +7231,7 @@ public struct EMREXTCREATEPEN public EXTLOGPEN elp; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRCREATEBRUSHINDIRECT { public EMR pEmr; @@ -7239,7 +7239,7 @@ public struct EMRCREATEBRUSHINDIRECT public LOGBRUSH lb; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRCREATEMONOBRUSH { public EMR pEmr; @@ -7251,7 +7251,7 @@ public struct EMRCREATEMONOBRUSH public int cbBits; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRCREATEDIBPATTERNBRUSHPT { public EMR pEmr; @@ -7273,12 +7273,12 @@ public struct EMRCREATEDIBPATTERNBRUSHPT // **************************************************************************/ // StretchBlt() Modes - public const int STRETCH_ANDSCANS = unchecked( (int)( 1 ) ); - public const int STRETCH_ORSCANS = unchecked( (int)( 2 ) ); - public const int STRETCH_DELETESCANS = unchecked( (int)( 3 ) ); - public const int STRETCH_HALFTONE = unchecked( (int)( 4 ) ); + public const int STRETCH_ANDSCANS = unchecked((int)(1)); + public const int STRETCH_ORSCANS = unchecked((int)(2)); + public const int STRETCH_DELETESCANS = unchecked((int)(3)); + public const int STRETCH_HALFTONE = unchecked((int)(4)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct BITMAPV4HEADER { public int bV4Size; @@ -7303,14 +7303,14 @@ public struct BITMAPV4HEADER public int bV4GammaBlue; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct FONTSIGNATURE { public int fsUsb; public int fsCsb; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CHARSETINFO { public int ciCharset; @@ -7318,11 +7318,11 @@ public struct CHARSETINFO public FONTSIGNATURE fs; } - public const int TCI_SRCCHARSET = unchecked( (int)( 1 ) ); - public const int TCI_SRCCODEPAGE = unchecked( (int)( 2 ) ); - public const int TCI_SRCFONTSIG = unchecked( (int)( 3 ) ); + public const int TCI_SRCCHARSET = unchecked((int)(1)); + public const int TCI_SRCCODEPAGE = unchecked((int)(2)); + public const int TCI_SRCFONTSIG = unchecked((int)(3)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct LOCALESIGNATURE { public int lsUsb; @@ -7330,14 +7330,14 @@ public struct LOCALESIGNATURE public int lsCsbSupported; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct NEWTEXTMETRICEX { public NEWTEXTMETRIC ntmTm; public FONTSIGNATURE ntmFontSig; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ENUMLOGFONTEX { public LOGFONT elfLogFont; @@ -7346,138 +7346,138 @@ public struct ENUMLOGFONTEX public int elfScript; } - public const int MONO_FONT = unchecked( (int)( 8 ) ); - public const int JOHAB_CHARSET = unchecked( (int)( 130 ) ); - public const int HEBREW_CHARSET = unchecked( (int)( 177 ) ); - public const int ARABIC_CHARSET = unchecked( (int)( 178 ) ); - public const int GREEK_CHARSET = unchecked( (int)( 161 ) ); - public const int TURKISH_CHARSET = unchecked( (int)( 162 ) ); - public const int THAI_CHARSET = unchecked( (int)( 222 ) ); - public const int EASTEUROPE_CHARSET = unchecked( (int)( 238 ) ); - public const int RUSSIAN_CHARSET = unchecked( (int)( 204 ) ); - - public const int MAC_CHARSET = unchecked( (int)( 77 ) ); - public const int BALTIC_CHARSET = unchecked( (int)( 186 ) ); - - public const int FS_LATIN1 = unchecked( (int)( 0x1 ) ); - public const int FS_LATIN2 = unchecked( (int)( 0x2 ) ); - public const int FS_CYRILLIC = unchecked( (int)( 0x4 ) ); - public const int FS_GREEK = unchecked( (int)( 0x8 ) ); - public const int FS_TURKISH = unchecked( (int)( 0x10 ) ); - public const int FS_HEBREW = unchecked( (int)( 0x20 ) ); - public const int FS_ARABIC = unchecked( (int)( 0x40 ) ); - public const int FS_BALTIC = unchecked( (int)( 0x80 ) ); - public const int FS_THAI = unchecked( (int)( 0x10000 ) ); - public const int FS_JISJAPAN = unchecked( (int)( 0x20000 ) ); - public const int FS_CHINESESIMP = unchecked( (int)( 0x40000 ) ); - public const int FS_WANSUNG = unchecked( (int)( 0x80000 ) ); - public const int FS_CHINESETRAD = unchecked( (int)( 0x100000 ) ); - public const int FS_JOHAB = unchecked( (int)( 0x200000 ) ); - public const int FS_SYMBOL = unchecked( (int)( 0x80000000 ) ); - public const int DEFAULT_GUI_FONT = unchecked( (int)( 17 ) ); + public const int MONO_FONT = unchecked((int)(8)); + public const int JOHAB_CHARSET = unchecked((int)(130)); + public const int HEBREW_CHARSET = unchecked((int)(177)); + public const int ARABIC_CHARSET = unchecked((int)(178)); + public const int GREEK_CHARSET = unchecked((int)(161)); + public const int TURKISH_CHARSET = unchecked((int)(162)); + public const int THAI_CHARSET = unchecked((int)(222)); + public const int EASTEUROPE_CHARSET = unchecked((int)(238)); + public const int RUSSIAN_CHARSET = unchecked((int)(204)); + + public const int MAC_CHARSET = unchecked((int)(77)); + public const int BALTIC_CHARSET = unchecked((int)(186)); + + public const int FS_LATIN1 = unchecked((int)(0x1)); + public const int FS_LATIN2 = unchecked((int)(0x2)); + public const int FS_CYRILLIC = unchecked((int)(0x4)); + public const int FS_GREEK = unchecked((int)(0x8)); + public const int FS_TURKISH = unchecked((int)(0x10)); + public const int FS_HEBREW = unchecked((int)(0x20)); + public const int FS_ARABIC = unchecked((int)(0x40)); + public const int FS_BALTIC = unchecked((int)(0x80)); + public const int FS_THAI = unchecked((int)(0x10000)); + public const int FS_JISJAPAN = unchecked((int)(0x20000)); + public const int FS_CHINESESIMP = unchecked((int)(0x40000)); + public const int FS_WANSUNG = unchecked((int)(0x80000)); + public const int FS_CHINESETRAD = unchecked((int)(0x100000)); + public const int FS_JOHAB = unchecked((int)(0x200000)); + public const int FS_SYMBOL = unchecked((int)(0x80000000)); + public const int DEFAULT_GUI_FONT = unchecked((int)(17)); // current version of specification - public const int DM_RESERVED1 = unchecked( (int)( 0x800000 ) ); - public const int DM_RESERVED2 = unchecked( (int)( 0x1000000 ) ); - public const int DM_ICMMETHOD = unchecked( (int)( 0x2000000 ) ); - public const int DM_ICMINTENT = unchecked( (int)( 0x4000000 ) ); - public const int DM_MEDIATYPE = unchecked( (int)( 0x8000000 ) ); - public const int DM_DITHERTYPE = unchecked( (int)( 0x10000000 ) ); - public const int DMPAPER_ISO_B4 = unchecked( (int)( 42 ) );// B4 (ISO) 250 x 353 mm - public const int DMPAPER_JAPANESE_POSTCARD = unchecked( (int)( 43 ) );// Japanese Postcard 100 x 148 mm - public const int DMPAPER_9X11 = unchecked( (int)( 44 ) );// 9 x 11 in - public const int DMPAPER_10X11 = unchecked( (int)( 45 ) );// 10 x 11 in - public const int DMPAPER_15X11 = unchecked( (int)( 46 ) );// 15 x 11 in - public const int DMPAPER_ENV_INVITE = unchecked( (int)( 47 ) );// Envelope Invite 220 x 220 mm - public const int DMPAPER_RESERVED_48 = unchecked( (int)( 48 ) );// RESERVED--DO NOT USE - public const int DMPAPER_RESERVED_49 = unchecked( (int)( 49 ) );// RESERVED--DO NOT USE - public const int DMPAPER_LETTER_EXTRA = unchecked( (int)( 50 ) );// Letter Extra 9 \275 x 12 in - public const int DMPAPER_LEGAL_EXTRA = unchecked( (int)( 51 ) );// Legal Extra 9 \275 x 15 in - public const int DMPAPER_TABLOID_EXTRA = unchecked( (int)( 52 ) );// Tabloid Extra 11.69 x 18 in - public const int DMPAPER_A4_EXTRA = unchecked( (int)( 53 ) );// A4 Extra 9.27 x 12.69 in - public const int DMPAPER_LETTER_TRANSVERSE = unchecked( (int)( 54 ) );// Letter Transverse 8 \275 x 11 in - public const int DMPAPER_A4_TRANSVERSE = unchecked( (int)( 55 ) );// A4 Transverse 210 x 297 mm - public const int DMPAPER_LETTER_EXTRA_TRANSVERSE = unchecked( (int)( 56 ) );// Letter Extra Transverse 9\275 x 12 in - public const int DMPAPER_A_PLUS = unchecked( (int)( 57 ) );// SuperA/SuperA/A4 227 x 356 mm - public const int DMPAPER_B_PLUS = unchecked( (int)( 58 ) );// SuperB/SuperB/A3 305 x 487 mm - public const int DMPAPER_LETTER_PLUS = unchecked( (int)( 59 ) );// Letter Plus 8.5 x 12.69 in - public const int DMPAPER_A4_PLUS = unchecked( (int)( 60 ) );// A4 Plus 210 x 330 mm - public const int DMPAPER_A5_TRANSVERSE = unchecked( (int)( 61 ) );// A5 Transverse 148 x 210 mm - public const int DMPAPER_B5_TRANSVERSE = unchecked( (int)( 62 ) );// B5 (JIS) Transverse 182 x 257 mm - public const int DMPAPER_A3_EXTRA = unchecked( (int)( 63 ) );// A3 Extra 322 x 445 mm - public const int DMPAPER_A5_EXTRA = unchecked( (int)( 64 ) );// A5 Extra 174 x 235 mm - public const int DMPAPER_B5_EXTRA = unchecked( (int)( 65 ) );// B5 (ISO) Extra 201 x 276 mm - public const int DMPAPER_A2 = unchecked( (int)( 66 ) );// A2 420 x 594 mm - public const int DMPAPER_A3_TRANSVERSE = unchecked( (int)( 67 ) );// A3 Transverse 297 x 420 mm - public const int DMPAPER_A3_EXTRA_TRANSVERSE = unchecked( (int)( 68 ) );// A3 Extra Transverse 322 x 445 mm - public const int DMTT_DOWNLOAD_OUTLINE = unchecked( (int)( 4 ) );// download TT fonts as outline soft fonts + public const int DM_RESERVED1 = unchecked((int)(0x800000)); + public const int DM_RESERVED2 = unchecked((int)(0x1000000)); + public const int DM_ICMMETHOD = unchecked((int)(0x2000000)); + public const int DM_ICMINTENT = unchecked((int)(0x4000000)); + public const int DM_MEDIATYPE = unchecked((int)(0x8000000)); + public const int DM_DITHERTYPE = unchecked((int)(0x10000000)); + public const int DMPAPER_ISO_B4 = unchecked((int)(42));// B4 (ISO) 250 x 353 mm + public const int DMPAPER_JAPANESE_POSTCARD = unchecked((int)(43));// Japanese Postcard 100 x 148 mm + public const int DMPAPER_9X11 = unchecked((int)(44));// 9 x 11 in + public const int DMPAPER_10X11 = unchecked((int)(45));// 10 x 11 in + public const int DMPAPER_15X11 = unchecked((int)(46));// 15 x 11 in + public const int DMPAPER_ENV_INVITE = unchecked((int)(47));// Envelope Invite 220 x 220 mm + public const int DMPAPER_RESERVED_48 = unchecked((int)(48));// RESERVED--DO NOT USE + public const int DMPAPER_RESERVED_49 = unchecked((int)(49));// RESERVED--DO NOT USE + public const int DMPAPER_LETTER_EXTRA = unchecked((int)(50));// Letter Extra 9 \275 x 12 in + public const int DMPAPER_LEGAL_EXTRA = unchecked((int)(51));// Legal Extra 9 \275 x 15 in + public const int DMPAPER_TABLOID_EXTRA = unchecked((int)(52));// Tabloid Extra 11.69 x 18 in + public const int DMPAPER_A4_EXTRA = unchecked((int)(53));// A4 Extra 9.27 x 12.69 in + public const int DMPAPER_LETTER_TRANSVERSE = unchecked((int)(54));// Letter Transverse 8 \275 x 11 in + public const int DMPAPER_A4_TRANSVERSE = unchecked((int)(55));// A4 Transverse 210 x 297 mm + public const int DMPAPER_LETTER_EXTRA_TRANSVERSE = unchecked((int)(56));// Letter Extra Transverse 9\275 x 12 in + public const int DMPAPER_A_PLUS = unchecked((int)(57));// SuperA/SuperA/A4 227 x 356 mm + public const int DMPAPER_B_PLUS = unchecked((int)(58));// SuperB/SuperB/A3 305 x 487 mm + public const int DMPAPER_LETTER_PLUS = unchecked((int)(59));// Letter Plus 8.5 x 12.69 in + public const int DMPAPER_A4_PLUS = unchecked((int)(60));// A4 Plus 210 x 330 mm + public const int DMPAPER_A5_TRANSVERSE = unchecked((int)(61));// A5 Transverse 148 x 210 mm + public const int DMPAPER_B5_TRANSVERSE = unchecked((int)(62));// B5 (JIS) Transverse 182 x 257 mm + public const int DMPAPER_A3_EXTRA = unchecked((int)(63));// A3 Extra 322 x 445 mm + public const int DMPAPER_A5_EXTRA = unchecked((int)(64));// A5 Extra 174 x 235 mm + public const int DMPAPER_B5_EXTRA = unchecked((int)(65));// B5 (ISO) Extra 201 x 276 mm + public const int DMPAPER_A2 = unchecked((int)(66));// A2 420 x 594 mm + public const int DMPAPER_A3_TRANSVERSE = unchecked((int)(67));// A3 Transverse 297 x 420 mm + public const int DMPAPER_A3_EXTRA_TRANSVERSE = unchecked((int)(68));// A3 Extra Transverse 322 x 445 mm + public const int DMTT_DOWNLOAD_OUTLINE = unchecked((int)(4));// download TT fonts as outline soft fonts // ICM methods - public const int DMICMMETHOD_NONE = unchecked( (int)( 1 ) );// ICM disabled - public const int DMICMMETHOD_SYSTEM = unchecked( (int)( 2 ) );// ICM handled by system - public const int DMICMMETHOD_DRIVER = unchecked( (int)( 3 ) );// ICM handled by driver - public const int DMICMMETHOD_DEVICE = unchecked( (int)( 4 ) );// ICM handled by device - public const int DMICMMETHOD_USER = unchecked( (int)( 256 ) );// Device-specific methods start here + public const int DMICMMETHOD_NONE = unchecked((int)(1));// ICM disabled + public const int DMICMMETHOD_SYSTEM = unchecked((int)(2));// ICM handled by system + public const int DMICMMETHOD_DRIVER = unchecked((int)(3));// ICM handled by driver + public const int DMICMMETHOD_DEVICE = unchecked((int)(4));// ICM handled by device + public const int DMICMMETHOD_USER = unchecked((int)(256));// Device-specific methods start here // ICM Intents - public const int DMICM_SATURATE = unchecked( (int)( 1 ) );// Maximize color saturation - public const int DMICM_CONTRAST = unchecked( (int)( 2 ) );// Maximize color contrast - public const int DMICM_COLORMETRIC = unchecked( (int)( 3 ) );// Use specific color metric - public const int DMICM_USER = unchecked( (int)( 256 ) );// Device-specific intents start here + public const int DMICM_SATURATE = unchecked((int)(1));// Maximize color saturation + public const int DMICM_CONTRAST = unchecked((int)(2));// Maximize color contrast + public const int DMICM_COLORMETRIC = unchecked((int)(3));// Use specific color metric + public const int DMICM_USER = unchecked((int)(256));// Device-specific intents start here // Media types - public const int DMMEDIA_STANDARD = unchecked( (int)( 1 ) );// Standard paper - public const int DMMEDIA_GLOSSY = unchecked( (int)( 2 ) );// Glossy paper - public const int DMMEDIA_TRANSPARENCY = unchecked( (int)( 3 ) );// Transparency + public const int DMMEDIA_STANDARD = unchecked((int)(1));// Standard paper + public const int DMMEDIA_GLOSSY = unchecked((int)(2));// Glossy paper + public const int DMMEDIA_TRANSPARENCY = unchecked((int)(3));// Transparency - public const int DMMEDIA_USER = unchecked( (int)( 256 ) );// Device-specific media start here + public const int DMMEDIA_USER = unchecked((int)(256));// Device-specific media start here // Dither types - public const int DMDITHER_NONE = unchecked( (int)( 1 ) );// No dithering - public const int DMDITHER_COARSE = unchecked( (int)( 2 ) );// Dither with a coarse brush - public const int DMDITHER_FINE = unchecked( (int)( 3 ) );// Dither with a fine brush - public const int DMDITHER_LINEART = unchecked( (int)( 4 ) );// LineArt dithering - public const int DMDITHER_GRAYSCALE = unchecked( (int)( 5 ) );// Device does grayscaling - public const int DMDITHER_USER = unchecked( (int)( 256 ) );// Device-specific dithers start here - public const int GGO_GRAY2_BITMAP = unchecked( (int)( 4 ) ); - public const int GGO_GRAY4_BITMAP = unchecked( (int)( 5 ) ); - public const int GGO_GRAY8_BITMAP = unchecked( (int)( 6 ) ); - public const int GGO_GLYPH_INDEX = unchecked( (int)( 0x80 ) ); - public const int GCP_DBCS = unchecked( (int)( 0x1 ) ); - public const int GCP_REORDER = unchecked( (int)( 0x2 ) ); - public const int GCP_USEKERNING = unchecked( (int)( 0x8 ) ); - public const int GCP_GLYPHSHAPE = unchecked( (int)( 0x10 ) ); - public const int GCP_LIGATE = unchecked( (int)( 0x20 ) ); - public const int GCP_DIACRITIC = unchecked( (int)( 0x100 ) ); - public const int GCP_KASHIDA = unchecked( (int)( 0x400 ) ); - public const int GCP_ERROR = unchecked( (int)( 0x8000 ) ); - public const int FLI_MASK = unchecked( (int)( 0x103B ) ); - public const int GCP_JUSTIFY = unchecked( (int)( 0x10000 ) ); - public const int GCP_NODIACRITICS = unchecked( (int)( 0x20000 ) ); - public const int FLI_GLYPHS = unchecked( (int)( 0x40000 ) ); - public const int GCP_CLASSIN = unchecked( (int)( 0x80000 ) ); - public const int GCP_MAXEXTENT = unchecked( (int)( 0x100000 ) ); - public const int GCP_JUSTIFYIN = unchecked( (int)( 0x200000 ) ); - public const int GCP_DISPLAYZWG = unchecked( (int)( 0x400000 ) ); - public const int GCP_SYMSWAPOFF = unchecked( (int)( 0x800000 ) ); - public const int GCP_NUMERICOVERRIDE = unchecked( (int)( 0x1000000 ) ); - public const int GCP_NEUTRALOVERRIDE = unchecked( (int)( 0x2000000 ) ); - public const int GCP_NUMERICSLATIN = unchecked( (int)( 0x4000000 ) ); - public const int GCP_NUMERICSLOCAL = unchecked( (int)( 0x8000000 ) ); - public const int GCPCLASS_LATIN = unchecked( (int)( 1 ) ); - public const int GCPCLASS_HEBREW = unchecked( (int)( 2 ) ); - public const int GCPCLASS_ARABIC = unchecked( (int)( 2 ) ); - public const int GCPCLASS_NEUTRAL = unchecked( (int)( 3 ) ); - public const int GCPCLASS_LOCALNUMBER = unchecked( (int)( 4 ) ); - public const int GCPCLASS_LATINNUMBER = unchecked( (int)( 5 ) ); - public const int GCPCLASS_LATINNUMERICTERMINATOR = unchecked( (int)( 6 ) ); - public const int GCPCLASS_LATINNUMERICSEPARATOR = unchecked( (int)( 7 ) ); - public const int GCPCLASS_NUMERICSEPARATOR = unchecked( (int)( 8 ) ); - public const int GCPCLASS_PREBOUNDRTL = unchecked( (int)( 0x80 ) ); - public const int GCPCLASS_PREBOUNDLTR = unchecked( (int)( 0x40 ) ); - - - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int DMDITHER_NONE = unchecked((int)(1));// No dithering + public const int DMDITHER_COARSE = unchecked((int)(2));// Dither with a coarse brush + public const int DMDITHER_FINE = unchecked((int)(3));// Dither with a fine brush + public const int DMDITHER_LINEART = unchecked((int)(4));// LineArt dithering + public const int DMDITHER_GRAYSCALE = unchecked((int)(5));// Device does grayscaling + public const int DMDITHER_USER = unchecked((int)(256));// Device-specific dithers start here + public const int GGO_GRAY2_BITMAP = unchecked((int)(4)); + public const int GGO_GRAY4_BITMAP = unchecked((int)(5)); + public const int GGO_GRAY8_BITMAP = unchecked((int)(6)); + public const int GGO_GLYPH_INDEX = unchecked((int)(0x80)); + public const int GCP_DBCS = unchecked((int)(0x1)); + public const int GCP_REORDER = unchecked((int)(0x2)); + public const int GCP_USEKERNING = unchecked((int)(0x8)); + public const int GCP_GLYPHSHAPE = unchecked((int)(0x10)); + public const int GCP_LIGATE = unchecked((int)(0x20)); + public const int GCP_DIACRITIC = unchecked((int)(0x100)); + public const int GCP_KASHIDA = unchecked((int)(0x400)); + public const int GCP_ERROR = unchecked((int)(0x8000)); + public const int FLI_MASK = unchecked((int)(0x103B)); + public const int GCP_JUSTIFY = unchecked((int)(0x10000)); + public const int GCP_NODIACRITICS = unchecked((int)(0x20000)); + public const int FLI_GLYPHS = unchecked((int)(0x40000)); + public const int GCP_CLASSIN = unchecked((int)(0x80000)); + public const int GCP_MAXEXTENT = unchecked((int)(0x100000)); + public const int GCP_JUSTIFYIN = unchecked((int)(0x200000)); + public const int GCP_DISPLAYZWG = unchecked((int)(0x400000)); + public const int GCP_SYMSWAPOFF = unchecked((int)(0x800000)); + public const int GCP_NUMERICOVERRIDE = unchecked((int)(0x1000000)); + public const int GCP_NEUTRALOVERRIDE = unchecked((int)(0x2000000)); + public const int GCP_NUMERICSLATIN = unchecked((int)(0x4000000)); + public const int GCP_NUMERICSLOCAL = unchecked((int)(0x8000000)); + public const int GCPCLASS_LATIN = unchecked((int)(1)); + public const int GCPCLASS_HEBREW = unchecked((int)(2)); + public const int GCPCLASS_ARABIC = unchecked((int)(2)); + public const int GCPCLASS_NEUTRAL = unchecked((int)(3)); + public const int GCPCLASS_LOCALNUMBER = unchecked((int)(4)); + public const int GCPCLASS_LATINNUMBER = unchecked((int)(5)); + public const int GCPCLASS_LATINNUMERICTERMINATOR = unchecked((int)(6)); + public const int GCPCLASS_LATINNUMERICSEPARATOR = unchecked((int)(7)); + public const int GCPCLASS_NUMERICSEPARATOR = unchecked((int)(8)); + public const int GCPCLASS_PREBOUNDRTL = unchecked((int)(0x80)); + public const int GCPCLASS_PREBOUNDLTR = unchecked((int)(0x40)); + + + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct GCP_RESULTS { public int lStructSize; @@ -7491,51 +7491,51 @@ public struct GCP_RESULTS public int nMaxFit; } - public const int DC_BINADJUST = unchecked( (int)( 19 ) ); - public const int DC_EMF_COMPLIANT = unchecked( (int)( 20 ) ); - public const int DC_DATATYPE_PRODUCED = unchecked( (int)( 21 ) ); - public const int DC_COLLATE = unchecked( (int)( 22 ) ); + public const int DC_BINADJUST = unchecked((int)(19)); + public const int DC_EMF_COMPLIANT = unchecked((int)(20)); + public const int DC_DATATYPE_PRODUCED = unchecked((int)(21)); + public const int DC_COLLATE = unchecked((int)(22)); - public const int DCTT_DOWNLOAD_OUTLINE = unchecked( (int)( 0x8 ) ); + public const int DCTT_DOWNLOAD_OUTLINE = unchecked((int)(0x8)); // return values for DC_BINADJUST - public const int DCBA_FACEUPNONE = unchecked( (int)( 0x0 ) ); - public const int DCBA_FACEUPCENTER = unchecked( (int)( 0x1 ) ); - public const int DCBA_FACEUPLEFT = unchecked( (int)( 0x2 ) ); - public const int DCBA_FACEUPRIGHT = unchecked( (int)( 0x3 ) ); - public const int DCBA_FACEDOWNNONE = unchecked( (int)( 0x100 ) ); - public const int DCBA_FACEDOWNCENTER = unchecked( (int)( 0x101 ) ); - public const int DCBA_FACEDOWNLEFT = unchecked( (int)( 0x102 ) ); - public const int DCBA_FACEDOWNRIGHT = unchecked( (int)( 0x103 ) ); + public const int DCBA_FACEUPNONE = unchecked((int)(0x0)); + public const int DCBA_FACEUPCENTER = unchecked((int)(0x1)); + public const int DCBA_FACEUPLEFT = unchecked((int)(0x2)); + public const int DCBA_FACEUPRIGHT = unchecked((int)(0x3)); + public const int DCBA_FACEDOWNNONE = unchecked((int)(0x100)); + public const int DCBA_FACEDOWNCENTER = unchecked((int)(0x101)); + public const int DCBA_FACEDOWNLEFT = unchecked((int)(0x102)); + public const int DCBA_FACEDOWNRIGHT = unchecked((int)(0x103)); - [DllImport( "gdi32", EntryPoint = "EnumFontFamilies", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumFontFamilies( IntPtr hdc, string lpszFamily, IntPtr lpEnumFontFamProc, int lParam ); + [DllImport("gdi32", EntryPoint = "EnumFontFamilies", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumFontFamilies(IntPtr hdc, string lpszFamily, IntPtr lpEnumFontFamProc, int lParam); - [DllImport( "gdi32", EntryPoint = "EnumFontFamiliesEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumFontFamiliesEx( IntPtr hdc, ref LOGFONT lpLogFont, IntPtr lpEnumFontProc, int lParam, int dw ); + [DllImport("gdi32", EntryPoint = "EnumFontFamiliesEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumFontFamiliesEx(IntPtr hdc, ref LOGFONT lpLogFont, IntPtr lpEnumFontProc, int lParam, int dw); - [DllImport( "gdi32", EntryPoint = "GetTextCharset", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTextCharset( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "GetTextCharset", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTextCharset(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "GetTextCharsetInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTextCharsetInfo( IntPtr hdc, ref FONTSIGNATURE lpSig, int dwFlags ); + [DllImport("gdi32", EntryPoint = "GetTextCharsetInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTextCharsetInfo(IntPtr hdc, ref FONTSIGNATURE lpSig, int dwFlags); - [DllImport( "gdi32", EntryPoint = "TranslateCharsetInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int TranslateCharsetInfo( IntPtr lpSrc, ref CHARSETINFO lpcs, int dwFlags ); + [DllImport("gdi32", EntryPoint = "TranslateCharsetInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int TranslateCharsetInfo(IntPtr lpSrc, ref CHARSETINFO lpcs, int dwFlags); - [DllImport( "gdi32", EntryPoint = "GetFontLanguageInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetFontLanguageInfo( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "GetFontLanguageInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetFontLanguageInfo(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "GetCharacterPlacement", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCharacterPlacement( IntPtr hdc, string lpsz, int n1, int n2, ref GCP_RESULTS lpGcpResults, int dw ); + [DllImport("gdi32", EntryPoint = "GetCharacterPlacement", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCharacterPlacement(IntPtr hdc, string lpsz, int n1, int n2, ref GCP_RESULTS lpGcpResults, int dw); - public const int ICM_OFF = unchecked( (int)( 1 ) ); - public const int ICM_ON = unchecked( (int)( 2 ) ); - public const int ICM_QUERY = unchecked( (int)( 3 ) ); + public const int ICM_OFF = unchecked((int)(1)); + public const int ICM_ON = unchecked((int)(2)); + public const int ICM_QUERY = unchecked((int)(3)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CIEXYZ { public int ciexyzX; @@ -7543,7 +7543,7 @@ public struct CIEXYZ public int ciexyzZ; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CIEXYZTRIPLE { public CIEXYZ ciexyzRed; @@ -7551,7 +7551,7 @@ public struct CIEXYZTRIPLE public CIEXYZ ciexyBlue; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct LOGCOLORSPACE { public int lcsSignature; @@ -7563,66 +7563,66 @@ public struct LOGCOLORSPACE public int lcsGammaRed; public int lcsGammaGreen; public int lcsGammaBlue; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = MAX_PATH )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAX_PATH)] public string lcsFileName; } - [DllImport( "gdi32", EntryPoint = "SetICMMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetICMMode( IntPtr hdc, int n ); + [DllImport("gdi32", EntryPoint = "SetICMMode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetICMMode(IntPtr hdc, int n); - [DllImport( "gdi32", EntryPoint = "CheckColorsInGamut", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CheckColorsInGamut( IntPtr hdc, IntPtr lpv, IntPtr lpv2, int dw ); + [DllImport("gdi32", EntryPoint = "CheckColorsInGamut", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CheckColorsInGamut(IntPtr hdc, IntPtr lpv, IntPtr lpv2, int dw); - [DllImport( "gdi32", EntryPoint = "GetLogColorSpace", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetLogColorSpace( IntPtr hcolorspace, LOGCOLORSPACE lplogcolorspace, int dw ); + [DllImport("gdi32", EntryPoint = "GetLogColorSpace", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetLogColorSpace(IntPtr hcolorspace, LOGCOLORSPACE lplogcolorspace, int dw); - [DllImport( "gdi32", EntryPoint = "GetColorSpace", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetColorSpace( IntPtr hdc ); + [DllImport("gdi32", EntryPoint = "GetColorSpace", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetColorSpace(IntPtr hdc); - [DllImport( "gdi32", EntryPoint = "CreateColorSpace", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateColorSpace( ref LOGCOLORSPACE lplogcolorspace ); + [DllImport("gdi32", EntryPoint = "CreateColorSpace", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateColorSpace(ref LOGCOLORSPACE lplogcolorspace); - [DllImport( "gdi32", EntryPoint = "SetColorSpace", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetColorSpace( IntPtr hdc, IntPtr hcolorspace ); + [DllImport("gdi32", EntryPoint = "SetColorSpace", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetColorSpace(IntPtr hdc, IntPtr hcolorspace); - [DllImport( "gdi32", EntryPoint = "DeleteColorSpace", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeleteColorSpace( IntPtr hcolorspace ); + [DllImport("gdi32", EntryPoint = "DeleteColorSpace", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeleteColorSpace(IntPtr hcolorspace); - [DllImport( "gdi32", EntryPoint = "GetICMProfile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetICMProfile( IntPtr hdc, int dw, string lpStr ); + [DllImport("gdi32", EntryPoint = "GetICMProfile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetICMProfile(IntPtr hdc, int dw, string lpStr); - [DllImport( "gdi32", EntryPoint = "SetICMProfile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetICMProfile( IntPtr hdc, string lpStr ); + [DllImport("gdi32", EntryPoint = "SetICMProfile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetICMProfile(IntPtr hdc, string lpStr); - [DllImport( "gdi32", EntryPoint = "GetDeviceGammaRamp", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetDeviceGammaRamp( IntPtr hdc, IntPtr lpv ); + [DllImport("gdi32", EntryPoint = "GetDeviceGammaRamp", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetDeviceGammaRamp(IntPtr hdc, IntPtr lpv); - [DllImport( "gdi32", EntryPoint = "SetDeviceGammaRamp", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetDeviceGammaRamp( IntPtr hdc, IntPtr lpv ); + [DllImport("gdi32", EntryPoint = "SetDeviceGammaRamp", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetDeviceGammaRamp(IntPtr hdc, IntPtr lpv); - [DllImport( "gdi32", EntryPoint = "ColorMatchToTarget", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ColorMatchToTarget( IntPtr hdc, IntPtr hdc2, int dw ); + [DllImport("gdi32", EntryPoint = "ColorMatchToTarget", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ColorMatchToTarget(IntPtr hdc, IntPtr hdc2, int dw); - [DllImport( "gdi32", EntryPoint = "EnumICMProfiles", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumICMProfiles( IntPtr hdc, int icmEnumProc, int lParam ); + [DllImport("gdi32", EntryPoint = "EnumICMProfiles", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumICMProfiles(IntPtr hdc, int icmEnumProc, int lParam); - public const int EMR_SETICMMODE = unchecked( (int)( 98 ) ); - public const int EMR_CREATECOLORSPACE = unchecked( (int)( 99 ) ); - public const int EMR_SETCOLORSPACE = unchecked( (int)( 100 ) ); - public const int EMR_DELETECOLORSPACE = unchecked( (int)( 101 ) ); + public const int EMR_SETICMMODE = unchecked((int)(98)); + public const int EMR_CREATECOLORSPACE = unchecked((int)(99)); + public const int EMR_SETCOLORSPACE = unchecked((int)(100)); + public const int EMR_DELETECOLORSPACE = unchecked((int)(101)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRSELECTCOLORSPACE { public EMR pEmr; public int ihCS;// ColorSpace handle index } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EMRCREATECOLORSPACE { public EMR pEmr; @@ -7636,211 +7636,211 @@ public struct EMRCREATECOLORSPACE // -------------- // Scroll Bar Constants - public const int SB_HORZ = unchecked( (int)( 0 ) ); - public const int SB_VERT = unchecked( (int)( 1 ) ); - public const int SB_CTL = unchecked( (int)( 2 ) ); - public const int SB_BOTH = unchecked( (int)( 3 ) ); + public const int SB_HORZ = unchecked((int)(0)); + public const int SB_VERT = unchecked((int)(1)); + public const int SB_CTL = unchecked((int)(2)); + public const int SB_BOTH = unchecked((int)(3)); // Scroll Bar Commands - public const int SB_LINEUP = unchecked( (int)( 0 ) ); - public const int SB_LINELEFT = unchecked( (int)( 0 ) ); - public const int SB_LINEDOWN = unchecked( (int)( 1 ) ); - public const int SB_LINERIGHT = unchecked( (int)( 1 ) ); - public const int SB_PAGEUP = unchecked( (int)( 2 ) ); - public const int SB_PAGELEFT = unchecked( (int)( 2 ) ); - public const int SB_PAGEDOWN = unchecked( (int)( 3 ) ); - public const int SB_PAGERIGHT = unchecked( (int)( 3 ) ); - public const int SB_THUMBPOSITION = unchecked( (int)( 4 ) ); - public const int SB_THUMBTRACK = unchecked( (int)( 5 ) ); - public const int SB_TOP = unchecked( (int)( 6 ) ); - public const int SB_LEFT = unchecked( (int)( 6 ) ); - public const int SB_BOTTOM = unchecked( (int)( 7 ) ); - public const int SB_RIGHT = unchecked( (int)( 7 ) ); - public const int SB_ENDSCROLL = unchecked( (int)( 8 ) ); + public const int SB_LINEUP = unchecked((int)(0)); + public const int SB_LINELEFT = unchecked((int)(0)); + public const int SB_LINEDOWN = unchecked((int)(1)); + public const int SB_LINERIGHT = unchecked((int)(1)); + public const int SB_PAGEUP = unchecked((int)(2)); + public const int SB_PAGELEFT = unchecked((int)(2)); + public const int SB_PAGEDOWN = unchecked((int)(3)); + public const int SB_PAGERIGHT = unchecked((int)(3)); + public const int SB_THUMBPOSITION = unchecked((int)(4)); + public const int SB_THUMBTRACK = unchecked((int)(5)); + public const int SB_TOP = unchecked((int)(6)); + public const int SB_LEFT = unchecked((int)(6)); + public const int SB_BOTTOM = unchecked((int)(7)); + public const int SB_RIGHT = unchecked((int)(7)); + public const int SB_ENDSCROLL = unchecked((int)(8)); // ShowWindow() Commands - public const int SW_HIDE = unchecked( (int)( 0 ) ); - public const int SW_SHOWNORMAL = unchecked( (int)( 1 ) ); - public const int SW_NORMAL = unchecked( (int)( 1 ) ); - public const int SW_SHOWMINIMIZED = unchecked( (int)( 2 ) ); - public const int SW_SHOWMAXIMIZED = unchecked( (int)( 3 ) ); - public const int SW_MAXIMIZE = unchecked( (int)( 3 ) ); - public const int SW_SHOWNOACTIVATE = unchecked( (int)( 4 ) ); - public const int SW_SHOW = unchecked( (int)( 5 ) ); - public const int SW_MINIMIZE = unchecked( (int)( 6 ) ); - public const int SW_SHOWMINNOACTIVE = unchecked( (int)( 7 ) ); - public const int SW_SHOWNA = unchecked( (int)( 8 ) ); - public const int SW_RESTORE = unchecked( (int)( 9 ) ); - public const int SW_SHOWDEFAULT = unchecked( (int)( 10 ) ); - public const int SW_MAX = unchecked( (int)( 10 ) ); + public const int SW_HIDE = unchecked((int)(0)); + public const int SW_SHOWNORMAL = unchecked((int)(1)); + public const int SW_NORMAL = unchecked((int)(1)); + public const int SW_SHOWMINIMIZED = unchecked((int)(2)); + public const int SW_SHOWMAXIMIZED = unchecked((int)(3)); + public const int SW_MAXIMIZE = unchecked((int)(3)); + public const int SW_SHOWNOACTIVATE = unchecked((int)(4)); + public const int SW_SHOW = unchecked((int)(5)); + public const int SW_MINIMIZE = unchecked((int)(6)); + public const int SW_SHOWMINNOACTIVE = unchecked((int)(7)); + public const int SW_SHOWNA = unchecked((int)(8)); + public const int SW_RESTORE = unchecked((int)(9)); + public const int SW_SHOWDEFAULT = unchecked((int)(10)); + public const int SW_MAX = unchecked((int)(10)); // Old ShowWindow() Commands - public const int HIDE_WINDOW = unchecked( (int)( 0 ) ); - public const int SHOW_OPENWINDOW = unchecked( (int)( 1 ) ); - public const int SHOW_ICONWINDOW = unchecked( (int)( 2 ) ); - public const int SHOW_FULLSCREEN = unchecked( (int)( 3 ) ); - public const int SHOW_OPENNOACTIVATE = unchecked( (int)( 4 ) ); + public const int HIDE_WINDOW = unchecked((int)(0)); + public const int SHOW_OPENWINDOW = unchecked((int)(1)); + public const int SHOW_ICONWINDOW = unchecked((int)(2)); + public const int SHOW_FULLSCREEN = unchecked((int)(3)); + public const int SHOW_OPENNOACTIVATE = unchecked((int)(4)); // Identifiers for the WM_SHOWWINDOW message - public const int SW_PARENTCLOSING = unchecked( (int)( 1 ) ); - public const int SW_OTHERZOOM = unchecked( (int)( 2 ) ); - public const int SW_PARENTOPENING = unchecked( (int)( 3 ) ); - public const int SW_OTHERUNZOOM = unchecked( (int)( 4 ) ); + public const int SW_PARENTCLOSING = unchecked((int)(1)); + public const int SW_OTHERZOOM = unchecked((int)(2)); + public const int SW_PARENTOPENING = unchecked((int)(3)); + public const int SW_OTHERUNZOOM = unchecked((int)(4)); // WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags - public const int KF_EXTENDED = unchecked( (int)( 0x100 ) ); - public const int KF_DLGMODE = unchecked( (int)( 0x800 ) ); - public const int KF_MENUMODE = unchecked( (int)( 0x1000 ) ); - public const int KF_ALTDOWN = unchecked( (int)( 0x2000 ) ); - public const int KF_REPEAT = unchecked( (int)( 0x4000 ) ); - public const int KF_UP = unchecked( (int)( 0x8000 ) ); + public const int KF_EXTENDED = unchecked((int)(0x100)); + public const int KF_DLGMODE = unchecked((int)(0x800)); + public const int KF_MENUMODE = unchecked((int)(0x1000)); + public const int KF_ALTDOWN = unchecked((int)(0x2000)); + public const int KF_REPEAT = unchecked((int)(0x4000)); + public const int KF_UP = unchecked((int)(0x8000)); // Virtual Keys, Standard Set - public const int VK_LBUTTON = unchecked( (int)( 0x1 ) ); - public const int VK_RBUTTON = unchecked( (int)( 0x2 ) ); - public const int VK_CANCEL = unchecked( (int)( 0x3 ) ); - public const int VK_MBUTTON = unchecked( (int)( 0x4 ) );// NOT contiguous with L RBUTTON - - public const int VK_BACK = unchecked( (int)( 0x8 ) ); - public const int VK_TAB = unchecked( (int)( 0x9 ) ); - - public const int VK_CLEAR = unchecked( (int)( 0xC ) ); - public const int VK_RETURN = unchecked( (int)( 0xD ) ); - - public const int VK_SHIFT = unchecked( (int)( 0x10 ) ); - public const int VK_CONTROL = unchecked( (int)( 0x11 ) ); - public const int VK_MENU = unchecked( (int)( 0x12 ) ); - public const int VK_PAUSE = unchecked( (int)( 0x13 ) ); - public const int VK_CAPITAL = unchecked( (int)( 0x14 ) ); - - public const int VK_ESCAPE = unchecked( (int)( 0x1B ) ); - - public const int VK_SPACE = unchecked( (int)( 0x20 ) ); - public const int VK_PRIOR = unchecked( (int)( 0x21 ) ); - public const int VK_NEXT = unchecked( (int)( 0x22 ) ); - public const int VK_END = unchecked( (int)( 0x23 ) ); - public const int VK_HOME = unchecked( (int)( 0x24 ) ); - public const int VK_LEFT = unchecked( (int)( 0x25 ) ); - public const int VK_UP = unchecked( (int)( 0x26 ) ); - public const int VK_RIGHT = unchecked( (int)( 0x27 ) ); - public const int VK_DOWN = unchecked( (int)( 0x28 ) ); - public const int VK_SELECT = unchecked( (int)( 0x29 ) ); - public const int VK_PRINT = unchecked( (int)( 0x2A ) ); - public const int VK_EXECUTE = unchecked( (int)( 0x2B ) ); - public const int VK_SNAPSHOT = unchecked( (int)( 0x2C ) ); - public const int VK_INSERT = unchecked( (int)( 0x2D ) ); - public const int VK_DELETE = unchecked( (int)( 0x2E ) ); - public const int VK_HELP = unchecked( (int)( 0x2F ) ); + public const int VK_LBUTTON = unchecked((int)(0x1)); + public const int VK_RBUTTON = unchecked((int)(0x2)); + public const int VK_CANCEL = unchecked((int)(0x3)); + public const int VK_MBUTTON = unchecked((int)(0x4));// NOT contiguous with L RBUTTON + + public const int VK_BACK = unchecked((int)(0x8)); + public const int VK_TAB = unchecked((int)(0x9)); + + public const int VK_CLEAR = unchecked((int)(0xC)); + public const int VK_RETURN = unchecked((int)(0xD)); + + public const int VK_SHIFT = unchecked((int)(0x10)); + public const int VK_CONTROL = unchecked((int)(0x11)); + public const int VK_MENU = unchecked((int)(0x12)); + public const int VK_PAUSE = unchecked((int)(0x13)); + public const int VK_CAPITAL = unchecked((int)(0x14)); + + public const int VK_ESCAPE = unchecked((int)(0x1B)); + + public const int VK_SPACE = unchecked((int)(0x20)); + public const int VK_PRIOR = unchecked((int)(0x21)); + public const int VK_NEXT = unchecked((int)(0x22)); + public const int VK_END = unchecked((int)(0x23)); + public const int VK_HOME = unchecked((int)(0x24)); + public const int VK_LEFT = unchecked((int)(0x25)); + public const int VK_UP = unchecked((int)(0x26)); + public const int VK_RIGHT = unchecked((int)(0x27)); + public const int VK_DOWN = unchecked((int)(0x28)); + public const int VK_SELECT = unchecked((int)(0x29)); + public const int VK_PRINT = unchecked((int)(0x2A)); + public const int VK_EXECUTE = unchecked((int)(0x2B)); + public const int VK_SNAPSHOT = unchecked((int)(0x2C)); + public const int VK_INSERT = unchecked((int)(0x2D)); + public const int VK_DELETE = unchecked((int)(0x2E)); + public const int VK_HELP = unchecked((int)(0x2F)); // VK_A thru VK_Z are the same as their ASCII equivalents: 'A' thru 'Z' // VK_0 thru VK_9 are the same as their ASCII equivalents: '0' thru '9' - public const int VK_NUMPAD0 = unchecked( (int)( 0x60 ) ); - public const int VK_NUMPAD1 = unchecked( (int)( 0x61 ) ); - public const int VK_NUMPAD2 = unchecked( (int)( 0x62 ) ); - public const int VK_NUMPAD3 = unchecked( (int)( 0x63 ) ); - public const int VK_NUMPAD4 = unchecked( (int)( 0x64 ) ); - public const int VK_NUMPAD5 = unchecked( (int)( 0x65 ) ); - public const int VK_NUMPAD6 = unchecked( (int)( 0x66 ) ); - public const int VK_NUMPAD7 = unchecked( (int)( 0x67 ) ); - public const int VK_NUMPAD8 = unchecked( (int)( 0x68 ) ); - public const int VK_NUMPAD9 = unchecked( (int)( 0x69 ) ); - public const int VK_MULTIPLY = unchecked( (int)( 0x6A ) ); - public const int VK_ADD = unchecked( (int)( 0x6B ) ); - public const int VK_SEPARATOR = unchecked( (int)( 0x6C ) ); - public const int VK_SUBTRACT = unchecked( (int)( 0x6D ) ); - public const int VK_DECIMAL = unchecked( (int)( 0x6E ) ); - public const int VK_DIVIDE = unchecked( (int)( 0x6F ) ); - public const int VK_F1 = unchecked( (int)( 0x70 ) ); - public const int VK_F2 = unchecked( (int)( 0x71 ) ); - public const int VK_F3 = unchecked( (int)( 0x72 ) ); - public const int VK_F4 = unchecked( (int)( 0x73 ) ); - public const int VK_F5 = unchecked( (int)( 0x74 ) ); - public const int VK_F6 = unchecked( (int)( 0x75 ) ); - public const int VK_F7 = unchecked( (int)( 0x76 ) ); - public const int VK_F8 = unchecked( (int)( 0x77 ) ); - public const int VK_F9 = unchecked( (int)( 0x78 ) ); - public const int VK_F10 = unchecked( (int)( 0x79 ) ); - public const int VK_F11 = unchecked( (int)( 0x7A ) ); - public const int VK_F12 = unchecked( (int)( 0x7B ) ); - public const int VK_F13 = unchecked( (int)( 0x7C ) ); - public const int VK_F14 = unchecked( (int)( 0x7D ) ); - public const int VK_F15 = unchecked( (int)( 0x7E ) ); - public const int VK_F16 = unchecked( (int)( 0x7F ) ); - public const int VK_F17 = unchecked( (int)( 0x80 ) ); - public const int VK_F18 = unchecked( (int)( 0x81 ) ); - public const int VK_F19 = unchecked( (int)( 0x82 ) ); - public const int VK_F20 = unchecked( (int)( 0x83 ) ); - public const int VK_F21 = unchecked( (int)( 0x84 ) ); - public const int VK_F22 = unchecked( (int)( 0x85 ) ); - public const int VK_F23 = unchecked( (int)( 0x86 ) ); - public const int VK_F24 = unchecked( (int)( 0x87 ) ); - - public const int VK_NUMLOCK = unchecked( (int)( 0x90 ) ); - public const int VK_SCROLL = unchecked( (int)( 0x91 ) ); + public const int VK_NUMPAD0 = unchecked((int)(0x60)); + public const int VK_NUMPAD1 = unchecked((int)(0x61)); + public const int VK_NUMPAD2 = unchecked((int)(0x62)); + public const int VK_NUMPAD3 = unchecked((int)(0x63)); + public const int VK_NUMPAD4 = unchecked((int)(0x64)); + public const int VK_NUMPAD5 = unchecked((int)(0x65)); + public const int VK_NUMPAD6 = unchecked((int)(0x66)); + public const int VK_NUMPAD7 = unchecked((int)(0x67)); + public const int VK_NUMPAD8 = unchecked((int)(0x68)); + public const int VK_NUMPAD9 = unchecked((int)(0x69)); + public const int VK_MULTIPLY = unchecked((int)(0x6A)); + public const int VK_ADD = unchecked((int)(0x6B)); + public const int VK_SEPARATOR = unchecked((int)(0x6C)); + public const int VK_SUBTRACT = unchecked((int)(0x6D)); + public const int VK_DECIMAL = unchecked((int)(0x6E)); + public const int VK_DIVIDE = unchecked((int)(0x6F)); + public const int VK_F1 = unchecked((int)(0x70)); + public const int VK_F2 = unchecked((int)(0x71)); + public const int VK_F3 = unchecked((int)(0x72)); + public const int VK_F4 = unchecked((int)(0x73)); + public const int VK_F5 = unchecked((int)(0x74)); + public const int VK_F6 = unchecked((int)(0x75)); + public const int VK_F7 = unchecked((int)(0x76)); + public const int VK_F8 = unchecked((int)(0x77)); + public const int VK_F9 = unchecked((int)(0x78)); + public const int VK_F10 = unchecked((int)(0x79)); + public const int VK_F11 = unchecked((int)(0x7A)); + public const int VK_F12 = unchecked((int)(0x7B)); + public const int VK_F13 = unchecked((int)(0x7C)); + public const int VK_F14 = unchecked((int)(0x7D)); + public const int VK_F15 = unchecked((int)(0x7E)); + public const int VK_F16 = unchecked((int)(0x7F)); + public const int VK_F17 = unchecked((int)(0x80)); + public const int VK_F18 = unchecked((int)(0x81)); + public const int VK_F19 = unchecked((int)(0x82)); + public const int VK_F20 = unchecked((int)(0x83)); + public const int VK_F21 = unchecked((int)(0x84)); + public const int VK_F22 = unchecked((int)(0x85)); + public const int VK_F23 = unchecked((int)(0x86)); + public const int VK_F24 = unchecked((int)(0x87)); + + public const int VK_NUMLOCK = unchecked((int)(0x90)); + public const int VK_SCROLL = unchecked((int)(0x91)); // // VK_L VK_R - left and right Alt, Ctrl and Shift virtual keys. // Used only as parameters to GetAsyncKeyState() and GetKeyState(). // No other API or message will distinguish left and right keys in this way. // / - public const int VK_LSHIFT = unchecked( (int)( 0xA0 ) ); - public const int VK_RSHIFT = unchecked( (int)( 0xA1 ) ); - public const int VK_LCONTROL = unchecked( (int)( 0xA2 ) ); - public const int VK_RCONTROL = unchecked( (int)( 0xA3 ) ); - public const int VK_LMENU = unchecked( (int)( 0xA4 ) ); - public const int VK_RMENU = unchecked( (int)( 0xA5 ) ); - - public const int VK_ATTN = unchecked( (int)( 0xF6 ) ); - public const int VK_CRSEL = unchecked( (int)( 0xF7 ) ); - public const int VK_EXSEL = unchecked( (int)( 0xF8 ) ); - public const int VK_EREOF = unchecked( (int)( 0xF9 ) ); - public const int VK_PLAY = unchecked( (int)( 0xFA ) ); - public const int VK_ZOOM = unchecked( (int)( 0xFB ) ); - public const int VK_NONAME = unchecked( (int)( 0xFC ) ); - public const int VK_PA1 = unchecked( (int)( 0xFD ) ); - public const int VK_OEM_CLEAR = unchecked( (int)( 0xFE ) ); + public const int VK_LSHIFT = unchecked((int)(0xA0)); + public const int VK_RSHIFT = unchecked((int)(0xA1)); + public const int VK_LCONTROL = unchecked((int)(0xA2)); + public const int VK_RCONTROL = unchecked((int)(0xA3)); + public const int VK_LMENU = unchecked((int)(0xA4)); + public const int VK_RMENU = unchecked((int)(0xA5)); + + public const int VK_ATTN = unchecked((int)(0xF6)); + public const int VK_CRSEL = unchecked((int)(0xF7)); + public const int VK_EXSEL = unchecked((int)(0xF8)); + public const int VK_EREOF = unchecked((int)(0xF9)); + public const int VK_PLAY = unchecked((int)(0xFA)); + public const int VK_ZOOM = unchecked((int)(0xFB)); + public const int VK_NONAME = unchecked((int)(0xFC)); + public const int VK_PA1 = unchecked((int)(0xFD)); + public const int VK_OEM_CLEAR = unchecked((int)(0xFE)); // SetWindowsHook() codes - public const int WH_MIN = unchecked( (int)( ( -1 ) ) ); - public const int WH_MSGFILTER = unchecked( (int)( ( -1 ) ) ); - public const int WH_JOURNALRECORD = unchecked( (int)( 0 ) ); - public const int WH_JOURNALPLAYBACK = unchecked( (int)( 1 ) ); - public const int WH_KEYBOARD = unchecked( (int)( 2 ) ); - public const int WH_GETMESSAGE = unchecked( (int)( 3 ) ); - public const int WH_CALLWNDPROC = unchecked( (int)( 4 ) ); - public const int WH_CBT = unchecked( (int)( 5 ) ); - public const int WH_SYSMSGFILTER = unchecked( (int)( 6 ) ); - public const int WH_MOUSE = unchecked( (int)( 7 ) ); - public const int WH_HARDWARE = unchecked( (int)( 8 ) ); - public const int WH_DEBUG = unchecked( (int)( 9 ) ); - public const int WH_SHELL = unchecked( (int)( 10 ) ); - public const int WH_FOREGROUNDIDLE = unchecked( (int)( 11 ) ); - public const int WH_MAX = unchecked( (int)( 11 ) ); + public const int WH_MIN = unchecked((int)((-1))); + public const int WH_MSGFILTER = unchecked((int)((-1))); + public const int WH_JOURNALRECORD = unchecked((int)(0)); + public const int WH_JOURNALPLAYBACK = unchecked((int)(1)); + public const int WH_KEYBOARD = unchecked((int)(2)); + public const int WH_GETMESSAGE = unchecked((int)(3)); + public const int WH_CALLWNDPROC = unchecked((int)(4)); + public const int WH_CBT = unchecked((int)(5)); + public const int WH_SYSMSGFILTER = unchecked((int)(6)); + public const int WH_MOUSE = unchecked((int)(7)); + public const int WH_HARDWARE = unchecked((int)(8)); + public const int WH_DEBUG = unchecked((int)(9)); + public const int WH_SHELL = unchecked((int)(10)); + public const int WH_FOREGROUNDIDLE = unchecked((int)(11)); + public const int WH_MAX = unchecked((int)(11)); // Hook Codes - public const int HC_ACTION = unchecked( (int)( 0 ) ); - public const int HC_GETNEXT = unchecked( (int)( 1 ) ); - public const int HC_SKIP = unchecked( (int)( 2 ) ); - public const int HC_NOREMOVE = unchecked( (int)( 3 ) ); - public const int HC_NOREM = unchecked( (int)( HC_NOREMOVE ) ); - public const int HC_SYSMODALON = unchecked( (int)( 4 ) ); - public const int HC_SYSMODALOFF = unchecked( (int)( 5 ) ); + public const int HC_ACTION = unchecked((int)(0)); + public const int HC_GETNEXT = unchecked((int)(1)); + public const int HC_SKIP = unchecked((int)(2)); + public const int HC_NOREMOVE = unchecked((int)(3)); + public const int HC_NOREM = unchecked((int)(HC_NOREMOVE)); + public const int HC_SYSMODALON = unchecked((int)(4)); + public const int HC_SYSMODALOFF = unchecked((int)(5)); // CBT Hook Codes - public const int HCBT_MOVESIZE = unchecked( (int)( 0 ) ); - public const int HCBT_MINMAX = unchecked( (int)( 1 ) ); - public const int HCBT_QS = unchecked( (int)( 2 ) ); - public const int HCBT_CREATEWND = unchecked( (int)( 3 ) ); - public const int HCBT_DESTROYWND = unchecked( (int)( 4 ) ); - public const int HCBT_ACTIVATE = unchecked( (int)( 5 ) ); - public const int HCBT_CLICKSKIPPED = unchecked( (int)( 6 ) ); - public const int HCBT_KEYSKIPPED = unchecked( (int)( 7 ) ); - public const int HCBT_SYSCOMMAND = unchecked( (int)( 8 ) ); - public const int HCBT_SETFOCUS = unchecked( (int)( 9 ) ); + public const int HCBT_MOVESIZE = unchecked((int)(0)); + public const int HCBT_MINMAX = unchecked((int)(1)); + public const int HCBT_QS = unchecked((int)(2)); + public const int HCBT_CREATEWND = unchecked((int)(3)); + public const int HCBT_DESTROYWND = unchecked((int)(4)); + public const int HCBT_ACTIVATE = unchecked((int)(5)); + public const int HCBT_CLICKSKIPPED = unchecked((int)(6)); + public const int HCBT_KEYSKIPPED = unchecked((int)(7)); + public const int HCBT_SYSCOMMAND = unchecked((int)(8)); + public const int HCBT_SETFOCUS = unchecked((int)(9)); // HCBT_ACTIVATE structure pointed to by lParam - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CBTACTIVATESTRUCT { public int fMouse; @@ -7848,23 +7848,23 @@ public struct CBTACTIVATESTRUCT } // WH_MSGFILTER Filter Proc Codes - public const int MSGF_DIALOGBOX = unchecked( (int)( 0 ) ); - public const int MSGF_MESSAGEBOX = unchecked( (int)( 1 ) ); - public const int MSGF_MENU = unchecked( (int)( 2 ) ); - public const int MSGF_MOVE = unchecked( (int)( 3 ) ); - public const int MSGF_SIZE = unchecked( (int)( 4 ) ); - public const int MSGF_SCROLLBAR = unchecked( (int)( 5 ) ); - public const int MSGF_NEXTWINDOW = unchecked( (int)( 6 ) ); - public const int MSGF_MAINLOOP = unchecked( (int)( 8 ) ); - public const int MSGF_MAX = unchecked( (int)( 8 ) ); - public const int MSGF_USER = unchecked( (int)( 4096 ) ); - - public const int HSHELL_WINDOWCREATED = unchecked( (int)( 1 ) ); - public const int HSHELL_WINDOWDESTROYED = unchecked( (int)( 2 ) ); - public const int HSHELL_ACTIVATESHELLWINDOW = unchecked( (int)( 3 ) ); + public const int MSGF_DIALOGBOX = unchecked((int)(0)); + public const int MSGF_MESSAGEBOX = unchecked((int)(1)); + public const int MSGF_MENU = unchecked((int)(2)); + public const int MSGF_MOVE = unchecked((int)(3)); + public const int MSGF_SIZE = unchecked((int)(4)); + public const int MSGF_SCROLLBAR = unchecked((int)(5)); + public const int MSGF_NEXTWINDOW = unchecked((int)(6)); + public const int MSGF_MAINLOOP = unchecked((int)(8)); + public const int MSGF_MAX = unchecked((int)(8)); + public const int MSGF_USER = unchecked((int)(4096)); + + public const int HSHELL_WINDOWCREATED = unchecked((int)(1)); + public const int HSHELL_WINDOWDESTROYED = unchecked((int)(2)); + public const int HSHELL_ACTIVATESHELLWINDOW = unchecked((int)(3)); // Message Structure used in Journaling - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct EVENTMSG { public int message; @@ -7874,7 +7874,7 @@ public struct EVENTMSG public IntPtr hwnd; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CWPSTRUCT { public int lParam; @@ -7883,7 +7883,7 @@ public struct CWPSTRUCT public IntPtr hwnd; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DEBUGHOOKINFO { public IntPtr hModuleHook; @@ -7894,7 +7894,7 @@ public struct DEBUGHOOKINFO } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MOUSEHOOKSTRUCT { public POINTAPI pt; @@ -7904,133 +7904,133 @@ public struct MOUSEHOOKSTRUCT } // Keyboard Layout API - public const int HKL_PREV = unchecked( (int)( 0 ) ); - public const int HKL_NEXT = unchecked( (int)( 1 ) ); + public const int HKL_PREV = unchecked((int)(0)); + public const int HKL_NEXT = unchecked((int)(1)); - public const int KLF_ACTIVATE = unchecked( (int)( 0x1 ) ); - public const int KLF_SUBSTITUTE_OK = unchecked( (int)( 0x2 ) ); - public const int KLF_UNLOADPREVIOUS = unchecked( (int)( 0x4 ) ); - public const int KLF_REORDER = unchecked( (int)( 0x8 ) ); + public const int KLF_ACTIVATE = unchecked((int)(0x1)); + public const int KLF_SUBSTITUTE_OK = unchecked((int)(0x2)); + public const int KLF_UNLOADPREVIOUS = unchecked((int)(0x4)); + public const int KLF_REORDER = unchecked((int)(0x8)); // Size of KeyboardLayoutName (number of characters), including nul terminator - public const int KL_NAMELENGTH = unchecked( (int)( 9 ) ); + public const int KL_NAMELENGTH = unchecked((int)(9)); - [DllImport( "user32", EntryPoint = "LoadKeyboardLayout", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LoadKeyboardLayout( string pwszKLID, int flags ); + [DllImport("user32", EntryPoint = "LoadKeyboardLayout", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LoadKeyboardLayout(string pwszKLID, int flags); - [DllImport( "user32", EntryPoint = "ActivateKeyboardLayout", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ActivateKeyboardLayout( int HKL, int flags ); + [DllImport("user32", EntryPoint = "ActivateKeyboardLayout", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ActivateKeyboardLayout(int HKL, int flags); - [DllImport( "user32", EntryPoint = "UnloadKeyboardLayout", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int UnloadKeyboardLayout( int HKL ); + [DllImport("user32", EntryPoint = "UnloadKeyboardLayout", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int UnloadKeyboardLayout(int HKL); - [DllImport( "user32", EntryPoint = "GetKeyboardLayoutName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetKeyboardLayoutName( string pwszKLID ); + [DllImport("user32", EntryPoint = "GetKeyboardLayoutName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetKeyboardLayoutName(string pwszKLID); // Desktop-specific access flags - public const int DESKTOP_READOBJECTS = unchecked( (int)( 0x1 ) ); - public const int DESKTOP_CREATEWINDOW = unchecked( (int)( 0x2 ) ); - public const int DESKTOP_CREATEMENU = unchecked( (int)( 0x4 ) ); - public const int DESKTOP_HOOKCONTROL = unchecked( (int)( 0x8 ) ); - public const int DESKTOP_JOURNALRECORD = unchecked( (int)( 0x10 ) ); - public const int DESKTOP_JOURNALPLAYBACK = unchecked( (int)( 0x20 ) ); - public const int DESKTOP_ENUMERATE = unchecked( (int)( 0x40 ) ); - public const int DESKTOP_WRITEOBJECTS = unchecked( (int)( 0x80 ) ); + public const int DESKTOP_READOBJECTS = unchecked((int)(0x1)); + public const int DESKTOP_CREATEWINDOW = unchecked((int)(0x2)); + public const int DESKTOP_CREATEMENU = unchecked((int)(0x4)); + public const int DESKTOP_HOOKCONTROL = unchecked((int)(0x8)); + public const int DESKTOP_JOURNALRECORD = unchecked((int)(0x10)); + public const int DESKTOP_JOURNALPLAYBACK = unchecked((int)(0x20)); + public const int DESKTOP_ENUMERATE = unchecked((int)(0x40)); + public const int DESKTOP_WRITEOBJECTS = unchecked((int)(0x80)); - [DllImport( "user32", EntryPoint = "GetThreadDesktop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetThreadDesktop( int dwThread ); + [DllImport("user32", EntryPoint = "GetThreadDesktop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetThreadDesktop(int dwThread); // Windowstation-specific access flags - public const int WINSTA_ENUMDESKTOPS = unchecked( (int)( 0x1 ) ); - public const int WINSTA_READATTRIBUTES = unchecked( (int)( 0x2 ) ); - public const int WINSTA_ACCESSCLIPBOARD = unchecked( (int)( 0x4 ) ); - public const int WINSTA_CREATEDESKTOP = unchecked( (int)( 0x8 ) ); - public const int WINSTA_WRITEATTRIBUTES = unchecked( (int)( 0x10 ) ); - public const int WINSTA_ACCESSPUBLICATOMS = unchecked( (int)( 0x20 ) ); - public const int WINSTA_EXITWINDOWS = unchecked( (int)( 0x40 ) ); - public const int WINSTA_ENUMERATE = unchecked( (int)( 0x100 ) ); - public const int WINSTA_READSCREEN = unchecked( (int)( 0x200 ) ); - - - [DllImport( "user32", EntryPoint = "GetProcessWindowStation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + public const int WINSTA_ENUMDESKTOPS = unchecked((int)(0x1)); + public const int WINSTA_READATTRIBUTES = unchecked((int)(0x2)); + public const int WINSTA_ACCESSCLIPBOARD = unchecked((int)(0x4)); + public const int WINSTA_CREATEDESKTOP = unchecked((int)(0x8)); + public const int WINSTA_WRITEATTRIBUTES = unchecked((int)(0x10)); + public const int WINSTA_ACCESSPUBLICATOMS = unchecked((int)(0x20)); + public const int WINSTA_EXITWINDOWS = unchecked((int)(0x40)); + public const int WINSTA_ENUMERATE = unchecked((int)(0x100)); + public const int WINSTA_READSCREEN = unchecked((int)(0x200)); + + + [DllImport("user32", EntryPoint = "GetProcessWindowStation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetProcessWindowStation(); - [DllImport( "user32", EntryPoint = "SetUserObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetUserObjectSecurity( IntPtr hObj, int pSIRequested, SECURITY_DESCRIPTOR pSd ); + [DllImport("user32", EntryPoint = "SetUserObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetUserObjectSecurity(IntPtr hObj, int pSIRequested, SECURITY_DESCRIPTOR pSd); - [DllImport( "user32", EntryPoint = "GetUserObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetUserObjectSecurity( IntPtr hObj, int pSIRequested, SECURITY_DESCRIPTOR pSd, int nLength, IntPtr lpnLengthNeeded ); + [DllImport("user32", EntryPoint = "GetUserObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetUserObjectSecurity(IntPtr hObj, int pSIRequested, SECURITY_DESCRIPTOR pSd, int nLength, IntPtr lpnLengthNeeded); // Message structure // Window field offsets for GetWindowLong() and GetWindowWord() - public const int GWL_WNDPROC = unchecked( (int)( ( -4 ) ) ); - public const int GWL_HINSTANCE = unchecked( (int)( ( -6 ) ) ); - public const int GWL_HWNDPARENT = unchecked( (int)( ( -8 ) ) ); - public const int GWL_STYLE = unchecked( (int)( ( -16 ) ) ); - public const int GWL_EXSTYLE = unchecked( (int)( ( -20 ) ) ); - public const int GWL_USERDATA = unchecked( (int)( ( -21 ) ) ); - public const int GWL_ID = unchecked( (int)( ( -12 ) ) ); + public const int GWL_WNDPROC = unchecked((int)((-4))); + public const int GWL_HINSTANCE = unchecked((int)((-6))); + public const int GWL_HWNDPARENT = unchecked((int)((-8))); + public const int GWL_STYLE = unchecked((int)((-16))); + public const int GWL_EXSTYLE = unchecked((int)((-20))); + public const int GWL_USERDATA = unchecked((int)((-21))); + public const int GWL_ID = unchecked((int)((-12))); // Class field offsets for GetClassLong() and GetClassWord() - public const int GCL_MENUNAME = unchecked( (int)( ( -8 ) ) ); - public const int GCL_HBRBACKGROUND = unchecked( (int)( ( -10 ) ) ); - public const int GCL_HCURSOR = unchecked( (int)( ( -12 ) ) ); - public const int GCL_HICON = unchecked( (int)( ( -14 ) ) ); - public const int GCL_HMODULE = unchecked( (int)( ( -16 ) ) ); - public const int GCL_CBWNDEXTRA = unchecked( (int)( ( -18 ) ) ); - public const int GCL_CBCLSEXTRA = unchecked( (int)( ( -20 ) ) ); - public const int GCL_WNDPROC = unchecked( (int)( ( -24 ) ) ); - public const int GCL_STYLE = unchecked( (int)( ( -26 ) ) ); - public const int GCW_ATOM = unchecked( (int)( ( -32 ) ) ); + public const int GCL_MENUNAME = unchecked((int)((-8))); + public const int GCL_HBRBACKGROUND = unchecked((int)((-10))); + public const int GCL_HCURSOR = unchecked((int)((-12))); + public const int GCL_HICON = unchecked((int)((-14))); + public const int GCL_HMODULE = unchecked((int)((-16))); + public const int GCL_CBWNDEXTRA = unchecked((int)((-18))); + public const int GCL_CBCLSEXTRA = unchecked((int)((-20))); + public const int GCL_WNDPROC = unchecked((int)((-24))); + public const int GCL_STYLE = unchecked((int)((-26))); + public const int GCW_ATOM = unchecked((int)((-32))); // Window Messages - public const int WM_NULL = unchecked( (int)( 0x0 ) ); - public const int WM_CREATE = unchecked( (int)( 0x1 ) ); - public const int WM_DESTROY = unchecked( (int)( 0x2 ) ); - public const int WM_MOVE = unchecked( (int)( 0x3 ) ); - public const int WM_SIZE = unchecked( (int)( 0x5 ) ); + public const int WM_NULL = unchecked((int)(0x0)); + public const int WM_CREATE = unchecked((int)(0x1)); + public const int WM_DESTROY = unchecked((int)(0x2)); + public const int WM_MOVE = unchecked((int)(0x3)); + public const int WM_SIZE = unchecked((int)(0x5)); - public const int WM_ACTIVATE = unchecked( (int)( 0x6 ) ); + public const int WM_ACTIVATE = unchecked((int)(0x6)); // // WM_ACTIVATE state values - public const int WA_INACTIVE = unchecked( (int)( 0 ) ); - public const int WA_ACTIVE = unchecked( (int)( 1 ) ); - public const int WA_CLICKACTIVE = unchecked( (int)( 2 ) ); - - public const int WM_SETFOCUS = unchecked( (int)( 0x7 ) ); - public const int WM_KILLFOCUS = unchecked( (int)( 0x8 ) ); - public const int WM_ENABLE = unchecked( (int)( 0xA ) ); - public const int WM_SETREDRAW = unchecked( (int)( 0xB ) ); - public const int WM_SETTEXT = unchecked( (int)( 0xC ) ); - public const int WM_GETTEXT = unchecked( (int)( 0xD ) ); - public const int WM_GETTEXTLENGTH = unchecked( (int)( 0xE ) ); - public const int WM_PAINT = unchecked( (int)( 0xF ) ); - public const int WM_CLOSE = unchecked( (int)( 0x10 ) ); - public const int WM_QUERYENDSESSION = unchecked( (int)( 0x11 ) ); - public const int WM_QUIT = unchecked( (int)( 0x12 ) ); - public const int WM_QUERYOPEN = unchecked( (int)( 0x13 ) ); - public const int WM_ERASEBKGND = unchecked( (int)( 0x14 ) ); - public const int WM_SYSCOLORCHANGE = unchecked( (int)( 0x15 ) ); - public const int WM_ENDSESSION = unchecked( (int)( 0x16 ) ); - public const int WM_SHOWWINDOW = unchecked( (int)( 0x18 ) ); - public const int WM_WININICHANGE = unchecked( (int)( 0x1A ) ); - public const int WM_DEVMODECHANGE = unchecked( (int)( 0x1B ) ); - public const int WM_ACTIVATEAPP = unchecked( (int)( 0x1C ) ); - public const int WM_FONTCHANGE = unchecked( (int)( 0x1D ) ); - public const int WM_TIMECHANGE = unchecked( (int)( 0x1E ) ); - public const int WM_CANCELMODE = unchecked( (int)( 0x1F ) ); - public const int WM_SETCURSOR = unchecked( (int)( 0x20 ) ); - public const int WM_MOUSEACTIVATE = unchecked( (int)( 0x21 ) ); - public const int WM_CHILDACTIVATE = unchecked( (int)( 0x22 ) ); - public const int WM_QUEUESYNC = unchecked( (int)( 0x23 ) ); - - public const int WM_GETMINMAXINFO = unchecked( (int)( 0x24 ) ); - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int WA_INACTIVE = unchecked((int)(0)); + public const int WA_ACTIVE = unchecked((int)(1)); + public const int WA_CLICKACTIVE = unchecked((int)(2)); + + public const int WM_SETFOCUS = unchecked((int)(0x7)); + public const int WM_KILLFOCUS = unchecked((int)(0x8)); + public const int WM_ENABLE = unchecked((int)(0xA)); + public const int WM_SETREDRAW = unchecked((int)(0xB)); + public const int WM_SETTEXT = unchecked((int)(0xC)); + public const int WM_GETTEXT = unchecked((int)(0xD)); + public const int WM_GETTEXTLENGTH = unchecked((int)(0xE)); + public const int WM_PAINT = unchecked((int)(0xF)); + public const int WM_CLOSE = unchecked((int)(0x10)); + public const int WM_QUERYENDSESSION = unchecked((int)(0x11)); + public const int WM_QUIT = unchecked((int)(0x12)); + public const int WM_QUERYOPEN = unchecked((int)(0x13)); + public const int WM_ERASEBKGND = unchecked((int)(0x14)); + public const int WM_SYSCOLORCHANGE = unchecked((int)(0x15)); + public const int WM_ENDSESSION = unchecked((int)(0x16)); + public const int WM_SHOWWINDOW = unchecked((int)(0x18)); + public const int WM_WININICHANGE = unchecked((int)(0x1A)); + public const int WM_DEVMODECHANGE = unchecked((int)(0x1B)); + public const int WM_ACTIVATEAPP = unchecked((int)(0x1C)); + public const int WM_FONTCHANGE = unchecked((int)(0x1D)); + public const int WM_TIMECHANGE = unchecked((int)(0x1E)); + public const int WM_CANCELMODE = unchecked((int)(0x1F)); + public const int WM_SETCURSOR = unchecked((int)(0x20)); + public const int WM_MOUSEACTIVATE = unchecked((int)(0x21)); + public const int WM_CHILDACTIVATE = unchecked((int)(0x22)); + public const int WM_QUEUESYNC = unchecked((int)(0x23)); + + public const int WM_GETMINMAXINFO = unchecked((int)(0x24)); + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MINMAXINFO { public POINTAPI ptReserved; @@ -8040,48 +8040,48 @@ public struct MINMAXINFO public POINTAPI ptMaxTrackSize; } - public const int WM_PAINTICON = unchecked( (int)( 0x26 ) ); - public const int WM_ICONERASEBKGND = unchecked( (int)( 0x27 ) ); - public const int WM_NEXTDLGCTL = unchecked( (int)( 0x28 ) ); - public const int WM_SPOOLERSTATUS = unchecked( (int)( 0x2A ) ); - public const int WM_DRAWITEM = unchecked( (int)( 0x2B ) ); - public const int WM_MEASUREITEM = unchecked( (int)( 0x2C ) ); - public const int WM_DELETEITEM = unchecked( (int)( 0x2D ) ); - public const int WM_VKEYTOITEM = unchecked( (int)( 0x2E ) ); - public const int WM_CHARTOITEM = unchecked( (int)( 0x2F ) ); - public const int WM_SETFONT = unchecked( (int)( 0x30 ) ); - public const int WM_GETFONT = unchecked( (int)( 0x31 ) ); - public const int WM_SETHOTKEY = unchecked( (int)( 0x32 ) ); - public const int WM_GETHOTKEY = unchecked( (int)( 0x33 ) ); - public const int WM_QUERYDRAGICON = unchecked( (int)( 0x37 ) ); - public const int WM_COMPAREITEM = unchecked( (int)( 0x39 ) ); - public const int WM_COMPACTING = unchecked( (int)( 0x41 ) ); - public const int WM_OTHERWINDOWCREATED = unchecked( (int)( 0x42 ) );// no longer suported - public const int WM_OTHERWINDOWDESTROYED = unchecked( (int)( 0x43 ) );// no longer suported - public const int WM_COMMNOTIFY = unchecked( (int)( 0x44 ) );// no longer suported + public const int WM_PAINTICON = unchecked((int)(0x26)); + public const int WM_ICONERASEBKGND = unchecked((int)(0x27)); + public const int WM_NEXTDLGCTL = unchecked((int)(0x28)); + public const int WM_SPOOLERSTATUS = unchecked((int)(0x2A)); + public const int WM_DRAWITEM = unchecked((int)(0x2B)); + public const int WM_MEASUREITEM = unchecked((int)(0x2C)); + public const int WM_DELETEITEM = unchecked((int)(0x2D)); + public const int WM_VKEYTOITEM = unchecked((int)(0x2E)); + public const int WM_CHARTOITEM = unchecked((int)(0x2F)); + public const int WM_SETFONT = unchecked((int)(0x30)); + public const int WM_GETFONT = unchecked((int)(0x31)); + public const int WM_SETHOTKEY = unchecked((int)(0x32)); + public const int WM_GETHOTKEY = unchecked((int)(0x33)); + public const int WM_QUERYDRAGICON = unchecked((int)(0x37)); + public const int WM_COMPAREITEM = unchecked((int)(0x39)); + public const int WM_COMPACTING = unchecked((int)(0x41)); + public const int WM_OTHERWINDOWCREATED = unchecked((int)(0x42));// no longer suported + public const int WM_OTHERWINDOWDESTROYED = unchecked((int)(0x43));// no longer suported + public const int WM_COMMNOTIFY = unchecked((int)(0x44));// no longer suported // notifications passed in low word of lParam on WM_COMMNOTIFY messages - public const int CN_RECEIVE = unchecked( (int)( 0x1 ) ); - public const int CN_TRANSMIT = unchecked( (int)( 0x2 ) ); - public const int CN_EVENT = unchecked( (int)( 0x4 ) ); + public const int CN_RECEIVE = unchecked((int)(0x1)); + public const int CN_TRANSMIT = unchecked((int)(0x2)); + public const int CN_EVENT = unchecked((int)(0x4)); - public const int WM_WINDOWPOSCHANGING = unchecked( (int)( 0x46 ) ); - public const int WM_WINDOWPOSCHANGED = unchecked( (int)( 0x47 ) ); + public const int WM_WINDOWPOSCHANGING = unchecked((int)(0x46)); + public const int WM_WINDOWPOSCHANGED = unchecked((int)(0x47)); - public const int WM_POWER = unchecked( (int)( 0x48 ) ); + public const int WM_POWER = unchecked((int)(0x48)); // // wParam for WM_POWER window message and DRV_POWER driver notification - public const int PWR_OK = unchecked( (int)( 1 ) ); - public const int PWR_FAIL = unchecked( (int)( ( -1 ) ) ); - public const int PWR_SUSPENDREQUEST = unchecked( (int)( 1 ) ); - public const int PWR_SUSPENDRESUME = unchecked( (int)( 2 ) ); - public const int PWR_CRITICALRESUME = unchecked( (int)( 3 ) ); + public const int PWR_OK = unchecked((int)(1)); + public const int PWR_FAIL = unchecked((int)((-1))); + public const int PWR_SUSPENDREQUEST = unchecked((int)(1)); + public const int PWR_SUSPENDRESUME = unchecked((int)(2)); + public const int PWR_CRITICALRESUME = unchecked((int)(3)); - public const int WM_COPYDATA = unchecked( (int)( 0x4A ) ); - public const int WM_CANCELJOURNAL = unchecked( (int)( 0x4B ) ); + public const int WM_COPYDATA = unchecked((int)(0x4A)); + public const int WM_CANCELJOURNAL = unchecked((int)(0x4B)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct COPYDATASTRUCT { public int dwData; @@ -8089,176 +8089,176 @@ public struct COPYDATASTRUCT public IntPtr lpData; } - public const int WM_NCCREATE = unchecked( (int)( 0x81 ) ); - public const int WM_NCDESTROY = unchecked( (int)( 0x82 ) ); - public const int WM_NCCALCSIZE = unchecked( (int)( 0x83 ) ); - public const int WM_NCHITTEST = unchecked( (int)( 0x84 ) ); - public const int WM_NCPAINT = unchecked( (int)( 0x85 ) ); - public const int WM_NCACTIVATE = unchecked( (int)( 0x86 ) ); - public const int WM_GETDLGCODE = unchecked( (int)( 0x87 ) ); - public const int WM_NCMOUSEMOVE = unchecked( (int)( 0xA0 ) ); - public const int WM_NCLBUTTONDOWN = unchecked( (int)( 0xA1 ) ); - public const int WM_NCLBUTTONUP = unchecked( (int)( 0xA2 ) ); - public const int WM_NCLBUTTONDBLCLK = unchecked( (int)( 0xA3 ) ); - public const int WM_NCRBUTTONDOWN = unchecked( (int)( 0xA4 ) ); - public const int WM_NCRBUTTONUP = unchecked( (int)( 0xA5 ) ); - public const int WM_NCRBUTTONDBLCLK = unchecked( (int)( 0xA6 ) ); - public const int WM_NCMBUTTONDOWN = unchecked( (int)( 0xA7 ) ); - public const int WM_NCMBUTTONUP = unchecked( (int)( 0xA8 ) ); - public const int WM_NCMBUTTONDBLCLK = unchecked( (int)( 0xA9 ) ); - - public const int WM_KEYFIRST = unchecked( (int)( 0x100 ) ); - public const int WM_KEYDOWN = unchecked( (int)( 0x100 ) ); - public const int WM_KEYUP = unchecked( (int)( 0x101 ) ); - public const int WM_CHAR = unchecked( (int)( 0x102 ) ); - public const int WM_DEADCHAR = unchecked( (int)( 0x103 ) ); - public const int WM_SYSKEYDOWN = unchecked( (int)( 0x104 ) ); - public const int WM_SYSKEYUP = unchecked( (int)( 0x105 ) ); - public const int WM_SYSCHAR = unchecked( (int)( 0x106 ) ); - public const int WM_SYSDEADCHAR = unchecked( (int)( 0x107 ) ); - public const int WM_KEYLAST = unchecked( (int)( 0x108 ) ); - public const int WM_INITDIALOG = unchecked( (int)( 0x110 ) ); - public const int WM_COMMAND = unchecked( (int)( 0x111 ) ); - public const int WM_SYSCOMMAND = unchecked( (int)( 0x112 ) ); - public const int WM_TIMER = unchecked( (int)( 0x113 ) ); - public const int WM_HSCROLL = unchecked( (int)( 0x114 ) ); - public const int WM_VSCROLL = unchecked( (int)( 0x115 ) ); - public const int WM_INITMENU = unchecked( (int)( 0x116 ) ); - public const int WM_INITMENUPOPUP = unchecked( (int)( 0x117 ) ); - public const int WM_MENUSELECT = unchecked( (int)( 0x11F ) ); - public const int WM_MENUCHAR = unchecked( (int)( 0x120 ) ); - public const int WM_ENTERIDLE = unchecked( (int)( 0x121 ) ); - - public const int WM_CTLCOLORMSGBOX = unchecked( (int)( 0x132 ) ); - public const int WM_CTLCOLOREDIT = unchecked( (int)( 0x133 ) ); - public const int WM_CTLCOLORLISTBOX = unchecked( (int)( 0x134 ) ); - public const int WM_CTLCOLORBTN = unchecked( (int)( 0x135 ) ); - public const int WM_CTLCOLORDLG = unchecked( (int)( 0x136 ) ); - public const int WM_CTLCOLORSCROLLBAR = unchecked( (int)( 0x137 ) ); - public const int WM_CTLCOLORSTATIC = unchecked( (int)( 0x138 ) ); - - public const int WM_MOUSEFIRST = unchecked( (int)( 0x200 ) ); - public const int WM_MOUSEMOVE = unchecked( (int)( 0x200 ) ); - public const int WM_LBUTTONDOWN = unchecked( (int)( 0x201 ) ); - public const int WM_LBUTTONUP = unchecked( (int)( 0x202 ) ); - public const int WM_LBUTTONDBLCLK = unchecked( (int)( 0x203 ) ); - public const int WM_RBUTTONDOWN = unchecked( (int)( 0x204 ) ); - public const int WM_RBUTTONUP = unchecked( (int)( 0x205 ) ); - public const int WM_RBUTTONDBLCLK = unchecked( (int)( 0x206 ) ); - public const int WM_MBUTTONDOWN = unchecked( (int)( 0x207 ) ); - public const int WM_MBUTTONUP = unchecked( (int)( 0x208 ) ); - public const int WM_MBUTTONDBLCLK = unchecked( (int)( 0x209 ) ); - public const int WM_MOUSELAST = unchecked( (int)( 0x209 ) ); - - public const int WM_PARENTNOTIFY = unchecked( (int)( 0x210 ) ); - public const int WM_ENTERMENULOOP = unchecked( (int)( 0x211 ) ); - public const int WM_EXITMENULOOP = unchecked( (int)( 0x212 ) ); - public const int WM_MDICREATE = unchecked( (int)( 0x220 ) ); - public const int WM_MDIDESTROY = unchecked( (int)( 0x221 ) ); - public const int WM_MDIACTIVATE = unchecked( (int)( 0x222 ) ); - public const int WM_MDIRESTORE = unchecked( (int)( 0x223 ) ); - public const int WM_MDINEXT = unchecked( (int)( 0x224 ) ); - public const int WM_MDIMAXIMIZE = unchecked( (int)( 0x225 ) ); - public const int WM_MDITILE = unchecked( (int)( 0x226 ) ); - public const int WM_MDICASCADE = unchecked( (int)( 0x227 ) ); - public const int WM_MDIICONARRANGE = unchecked( (int)( 0x228 ) ); - public const int WM_MDIGETACTIVE = unchecked( (int)( 0x229 ) ); - public const int WM_MDISETMENU = unchecked( (int)( 0x230 ) ); - public const int WM_DROPFILES = unchecked( (int)( 0x233 ) ); - public const int WM_MDIREFRESHMENU = unchecked( (int)( 0x234 ) ); - - - public const int WM_CUT = unchecked( (int)( 0x300 ) ); - public const int WM_COPY = unchecked( (int)( 0x301 ) ); - public const int WM_PASTE = unchecked( (int)( 0x302 ) ); - public const int WM_CLEAR = unchecked( (int)( 0x303 ) ); - public const int WM_UNDO = unchecked( (int)( 0x304 ) ); - public const int WM_RENDERFORMAT = unchecked( (int)( 0x305 ) ); - public const int WM_RENDERALLFORMATS = unchecked( (int)( 0x306 ) ); - public const int WM_DESTROYCLIPBOARD = unchecked( (int)( 0x307 ) ); - public const int WM_DRAWCLIPBOARD = unchecked( (int)( 0x308 ) ); - public const int WM_PAINTCLIPBOARD = unchecked( (int)( 0x309 ) ); - public const int WM_VSCROLLCLIPBOARD = unchecked( (int)( 0x30A ) ); - public const int WM_SIZECLIPBOARD = unchecked( (int)( 0x30B ) ); - public const int WM_ASKCBFORMATNAME = unchecked( (int)( 0x30C ) ); - public const int WM_CHANGECBCHAIN = unchecked( (int)( 0x30D ) ); - public const int WM_HSCROLLCLIPBOARD = unchecked( (int)( 0x30E ) ); - public const int WM_QUERYNEWPALETTE = unchecked( (int)( 0x30F ) ); - public const int WM_PALETTEISCHANGING = unchecked( (int)( 0x310 ) ); - public const int WM_PALETTECHANGED = unchecked( (int)( 0x311 ) ); - public const int WM_HOTKEY = unchecked( (int)( 0x312 ) ); - - public const int WM_PENWINFIRST = unchecked( (int)( 0x380 ) ); - public const int WM_PENWINLAST = unchecked( (int)( 0x38F ) ); + public const int WM_NCCREATE = unchecked((int)(0x81)); + public const int WM_NCDESTROY = unchecked((int)(0x82)); + public const int WM_NCCALCSIZE = unchecked((int)(0x83)); + public const int WM_NCHITTEST = unchecked((int)(0x84)); + public const int WM_NCPAINT = unchecked((int)(0x85)); + public const int WM_NCACTIVATE = unchecked((int)(0x86)); + public const int WM_GETDLGCODE = unchecked((int)(0x87)); + public const int WM_NCMOUSEMOVE = unchecked((int)(0xA0)); + public const int WM_NCLBUTTONDOWN = unchecked((int)(0xA1)); + public const int WM_NCLBUTTONUP = unchecked((int)(0xA2)); + public const int WM_NCLBUTTONDBLCLK = unchecked((int)(0xA3)); + public const int WM_NCRBUTTONDOWN = unchecked((int)(0xA4)); + public const int WM_NCRBUTTONUP = unchecked((int)(0xA5)); + public const int WM_NCRBUTTONDBLCLK = unchecked((int)(0xA6)); + public const int WM_NCMBUTTONDOWN = unchecked((int)(0xA7)); + public const int WM_NCMBUTTONUP = unchecked((int)(0xA8)); + public const int WM_NCMBUTTONDBLCLK = unchecked((int)(0xA9)); + + public const int WM_KEYFIRST = unchecked((int)(0x100)); + public const int WM_KEYDOWN = unchecked((int)(0x100)); + public const int WM_KEYUP = unchecked((int)(0x101)); + public const int WM_CHAR = unchecked((int)(0x102)); + public const int WM_DEADCHAR = unchecked((int)(0x103)); + public const int WM_SYSKEYDOWN = unchecked((int)(0x104)); + public const int WM_SYSKEYUP = unchecked((int)(0x105)); + public const int WM_SYSCHAR = unchecked((int)(0x106)); + public const int WM_SYSDEADCHAR = unchecked((int)(0x107)); + public const int WM_KEYLAST = unchecked((int)(0x108)); + public const int WM_INITDIALOG = unchecked((int)(0x110)); + public const int WM_COMMAND = unchecked((int)(0x111)); + public const int WM_SYSCOMMAND = unchecked((int)(0x112)); + public const int WM_TIMER = unchecked((int)(0x113)); + public const int WM_HSCROLL = unchecked((int)(0x114)); + public const int WM_VSCROLL = unchecked((int)(0x115)); + public const int WM_INITMENU = unchecked((int)(0x116)); + public const int WM_INITMENUPOPUP = unchecked((int)(0x117)); + public const int WM_MENUSELECT = unchecked((int)(0x11F)); + public const int WM_MENUCHAR = unchecked((int)(0x120)); + public const int WM_ENTERIDLE = unchecked((int)(0x121)); + + public const int WM_CTLCOLORMSGBOX = unchecked((int)(0x132)); + public const int WM_CTLCOLOREDIT = unchecked((int)(0x133)); + public const int WM_CTLCOLORLISTBOX = unchecked((int)(0x134)); + public const int WM_CTLCOLORBTN = unchecked((int)(0x135)); + public const int WM_CTLCOLORDLG = unchecked((int)(0x136)); + public const int WM_CTLCOLORSCROLLBAR = unchecked((int)(0x137)); + public const int WM_CTLCOLORSTATIC = unchecked((int)(0x138)); + + public const int WM_MOUSEFIRST = unchecked((int)(0x200)); + public const int WM_MOUSEMOVE = unchecked((int)(0x200)); + public const int WM_LBUTTONDOWN = unchecked((int)(0x201)); + public const int WM_LBUTTONUP = unchecked((int)(0x202)); + public const int WM_LBUTTONDBLCLK = unchecked((int)(0x203)); + public const int WM_RBUTTONDOWN = unchecked((int)(0x204)); + public const int WM_RBUTTONUP = unchecked((int)(0x205)); + public const int WM_RBUTTONDBLCLK = unchecked((int)(0x206)); + public const int WM_MBUTTONDOWN = unchecked((int)(0x207)); + public const int WM_MBUTTONUP = unchecked((int)(0x208)); + public const int WM_MBUTTONDBLCLK = unchecked((int)(0x209)); + public const int WM_MOUSELAST = unchecked((int)(0x209)); + + public const int WM_PARENTNOTIFY = unchecked((int)(0x210)); + public const int WM_ENTERMENULOOP = unchecked((int)(0x211)); + public const int WM_EXITMENULOOP = unchecked((int)(0x212)); + public const int WM_MDICREATE = unchecked((int)(0x220)); + public const int WM_MDIDESTROY = unchecked((int)(0x221)); + public const int WM_MDIACTIVATE = unchecked((int)(0x222)); + public const int WM_MDIRESTORE = unchecked((int)(0x223)); + public const int WM_MDINEXT = unchecked((int)(0x224)); + public const int WM_MDIMAXIMIZE = unchecked((int)(0x225)); + public const int WM_MDITILE = unchecked((int)(0x226)); + public const int WM_MDICASCADE = unchecked((int)(0x227)); + public const int WM_MDIICONARRANGE = unchecked((int)(0x228)); + public const int WM_MDIGETACTIVE = unchecked((int)(0x229)); + public const int WM_MDISETMENU = unchecked((int)(0x230)); + public const int WM_DROPFILES = unchecked((int)(0x233)); + public const int WM_MDIREFRESHMENU = unchecked((int)(0x234)); + + + public const int WM_CUT = unchecked((int)(0x300)); + public const int WM_COPY = unchecked((int)(0x301)); + public const int WM_PASTE = unchecked((int)(0x302)); + public const int WM_CLEAR = unchecked((int)(0x303)); + public const int WM_UNDO = unchecked((int)(0x304)); + public const int WM_RENDERFORMAT = unchecked((int)(0x305)); + public const int WM_RENDERALLFORMATS = unchecked((int)(0x306)); + public const int WM_DESTROYCLIPBOARD = unchecked((int)(0x307)); + public const int WM_DRAWCLIPBOARD = unchecked((int)(0x308)); + public const int WM_PAINTCLIPBOARD = unchecked((int)(0x309)); + public const int WM_VSCROLLCLIPBOARD = unchecked((int)(0x30A)); + public const int WM_SIZECLIPBOARD = unchecked((int)(0x30B)); + public const int WM_ASKCBFORMATNAME = unchecked((int)(0x30C)); + public const int WM_CHANGECBCHAIN = unchecked((int)(0x30D)); + public const int WM_HSCROLLCLIPBOARD = unchecked((int)(0x30E)); + public const int WM_QUERYNEWPALETTE = unchecked((int)(0x30F)); + public const int WM_PALETTEISCHANGING = unchecked((int)(0x310)); + public const int WM_PALETTECHANGED = unchecked((int)(0x311)); + public const int WM_HOTKEY = unchecked((int)(0x312)); + + public const int WM_PENWINFIRST = unchecked((int)(0x380)); + public const int WM_PENWINLAST = unchecked((int)(0x38F)); // NOTE: All Message Numbers below 0x0400 are RESERVED. // Private Window Messages Start Here: - public const int WM_USER = unchecked( (int)( 0x400 ) ); + public const int WM_USER = unchecked((int)(0x400)); // WM_SYNCTASK Commands - public const int ST_BEGINSWP = unchecked( (int)( 0 ) ); - public const int ST_ENDSWP = unchecked( (int)( 1 ) ); + public const int ST_BEGINSWP = unchecked((int)(0)); + public const int ST_ENDSWP = unchecked((int)(1)); // WM_NCHITTEST and MOUSEHOOKSTRUCT Mouse Position Codes - public const int HTERROR = unchecked( (int)( ( -2 ) ) ); - public const int HTTRANSPARENT = unchecked( (int)( ( -1 ) ) ); - public const int HTNOWHERE = unchecked( (int)( 0 ) ); - public const int HTCLIENT = unchecked( (int)( 1 ) ); - public const int HTCAPTION = unchecked( (int)( 2 ) ); - public const int HTSYSMENU = unchecked( (int)( 3 ) ); - public const int HTGROWBOX = unchecked( (int)( 4 ) ); - public const int HTSIZE = unchecked( (int)( HTGROWBOX ) ); - public const int HTMENU = unchecked( (int)( 5 ) ); - public const int HTHSCROLL = unchecked( (int)( 6 ) ); - public const int HTVSCROLL = unchecked( (int)( 7 ) ); - public const int HTMINBUTTON = unchecked( (int)( 8 ) ); - public const int HTMAXBUTTON = unchecked( (int)( 9 ) ); - public const int HTLEFT = unchecked( (int)( 10 ) ); - public const int HTRIGHT = unchecked( (int)( 11 ) ); - public const int HTTOP = unchecked( (int)( 12 ) ); - public const int HTTOPLEFT = unchecked( (int)( 13 ) ); - public const int HTTOPRIGHT = unchecked( (int)( 14 ) ); - public const int HTBOTTOM = unchecked( (int)( 15 ) ); - public const int HTBOTTOMLEFT = unchecked( (int)( 16 ) ); - public const int HTBOTTOMRIGHT = unchecked( (int)( 17 ) ); - public const int HTBORDER = unchecked( (int)( 18 ) ); - public const int HTREDUCE = unchecked( (int)( HTMINBUTTON ) ); - public const int HTZOOM = unchecked( (int)( HTMAXBUTTON ) ); - public const int HTSIZEFIRST = unchecked( (int)( HTLEFT ) ); - public const int HTSIZELAST = unchecked( (int)( HTBOTTOMRIGHT ) ); + public const int HTERROR = unchecked((int)((-2))); + public const int HTTRANSPARENT = unchecked((int)((-1))); + public const int HTNOWHERE = unchecked((int)(0)); + public const int HTCLIENT = unchecked((int)(1)); + public const int HTCAPTION = unchecked((int)(2)); + public const int HTSYSMENU = unchecked((int)(3)); + public const int HTGROWBOX = unchecked((int)(4)); + public const int HTSIZE = unchecked((int)(HTGROWBOX)); + public const int HTMENU = unchecked((int)(5)); + public const int HTHSCROLL = unchecked((int)(6)); + public const int HTVSCROLL = unchecked((int)(7)); + public const int HTMINBUTTON = unchecked((int)(8)); + public const int HTMAXBUTTON = unchecked((int)(9)); + public const int HTLEFT = unchecked((int)(10)); + public const int HTRIGHT = unchecked((int)(11)); + public const int HTTOP = unchecked((int)(12)); + public const int HTTOPLEFT = unchecked((int)(13)); + public const int HTTOPRIGHT = unchecked((int)(14)); + public const int HTBOTTOM = unchecked((int)(15)); + public const int HTBOTTOMLEFT = unchecked((int)(16)); + public const int HTBOTTOMRIGHT = unchecked((int)(17)); + public const int HTBORDER = unchecked((int)(18)); + public const int HTREDUCE = unchecked((int)(HTMINBUTTON)); + public const int HTZOOM = unchecked((int)(HTMAXBUTTON)); + public const int HTSIZEFIRST = unchecked((int)(HTLEFT)); + public const int HTSIZELAST = unchecked((int)(HTBOTTOMRIGHT)); // SendMessageTimeout values - public const int SMTO_NORMAL = unchecked( (int)( 0x0 ) ); - public const int SMTO_BLOCK = unchecked( (int)( 0x1 ) ); - public const int SMTO_ABORTIFHUNG = unchecked( (int)( 0x2 ) ); + public const int SMTO_NORMAL = unchecked((int)(0x0)); + public const int SMTO_BLOCK = unchecked((int)(0x1)); + public const int SMTO_ABORTIFHUNG = unchecked((int)(0x2)); // WM_MOUSEACTIVATE Return Codes - public const int MA_ACTIVATE = unchecked( (int)( 1 ) ); - public const int MA_ACTIVATEANDEAT = unchecked( (int)( 2 ) ); - public const int MA_NOACTIVATE = unchecked( (int)( 3 ) ); - public const int MA_NOACTIVATEANDEAT = unchecked( (int)( 4 ) ); + public const int MA_ACTIVATE = unchecked((int)(1)); + public const int MA_ACTIVATEANDEAT = unchecked((int)(2)); + public const int MA_NOACTIVATE = unchecked((int)(3)); + public const int MA_NOACTIVATEANDEAT = unchecked((int)(4)); - [DllImport( "user32", EntryPoint = "RegisterWindowMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegisterWindowMessage( string lpString ); + [DllImport("user32", EntryPoint = "RegisterWindowMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegisterWindowMessage(string lpString); // WM_SIZE message wParam values - public const int SIZE_RESTORED = unchecked( (int)( 0 ) ); - public const int SIZE_MINIMIZED = unchecked( (int)( 1 ) ); - public const int SIZE_MAXIMIZED = unchecked( (int)( 2 ) ); - public const int SIZE_MAXSHOW = unchecked( (int)( 3 ) ); - public const int SIZE_MAXHIDE = unchecked( (int)( 4 ) ); + public const int SIZE_RESTORED = unchecked((int)(0)); + public const int SIZE_MINIMIZED = unchecked((int)(1)); + public const int SIZE_MAXIMIZED = unchecked((int)(2)); + public const int SIZE_MAXSHOW = unchecked((int)(3)); + public const int SIZE_MAXHIDE = unchecked((int)(4)); // Obsolete constant names - public const int SIZENORMAL = unchecked( (int)( SIZE_RESTORED ) ); - public const int SIZEICONIC = unchecked( (int)( SIZE_MINIMIZED ) ); - public const int SIZEFULLSCREEN = unchecked( (int)( SIZE_MAXIMIZED ) ); - public const int SIZEZOOMSHOW = unchecked( (int)( SIZE_MAXSHOW ) ); - public const int SIZEZOOMHIDE = unchecked( (int)( SIZE_MAXHIDE ) ); + public const int SIZENORMAL = unchecked((int)(SIZE_RESTORED)); + public const int SIZEICONIC = unchecked((int)(SIZE_MINIMIZED)); + public const int SIZEFULLSCREEN = unchecked((int)(SIZE_MAXIMIZED)); + public const int SIZEZOOMSHOW = unchecked((int)(SIZE_MAXSHOW)); + public const int SIZEZOOMHIDE = unchecked((int)(SIZE_MAXHIDE)); // WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct WINDOWPOS { public IntPtr hwnd; @@ -8271,120 +8271,120 @@ public struct WINDOWPOS } // WM_NCCALCSIZE return flags - public const int WVR_ALIGNTOP = unchecked( (int)( 0x10 ) ); - public const int WVR_ALIGNLEFT = unchecked( (int)( 0x20 ) ); - public const int WVR_ALIGNBOTTOM = unchecked( (int)( 0x40 ) ); - public const int WVR_ALIGNRIGHT = unchecked( (int)( 0x80 ) ); - public const int WVR_HREDRAW = unchecked( (int)( 0x100 ) ); - public const int WVR_VREDRAW = unchecked( (int)( 0x200 ) ); - public const int WVR_REDRAW = unchecked( (int)( ( WVR_HREDRAW | WVR_VREDRAW ) ) ); - public const int WVR_VALIDRECTS = unchecked( (int)( 0x400 ) ); + public const int WVR_ALIGNTOP = unchecked((int)(0x10)); + public const int WVR_ALIGNLEFT = unchecked((int)(0x20)); + public const int WVR_ALIGNBOTTOM = unchecked((int)(0x40)); + public const int WVR_ALIGNRIGHT = unchecked((int)(0x80)); + public const int WVR_HREDRAW = unchecked((int)(0x100)); + public const int WVR_VREDRAW = unchecked((int)(0x200)); + public const int WVR_REDRAW = unchecked((int)((WVR_HREDRAW | WVR_VREDRAW))); + public const int WVR_VALIDRECTS = unchecked((int)(0x400)); // Key State Masks for Mouse Messages - public const int MK_LBUTTON = unchecked( (int)( 0x1 ) ); - public const int MK_RBUTTON = unchecked( (int)( 0x2 ) ); - public const int MK_SHIFT = unchecked( (int)( 0x4 ) ); - public const int MK_CONTROL = unchecked( (int)( 0x8 ) ); - public const int MK_MBUTTON = unchecked( (int)( 0x10 ) ); + public const int MK_LBUTTON = unchecked((int)(0x1)); + public const int MK_RBUTTON = unchecked((int)(0x2)); + public const int MK_SHIFT = unchecked((int)(0x4)); + public const int MK_CONTROL = unchecked((int)(0x8)); + public const int MK_MBUTTON = unchecked((int)(0x10)); // Window Styles - public const int WS_OVERLAPPED = unchecked( (int)( 0x0 ) ); - public const int WS_POPUP = unchecked( (int)( 0x80000000 ) ); - public const int WS_CHILD = unchecked( (int)( 0x40000000 ) ); - public const int WS_MINIMIZE = unchecked( (int)( 0x20000000 ) ); - public const int WS_VISIBLE = unchecked( (int)( 0x10000000 ) ); - public const int WS_DISABLED = unchecked( (int)( 0x8000000 ) ); - public const int WS_CLIPSIBLINGS = unchecked( (int)( 0x4000000 ) ); - public const int WS_CLIPCHILDREN = unchecked( (int)( 0x2000000 ) ); - public const int WS_MAXIMIZE = unchecked( (int)( 0x1000000 ) ); - public const int WS_CAPTION = unchecked( (int)( 0xC00000 ) );// WS_BORDER Or WS_DLGFRAME - public const int WS_BORDER = unchecked( (int)( 0x800000 ) ); - public const int WS_DLGFRAME = unchecked( (int)( 0x400000 ) ); - public const int WS_VSCROLL = unchecked( (int)( 0x200000 ) ); - public const int WS_HSCROLL = unchecked( (int)( 0x100000 ) ); - public const int WS_SYSMENU = unchecked( (int)( 0x80000 ) ); - public const int WS_THICKFRAME = unchecked( (int)( 0x40000 ) ); - public const int WS_GROUP = unchecked( (int)( 0x20000 ) ); - public const int WS_TABSTOP = unchecked( (int)( 0x10000 ) ); - - public const int WS_MINIMIZEBOX = unchecked( (int)( 0x20000 ) ); - public const int WS_MAXIMIZEBOX = unchecked( (int)( 0x10000 ) ); - - public const int WS_TILED = unchecked( (int)( WS_OVERLAPPED ) ); - public const int WS_ICONIC = unchecked( (int)( WS_MINIMIZE ) ); - public const int WS_SIZEBOX = unchecked( (int)( WS_THICKFRAME ) ); - public const int WS_OVERLAPPEDWINDOW = unchecked( (int)( ( WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX ) ) ); - public const int WS_TILEDWINDOW = unchecked( (int)( WS_OVERLAPPEDWINDOW ) ); + public const int WS_OVERLAPPED = unchecked((int)(0x0)); + public const int WS_POPUP = unchecked((int)(0x80000000)); + public const int WS_CHILD = unchecked((int)(0x40000000)); + public const int WS_MINIMIZE = unchecked((int)(0x20000000)); + public const int WS_VISIBLE = unchecked((int)(0x10000000)); + public const int WS_DISABLED = unchecked((int)(0x8000000)); + public const int WS_CLIPSIBLINGS = unchecked((int)(0x4000000)); + public const int WS_CLIPCHILDREN = unchecked((int)(0x2000000)); + public const int WS_MAXIMIZE = unchecked((int)(0x1000000)); + public const int WS_CAPTION = unchecked((int)(0xC00000));// WS_BORDER Or WS_DLGFRAME + public const int WS_BORDER = unchecked((int)(0x800000)); + public const int WS_DLGFRAME = unchecked((int)(0x400000)); + public const int WS_VSCROLL = unchecked((int)(0x200000)); + public const int WS_HSCROLL = unchecked((int)(0x100000)); + public const int WS_SYSMENU = unchecked((int)(0x80000)); + public const int WS_THICKFRAME = unchecked((int)(0x40000)); + public const int WS_GROUP = unchecked((int)(0x20000)); + public const int WS_TABSTOP = unchecked((int)(0x10000)); + + public const int WS_MINIMIZEBOX = unchecked((int)(0x20000)); + public const int WS_MAXIMIZEBOX = unchecked((int)(0x10000)); + + public const int WS_TILED = unchecked((int)(WS_OVERLAPPED)); + public const int WS_ICONIC = unchecked((int)(WS_MINIMIZE)); + public const int WS_SIZEBOX = unchecked((int)(WS_THICKFRAME)); + public const int WS_OVERLAPPEDWINDOW = unchecked((int)((WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX))); + public const int WS_TILEDWINDOW = unchecked((int)(WS_OVERLAPPEDWINDOW)); // // Common Window Styles // / - public const int WS_POPUPWINDOW = unchecked( (int)( ( WS_POPUP | WS_BORDER | WS_SYSMENU ) ) ); + public const int WS_POPUPWINDOW = unchecked((int)((WS_POPUP | WS_BORDER | WS_SYSMENU))); - public const int WS_CHILDWINDOW = unchecked( (int)( ( WS_CHILD ) ) ); + public const int WS_CHILDWINDOW = unchecked((int)((WS_CHILD))); // Extended Window Styles - public const int WS_EX_DLGMODALFRAME = unchecked( (int)( 0x1 ) ); - public const int WS_EX_NOPARENTNOTIFY = unchecked( (int)( 0x4 ) ); - public const int WS_EX_TOPMOST = unchecked( (int)( 0x8 ) ); - public const int WS_EX_ACCEPTFILES = unchecked( (int)( 0x10 ) ); - public const int WS_EX_TRANSPARENT = unchecked( (int)( 0x20 ) ); + public const int WS_EX_DLGMODALFRAME = unchecked((int)(0x1)); + public const int WS_EX_NOPARENTNOTIFY = unchecked((int)(0x4)); + public const int WS_EX_TOPMOST = unchecked((int)(0x8)); + public const int WS_EX_ACCEPTFILES = unchecked((int)(0x10)); + public const int WS_EX_TRANSPARENT = unchecked((int)(0x20)); // Class styles - public const int CS_VREDRAW = unchecked( (int)( 0x1 ) ); - public const int CS_HREDRAW = unchecked( (int)( 0x2 ) ); - public const int CS_KEYCVTWINDOW = unchecked( (int)( 0x4 ) ); - public const int CS_DBLCLKS = unchecked( (int)( 0x8 ) ); - public const int CS_OWNDC = unchecked( (int)( 0x20 ) ); - public const int CS_CLASSDC = unchecked( (int)( 0x40 ) ); - public const int CS_PARENTDC = unchecked( (int)( 0x80 ) ); - public const int CS_NOKEYCVT = unchecked( (int)( 0x100 ) ); - public const int CS_NOCLOSE = unchecked( (int)( 0x200 ) ); - public const int CS_SAVEBITS = unchecked( (int)( 0x800 ) ); - public const int CS_BYTEALIGNCLIENT = unchecked( (int)( 0x1000 ) ); - public const int CS_BYTEALIGNWINDOW = unchecked( (int)( 0x2000 ) ); - public const int CS_PUBLICCLASS = unchecked( (int)( 0x4000 ) ); + public const int CS_VREDRAW = unchecked((int)(0x1)); + public const int CS_HREDRAW = unchecked((int)(0x2)); + public const int CS_KEYCVTWINDOW = unchecked((int)(0x4)); + public const int CS_DBLCLKS = unchecked((int)(0x8)); + public const int CS_OWNDC = unchecked((int)(0x20)); + public const int CS_CLASSDC = unchecked((int)(0x40)); + public const int CS_PARENTDC = unchecked((int)(0x80)); + public const int CS_NOKEYCVT = unchecked((int)(0x100)); + public const int CS_NOCLOSE = unchecked((int)(0x200)); + public const int CS_SAVEBITS = unchecked((int)(0x800)); + public const int CS_BYTEALIGNCLIENT = unchecked((int)(0x1000)); + public const int CS_BYTEALIGNWINDOW = unchecked((int)(0x2000)); + public const int CS_PUBLICCLASS = unchecked((int)(0x4000)); // Predefined Clipboard Formats - public const int CF_TEXT = unchecked( (int)( 1 ) ); - public const int CF_BITMAP = unchecked( (int)( 2 ) ); - public const int CF_METAFILEPICT = unchecked( (int)( 3 ) ); - public const int CF_SYLK = unchecked( (int)( 4 ) ); - public const int CF_DIF = unchecked( (int)( 5 ) ); - public const int CF_TIFF = unchecked( (int)( 6 ) ); - public const int CF_OEMTEXT = unchecked( (int)( 7 ) ); - public const int CF_DIB = unchecked( (int)( 8 ) ); - public const int CF_PALETTE = unchecked( (int)( 9 ) ); - public const int CF_PENDATA = unchecked( (int)( 10 ) ); - public const int CF_RIFF = unchecked( (int)( 11 ) ); - public const int CF_WAVE = unchecked( (int)( 12 ) ); - public const int CF_UNICODETEXT = unchecked( (int)( 13 ) ); - public const int CF_ENHMETAFILE = unchecked( (int)( 14 ) ); - - public const int CF_OWNERDISPLAY = unchecked( (int)( 0x80 ) ); - public const int CF_DSPTEXT = unchecked( (int)( 0x81 ) ); - public const int CF_DSPBITMAP = unchecked( (int)( 0x82 ) ); - public const int CF_DSPMETAFILEPICT = unchecked( (int)( 0x83 ) ); - public const int CF_DSPENHMETAFILE = unchecked( (int)( 0x8E ) ); + public const int CF_TEXT = unchecked((int)(1)); + public const int CF_BITMAP = unchecked((int)(2)); + public const int CF_METAFILEPICT = unchecked((int)(3)); + public const int CF_SYLK = unchecked((int)(4)); + public const int CF_DIF = unchecked((int)(5)); + public const int CF_TIFF = unchecked((int)(6)); + public const int CF_OEMTEXT = unchecked((int)(7)); + public const int CF_DIB = unchecked((int)(8)); + public const int CF_PALETTE = unchecked((int)(9)); + public const int CF_PENDATA = unchecked((int)(10)); + public const int CF_RIFF = unchecked((int)(11)); + public const int CF_WAVE = unchecked((int)(12)); + public const int CF_UNICODETEXT = unchecked((int)(13)); + public const int CF_ENHMETAFILE = unchecked((int)(14)); + + public const int CF_OWNERDISPLAY = unchecked((int)(0x80)); + public const int CF_DSPTEXT = unchecked((int)(0x81)); + public const int CF_DSPBITMAP = unchecked((int)(0x82)); + public const int CF_DSPMETAFILEPICT = unchecked((int)(0x83)); + public const int CF_DSPENHMETAFILE = unchecked((int)(0x8E)); // "Private" formats don't get GlobalFree()'d - public const int CF_PRIVATEFIRST = unchecked( (int)( 0x200 ) ); - public const int CF_PRIVATELAST = unchecked( (int)( 0x2FF ) ); + public const int CF_PRIVATEFIRST = unchecked((int)(0x200)); + public const int CF_PRIVATELAST = unchecked((int)(0x2FF)); // "GDIOBJ" formats do get DeleteObject()'d - public const int CF_GDIOBJFIRST = unchecked( (int)( 0x300 ) ); - public const int CF_GDIOBJLAST = unchecked( (int)( 0x3FF ) ); + public const int CF_GDIOBJFIRST = unchecked((int)(0x300)); + public const int CF_GDIOBJLAST = unchecked((int)(0x3FF)); // Defines for the fVirt field of the Accelerator table structure. - public const bool FVIRTKEY = unchecked( (bool)( true ) );// Assumed to be == TRUE - public const int FNOINVERT = unchecked( (int)( 0x2 ) ); - public const int FSHIFT = unchecked( (int)( 0x4 ) ); - public const int FCONTROL = unchecked( (int)( 0x8 ) ); - public const int FALT = unchecked( (int)( 0x10 ) ); + public const bool FVIRTKEY = unchecked((bool)(true));// Assumed to be == TRUE + public const int FNOINVERT = unchecked((int)(0x2)); + public const int FSHIFT = unchecked((int)(0x4)); + public const int FCONTROL = unchecked((int)(0x8)); + public const int FALT = unchecked((int)(0x10)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ACCEL { public byte fVirt; @@ -8392,7 +8392,7 @@ public struct ACCEL public int cmd; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PAINTSTRUCT { public IntPtr hdc; @@ -8403,7 +8403,7 @@ public struct PAINTSTRUCT public int rgbReserved; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CREATESTRUCT { public IntPtr lpCreateParams; @@ -8421,14 +8421,14 @@ public struct CREATESTRUCT } // HCBT_CREATEWND parameters pointed to by lParam - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CBT_CREATEWND { public CREATESTRUCT lpcs; public IntPtr hWndInsertAfter; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct WINDOWPLACEMENT { public int Length; @@ -8439,29 +8439,29 @@ public struct WINDOWPLACEMENT public RECT rcNormalPosition; } - public const int WPF_SETMINPOSITION = unchecked( (int)( 0x1 ) ); - public const int WPF_RESTORETOMAXIMIZED = unchecked( (int)( 0x2 ) ); + public const int WPF_SETMINPOSITION = unchecked((int)(0x1)); + public const int WPF_RESTORETOMAXIMIZED = unchecked((int)(0x2)); // Owner draw control types - public const int ODT_MENU = unchecked( (int)( 1 ) ); - public const int ODT_LISTBOX = unchecked( (int)( 2 ) ); - public const int ODT_COMBOBOX = unchecked( (int)( 3 ) ); - public const int ODT_BUTTON = unchecked( (int)( 4 ) ); + public const int ODT_MENU = unchecked((int)(1)); + public const int ODT_LISTBOX = unchecked((int)(2)); + public const int ODT_COMBOBOX = unchecked((int)(3)); + public const int ODT_BUTTON = unchecked((int)(4)); // Owner draw actions - public const int ODA_DRAWENTIRE = unchecked( (int)( 0x1 ) ); - public const int ODA_SELECT = unchecked( (int)( 0x2 ) ); - public const int ODA_FOCUS = unchecked( (int)( 0x4 ) ); + public const int ODA_DRAWENTIRE = unchecked((int)(0x1)); + public const int ODA_SELECT = unchecked((int)(0x2)); + public const int ODA_FOCUS = unchecked((int)(0x4)); // Owner draw state - public const int ODS_SELECTED = unchecked( (int)( 0x1 ) ); - public const int ODS_GRAYED = unchecked( (int)( 0x2 ) ); - public const int ODS_DISABLED = unchecked( (int)( 0x4 ) ); - public const int ODS_CHECKED = unchecked( (int)( 0x8 ) ); - public const int ODS_FOCUS = unchecked( (int)( 0x10 ) ); + public const int ODS_SELECTED = unchecked((int)(0x1)); + public const int ODS_GRAYED = unchecked((int)(0x2)); + public const int ODS_DISABLED = unchecked((int)(0x4)); + public const int ODS_CHECKED = unchecked((int)(0x8)); + public const int ODS_FOCUS = unchecked((int)(0x10)); // MEASUREITEMSTRUCT for ownerdraw - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MEASUREITEMSTRUCT { public int CtlType; @@ -8473,7 +8473,7 @@ public struct MEASUREITEMSTRUCT } // DRAWITEMSTRUCT for ownerdraw - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DRAWITEMSTRUCT { public int CtlType; @@ -8488,7 +8488,7 @@ public struct DRAWITEMSTRUCT } // DELETEITEMSTRUCT for ownerdraw - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DELETEITEMSTRUCT { public int CtlType; @@ -8499,7 +8499,7 @@ public struct DELETEITEMSTRUCT } // COMPAREITEMSTRUCT for ownerdraw sorting - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct COMPAREITEMSTRUCT { public int CtlType; @@ -8513,89 +8513,89 @@ public struct COMPAREITEMSTRUCT // Message Function Templates - [DllImport( "user32", EntryPoint = "GetMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetMessage( ref MSG lpMsg, IntPtr hWnd, int wMsgFilterMin, int wMsgFilterMax ); + [DllImport("user32", EntryPoint = "GetMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetMessage(ref MSG lpMsg, IntPtr hWnd, int wMsgFilterMin, int wMsgFilterMax); - [DllImport( "user32", EntryPoint = "TranslateMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int TranslateMessage( ref MSG lpMsg ); + [DllImport("user32", EntryPoint = "TranslateMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int TranslateMessage(ref MSG lpMsg); - [DllImport( "user32", EntryPoint = "DispatchMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DispatchMessage( ref MSG lpMsg ); + [DllImport("user32", EntryPoint = "DispatchMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DispatchMessage(ref MSG lpMsg); - [DllImport( "user32", EntryPoint = "PeekMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PeekMessage( ref MSG lpMsg, IntPtr hWnd, int wMsgFilterMin, int wMsgFilterMax, int wRemoveMsg ); + [DllImport("user32", EntryPoint = "PeekMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PeekMessage(ref MSG lpMsg, IntPtr hWnd, int wMsgFilterMin, int wMsgFilterMax, int wRemoveMsg); // PeekMessage() Options - public const int PM_NOREMOVE = unchecked( (int)( 0x0 ) ); - public const int PM_REMOVE = unchecked( (int)( 0x1 ) ); - public const int PM_NOYIELD = unchecked( (int)( 0x2 ) ); + public const int PM_NOREMOVE = unchecked((int)(0x0)); + public const int PM_REMOVE = unchecked((int)(0x1)); + public const int PM_NOYIELD = unchecked((int)(0x2)); - [DllImport( "user32", EntryPoint = "RegisterHotKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegisterHotKey( IntPtr hWnd, int id, int fsModifiers, int vk ); + [DllImport("user32", EntryPoint = "RegisterHotKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegisterHotKey(IntPtr hWnd, int id, int fsModifiers, int vk); - [DllImport( "user32", EntryPoint = "UnregisterHotKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int UnregisterHotKey( IntPtr hWnd, int id ); + [DllImport("user32", EntryPoint = "UnregisterHotKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int UnregisterHotKey(IntPtr hWnd, int id); - public const int MOD_ALT = unchecked( (int)( 0x1 ) ); - public const int MOD_CONTROL = unchecked( (int)( 0x2 ) ); - public const int MOD_SHIFT = unchecked( (int)( 0x4 ) ); + public const int MOD_ALT = unchecked((int)(0x1)); + public const int MOD_CONTROL = unchecked((int)(0x2)); + public const int MOD_SHIFT = unchecked((int)(0x4)); - public const int IDHOT_SNAPWINDOW = unchecked( (int)( ( -1 ) ) );// SHIFT-PRINTSCRN - public const int IDHOT_SNAPDESKTOP = unchecked( (int)( ( -2 ) ) );// PRINTSCRN + public const int IDHOT_SNAPWINDOW = unchecked((int)((-1)));// SHIFT-PRINTSCRN + public const int IDHOT_SNAPDESKTOP = unchecked((int)((-2)));// PRINTSCRN - public const int EWX_LOGOFF = unchecked( (int)( 0 ) ); - public const int EWX_SHUTDOWN = unchecked( (int)( 1 ) ); - public const int EWX_REBOOT = unchecked( (int)( 2 ) ); - public const int EWX_FORCE = unchecked( (int)( 4 ) ); + public const int EWX_LOGOFF = unchecked((int)(0)); + public const int EWX_SHUTDOWN = unchecked((int)(1)); + public const int EWX_REBOOT = unchecked((int)(2)); + public const int EWX_FORCE = unchecked((int)(4)); - public const int READAPI = unchecked( (int)( 0 ) );// Flags for _lopen - public const int WRITEAPI = unchecked( (int)( 1 ) ); - public const int READ_WRITE = unchecked( (int)( 2 ) ); + public const int READAPI = unchecked((int)(0));// Flags for _lopen + public const int WRITEAPI = unchecked((int)(1)); + public const int READ_WRITE = unchecked((int)(2)); - [DllImport( "user32", EntryPoint = "ExitWindows", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ExitWindows( int dwReserved, int uReturnCode ); + [DllImport("user32", EntryPoint = "ExitWindows", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ExitWindows(int dwReserved, int uReturnCode); - [DllImport( "user32", EntryPoint = "ExitWindowsEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ExitWindowsEx( int uFlags, int dwReserved ); + [DllImport("user32", EntryPoint = "ExitWindowsEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ExitWindowsEx(int uFlags, int dwReserved); - [DllImport( "user32", EntryPoint = "SwapMouseButton", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SwapMouseButton( int bSwap ); + [DllImport("user32", EntryPoint = "SwapMouseButton", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SwapMouseButton(int bSwap); - [DllImport( "user32", EntryPoint = "GetMessagePos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "GetMessagePos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetMessagePos(); - [DllImport( "user32", EntryPoint = "GetMessageTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "GetMessageTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetMessageTime(); - [DllImport( "user32", EntryPoint = "GetMessageExtraInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "GetMessageExtraInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetMessageExtraInfo(); - [DllImport( "user32", EntryPoint = "SendMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SendMessage( IntPtr hWnd, int wMsg, int wParam, object lParam ); + [DllImport("user32", EntryPoint = "SendMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SendMessage(IntPtr hWnd, int wMsg, int wParam, object lParam); - [DllImport( "user32", EntryPoint = "SendMessageTimeout", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SendMessageTimeout( IntPtr hWnd, int msg, int wParam, int lParam, int fuFlags, int uTimeout, IntPtr lpdwResult ); + [DllImport("user32", EntryPoint = "SendMessageTimeout", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SendMessageTimeout(IntPtr hWnd, int msg, int wParam, int lParam, int fuFlags, int uTimeout, IntPtr lpdwResult); - [DllImport( "user32", EntryPoint = "SendNotifyMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SendNotifyMessage( IntPtr hWnd, int msg, int wParam, int lParam ); + [DllImport("user32", EntryPoint = "SendNotifyMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SendNotifyMessage(IntPtr hWnd, int msg, int wParam, int lParam); - [DllImport( "user32", EntryPoint = "SendMessageCallback", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SendMessageCallback( IntPtr hWnd, int msg, int wParam, int lParam, IntPtr lpResultCallBack, int dwData ); + [DllImport("user32", EntryPoint = "SendMessageCallback", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SendMessageCallback(IntPtr hWnd, int msg, int wParam, int lParam, IntPtr lpResultCallBack, int dwData); - [DllImport( "user32", EntryPoint = "PostMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PostMessage( IntPtr hWnd, int wMsg, int wParam, int lParam ); + [DllImport("user32", EntryPoint = "PostMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PostMessage(IntPtr hWnd, int wMsg, int wParam, int lParam); - [DllImport( "user32", EntryPoint = "PostThreadMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PostThreadMessage( int idThread, int msg, int wParam, int lParam ); + [DllImport("user32", EntryPoint = "PostThreadMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PostThreadMessage(int idThread, int msg, int wParam, int lParam); // Special HWND value for use with PostMessage and SendMessage - public const int HWND_BROADCAST = unchecked( (int)( 0xFFFF ) ); + public const int HWND_BROADCAST = unchecked((int)(0xFFFF)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct WNDCLASS { public int style; @@ -8611,161 +8611,161 @@ public struct WNDCLASS } - [DllImport( "user32", EntryPoint = "AttachThreadInput", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AttachThreadInput( int idAttach, int idAttachTo, int fAttach ); + [DllImport("user32", EntryPoint = "AttachThreadInput", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AttachThreadInput(int idAttach, int idAttachTo, int fAttach); - [DllImport( "user32", EntryPoint = "ReplyMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ReplyMessage( int lReply ); + [DllImport("user32", EntryPoint = "ReplyMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ReplyMessage(int lReply); - [DllImport( "user32", EntryPoint = "WaitMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "WaitMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int WaitMessage(); - [DllImport( "user32", EntryPoint = "WaitForInputIdle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WaitForInputIdle( IntPtr hProcess, int dwMilliseconds ); + [DllImport("user32", EntryPoint = "WaitForInputIdle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WaitForInputIdle(IntPtr hProcess, int dwMilliseconds); - [DllImport( "user32", EntryPoint = "DefWindowProc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DefWindowProc( IntPtr hWnd, int wMsg, int wParam, int lParam ); + [DllImport("user32", EntryPoint = "DefWindowProc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DefWindowProc(IntPtr hWnd, int wMsg, int wParam, int lParam); - [DllImport( "user32", EntryPoint = "PostQuitMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void PostQuitMessage( int nExitCode ); + [DllImport("user32", EntryPoint = "PostQuitMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void PostQuitMessage(int nExitCode); - [DllImport( "user32", EntryPoint = "InSendMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "InSendMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int InSendMessage(); - [DllImport( "COMCTL32", EntryPoint = "InitCommonControls", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("COMCTL32", EntryPoint = "InitCommonControls", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int InitCommonControls(); - [DllImport( "COMCTL32", EntryPoint = "ImageList_Create", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImageList_Create( int MinCx, int MinCy, int flags, int cInitial, int cGrow ); + [DllImport("COMCTL32", EntryPoint = "ImageList_Create", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImageList_Create(int MinCx, int MinCy, int flags, int cInitial, int cGrow); - [DllImport( "COMCTL32", EntryPoint = "ImageList_AddIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImageList_AddIcon( IntPtr himl, IntPtr hIcon ); + [DllImport("COMCTL32", EntryPoint = "ImageList_AddIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImageList_AddIcon(IntPtr himl, IntPtr hIcon); - [DllImport( "COMCTL32", EntryPoint = "ImageList_GetIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImageList_GetIcon( int HIMAGELIST, int ImgIndex, IntPtr hbmMask ); + [DllImport("COMCTL32", EntryPoint = "ImageList_GetIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImageList_GetIcon(int HIMAGELIST, int ImgIndex, IntPtr hbmMask); - [DllImport( "COMCTL32", EntryPoint = "ImageList_Draw", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImageList_Draw( int HIMAGELIST, int ImgIndex, IntPtr hDCDest, int xDest, int yDest, int lStyle ); + [DllImport("COMCTL32", EntryPoint = "ImageList_Draw", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImageList_Draw(int HIMAGELIST, int ImgIndex, IntPtr hDCDest, int xDest, int yDest, int lStyle); - [DllImport( "user32", EntryPoint = "GetDoubleClickTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "GetDoubleClickTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetDoubleClickTime(); - [DllImport( "user32", EntryPoint = "SetDoubleClickTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetDoubleClickTime( int wCount ); + [DllImport("user32", EntryPoint = "SetDoubleClickTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetDoubleClickTime(int wCount); - [DllImport( "user32", EntryPoint = "RegisterClass", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegisterClass( WNDCLASS Class ); + [DllImport("user32", EntryPoint = "RegisterClass", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegisterClass(WNDCLASS Class); - [DllImport( "user32", EntryPoint = "UnregisterClass", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int UnregisterClass( string lpClassName, IntPtr hInstance ); + [DllImport("user32", EntryPoint = "UnregisterClass", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int UnregisterClass(string lpClassName, IntPtr hInstance); - [DllImport( "user32", EntryPoint = "GetClassInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetClassInfo( IntPtr hInstance, string lpClassName, ref WNDCLASS lpWndClass ); + [DllImport("user32", EntryPoint = "GetClassInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetClassInfo(IntPtr hInstance, string lpClassName, ref WNDCLASS lpWndClass); - public const int CW_USEDEFAULT = unchecked( (int)( 0x80000000 ) ); - public const int HWND_DESKTOP = unchecked( (int)( 0 ) ); + public const int CW_USEDEFAULT = unchecked((int)(0x80000000)); + public const int HWND_DESKTOP = unchecked((int)(0)); - [DllImport( "user32", EntryPoint = "CreateWindowEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateWindowEx( int dwExStyle, string lpClassName, string lpWindowName, int dwStyle, int x, int y, int nWidth, int nHeight, IntPtr hWndParent, IntPtr hMenu, IntPtr hInstance, IntPtr lpParam ); + [DllImport("user32", EntryPoint = "CreateWindowEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateWindowEx(int dwExStyle, string lpClassName, string lpWindowName, int dwStyle, int x, int y, int nWidth, int nHeight, IntPtr hWndParent, IntPtr hMenu, IntPtr hInstance, IntPtr lpParam); - [DllImport( "user32", EntryPoint = "IsWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsWindow( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "IsWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsWindow(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "IsMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsMenu( IntPtr hMenu ); + [DllImport("user32", EntryPoint = "IsMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsMenu(IntPtr hMenu); - [DllImport( "user32", EntryPoint = "IsChild", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsChild( IntPtr hWndParent, IntPtr hWnd ); + [DllImport("user32", EntryPoint = "IsChild", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsChild(IntPtr hWndParent, IntPtr hWnd); - [DllImport( "user32", EntryPoint = "DestroyWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DestroyWindow( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "DestroyWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DestroyWindow(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "AnimateWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern bool AnimateWindow( IntPtr hWnd, uint time, AnimateStyles flags ); + [DllImport("user32", EntryPoint = "AnimateWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern bool AnimateWindow(IntPtr hWnd, uint time, AnimateStyles flags); - [DllImport( "user32", EntryPoint = "ShowWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ShowWindow( IntPtr hWnd, ShowWindowCommands nCmdShow ); + [DllImport("user32", EntryPoint = "ShowWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ShowWindow(IntPtr hWnd, ShowWindowCommands nCmdShow); - [DllImport( "user32", EntryPoint = "FlashWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FlashWindow( IntPtr hWnd, int bInvert ); + [DllImport("user32", EntryPoint = "FlashWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FlashWindow(IntPtr hWnd, int bInvert); - [DllImport( "user32", EntryPoint = "ShowOwnedPopups", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ShowOwnedPopups( IntPtr hWnd, int fShow ); + [DllImport("user32", EntryPoint = "ShowOwnedPopups", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ShowOwnedPopups(IntPtr hWnd, int fShow); - [DllImport( "user32", EntryPoint = "OpenIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenIcon( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "OpenIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenIcon(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "CloseWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CloseWindow( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "CloseWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CloseWindow(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "MoveWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MoveWindow( IntPtr hWnd, int x, int y, int nWidth, int nHeight, int bRepaint ); + [DllImport("user32", EntryPoint = "MoveWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MoveWindow(IntPtr hWnd, int x, int y, int nWidth, int nHeight, int bRepaint); - [DllImport( "user32", EntryPoint = "SetWindowPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetWindowPos( IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, int wFlags ); + [DllImport("user32", EntryPoint = "SetWindowPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, int wFlags); - [DllImport( "user32", EntryPoint = "GetWindowPlacement", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWindowPlacement( IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl ); + [DllImport("user32", EntryPoint = "GetWindowPlacement", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl); - [DllImport( "user32", EntryPoint = "SetWindowPlacement", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetWindowPlacement( IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl ); + [DllImport("user32", EntryPoint = "SetWindowPlacement", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl); - [DllImport( "user32", EntryPoint = "BeginDeferWindowPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int BeginDeferWindowPos( int nNumWindows ); + [DllImport("user32", EntryPoint = "BeginDeferWindowPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int BeginDeferWindowPos(int nNumWindows); - [DllImport( "user32", EntryPoint = "DeferWindowPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeferWindowPos( IntPtr hWinPosInfo, IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, int wFlags ); + [DllImport("user32", EntryPoint = "DeferWindowPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeferWindowPos(IntPtr hWinPosInfo, IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, int wFlags); - [DllImport( "user32", EntryPoint = "EndDeferWindowPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EndDeferWindowPos( IntPtr hWinPosInfo ); + [DllImport("user32", EntryPoint = "EndDeferWindowPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EndDeferWindowPos(IntPtr hWinPosInfo); - [DllImport( "user32", EntryPoint = "IsWindowVisible", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsWindowVisible( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "IsWindowVisible", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsWindowVisible(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "IsIconic", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsIconic( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "IsIconic", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsIconic(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "AnyPopup", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "AnyPopup", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int AnyPopup(); - [DllImport( "user32", EntryPoint = "BringWindowToTop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int BringWindowToTop( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "BringWindowToTop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int BringWindowToTop(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "IsZoomed", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsZoomed( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "IsZoomed", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsZoomed(IntPtr hWnd); // SetWindowPos Flags - public const int SWP_NOSIZE = unchecked( (int)( 0x1 ) ); - public const int SWP_NOMOVE = unchecked( (int)( 0x2 ) ); - public const int SWP_NOZORDER = unchecked( (int)( 0x4 ) ); - public const int SWP_NOREDRAW = unchecked( (int)( 0x8 ) ); - public const int SWP_NOACTIVATE = unchecked( (int)( 0x10 ) ); - public const int SWP_FRAMECHANGED = unchecked( (int)( 0x20 ) );// The frame changed: send WM_NCCALCSIZE - public const int SWP_SHOWWINDOW = unchecked( (int)( 0x40 ) ); - public const int SWP_HIDEWINDOW = unchecked( (int)( 0x80 ) ); - public const int SWP_NOCOPYBITS = unchecked( (int)( 0x100 ) ); - public const int SWP_NOOWNERZORDER = unchecked( (int)( 0x200 ) );// Don't do owner Z ordering - - public const int SWP_DRAWFRAME = unchecked( (int)( SWP_FRAMECHANGED ) ); - public const int SWP_NOREPOSITION = unchecked( (int)( SWP_NOOWNERZORDER ) ); + public const int SWP_NOSIZE = unchecked((int)(0x1)); + public const int SWP_NOMOVE = unchecked((int)(0x2)); + public const int SWP_NOZORDER = unchecked((int)(0x4)); + public const int SWP_NOREDRAW = unchecked((int)(0x8)); + public const int SWP_NOACTIVATE = unchecked((int)(0x10)); + public const int SWP_FRAMECHANGED = unchecked((int)(0x20));// The frame changed: send WM_NCCALCSIZE + public const int SWP_SHOWWINDOW = unchecked((int)(0x40)); + public const int SWP_HIDEWINDOW = unchecked((int)(0x80)); + public const int SWP_NOCOPYBITS = unchecked((int)(0x100)); + public const int SWP_NOOWNERZORDER = unchecked((int)(0x200));// Don't do owner Z ordering + + public const int SWP_DRAWFRAME = unchecked((int)(SWP_FRAMECHANGED)); + public const int SWP_NOREPOSITION = unchecked((int)(SWP_NOOWNERZORDER)); // SetWindowPos() hwndInsertAfter values - public const int HWND_TOP = unchecked( (int)( 0 ) ); - public const int HWND_BOTTOM = unchecked( (int)( 1 ) ); - public const int HWND_TOPMOST = unchecked( (int)( -1 ) ); - public const int HWND_NOTOPMOST = unchecked( (int)( -2 ) ); + public const int HWND_TOP = unchecked((int)(0)); + public const int HWND_BOTTOM = unchecked((int)(1)); + public const int HWND_TOPMOST = unchecked((int)(-1)); + public const int HWND_NOTOPMOST = unchecked((int)(-2)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DLGTEMPLATE { public int style; @@ -8777,7 +8777,7 @@ public struct DLGTEMPLATE public int cy; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DLGITEMTEMPLATE { public int style; @@ -8790,983 +8790,983 @@ public struct DLGITEMTEMPLATE } - [DllImport( "user32", EntryPoint = "EndDialog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EndDialog( IntPtr hDlg, int nResult ); + [DllImport("user32", EntryPoint = "EndDialog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EndDialog(IntPtr hDlg, int nResult); - [DllImport( "user32", EntryPoint = "GetDlgItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetDlgItem( IntPtr hDlg, int nIDDlgItem ); + [DllImport("user32", EntryPoint = "GetDlgItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetDlgItem(IntPtr hDlg, int nIDDlgItem); - [DllImport( "user32", EntryPoint = "SetDlgItemInt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetDlgItemInt( IntPtr hDlg, int nIDDlgItem, int wValue, int bSigned ); + [DllImport("user32", EntryPoint = "SetDlgItemInt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetDlgItemInt(IntPtr hDlg, int nIDDlgItem, int wValue, int bSigned); - [DllImport( "user32", EntryPoint = "GetDlgItemInt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetDlgItemInt( IntPtr hDlg, int nIDDlgItem, IntPtr lpTranslated, int bSigned ); + [DllImport("user32", EntryPoint = "GetDlgItemInt", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetDlgItemInt(IntPtr hDlg, int nIDDlgItem, IntPtr lpTranslated, int bSigned); - [DllImport( "user32", EntryPoint = "SetDlgItemText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetDlgItemText( IntPtr hDlg, int nIDDlgItem, string lpString ); + [DllImport("user32", EntryPoint = "SetDlgItemText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetDlgItemText(IntPtr hDlg, int nIDDlgItem, string lpString); - [DllImport( "user32", EntryPoint = "GetDlgItemText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetDlgItemText( IntPtr hDlg, int nIDDlgItem, string lpString, int nMaxCount ); + [DllImport("user32", EntryPoint = "GetDlgItemText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetDlgItemText(IntPtr hDlg, int nIDDlgItem, string lpString, int nMaxCount); - [DllImport( "user32", EntryPoint = "CheckDLGButton", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CheckDlgButton( IntPtr hDlg, int nIDButton, int wCheck ); + [DllImport("user32", EntryPoint = "CheckDLGButton", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CheckDlgButton(IntPtr hDlg, int nIDButton, int wCheck); - [DllImport( "user32", EntryPoint = "CheckRadioButton", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CheckRadioButton( IntPtr hDlg, int nIDFirstButton, int nIDLastButton, int nIDCheckButton ); + [DllImport("user32", EntryPoint = "CheckRadioButton", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CheckRadioButton(IntPtr hDlg, int nIDFirstButton, int nIDLastButton, int nIDCheckButton); - [DllImport( "user32", EntryPoint = "IsDlgButtonChecked", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsDlgButtonChecked( IntPtr hDlg, int nIDButton ); + [DllImport("user32", EntryPoint = "IsDlgButtonChecked", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsDlgButtonChecked(IntPtr hDlg, int nIDButton); - [DllImport( "user32", EntryPoint = "SendDlgItemMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SendDlgItemMessage( IntPtr hDlg, int nIDDlgItem, int wMsg, int wParam, int lParam ); + [DllImport("user32", EntryPoint = "SendDlgItemMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SendDlgItemMessage(IntPtr hDlg, int nIDDlgItem, int wMsg, int wParam, int lParam); - [DllImport( "user32", EntryPoint = "GetNextDlgGroupItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetNextDlgGroupItem( IntPtr hDlg, IntPtr hCtl, int bPrevious ); + [DllImport("user32", EntryPoint = "GetNextDlgGroupItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetNextDlgGroupItem(IntPtr hDlg, IntPtr hCtl, int bPrevious); - [DllImport( "user32", EntryPoint = "GetNextDlgTabItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetNextDlgTabItem( IntPtr hDlg, IntPtr hCtl, int bPrevious ); + [DllImport("user32", EntryPoint = "GetNextDlgTabItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetNextDlgTabItem(IntPtr hDlg, IntPtr hCtl, int bPrevious); - [DllImport( "user32", EntryPoint = "GetDlgCtrlID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetDlgCtrlID( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "GetDlgCtrlID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetDlgCtrlID(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "GetDialogBaseUnits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "GetDialogBaseUnits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetDialogBaseUnits(); - [DllImport( "user32", EntryPoint = "DefDlgProc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DefDlgProc( IntPtr hDlg, int wMsg, int wParam, int lParam ); + [DllImport("user32", EntryPoint = "DefDlgProc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DefDlgProc(IntPtr hDlg, int wMsg, int wParam, int lParam); - public const int DLGWINDOWEXTRA = unchecked( (int)( 30 ) );// Window extra bytes needed for private dialog classes + public const int DLGWINDOWEXTRA = unchecked((int)(30));// Window extra bytes needed for private dialog classes - [DllImport( "user32", EntryPoint = "CallMsgFilter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CallMsgFilter( ref MSG lpMsg, int ncode ); + [DllImport("user32", EntryPoint = "CallMsgFilter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CallMsgFilter(ref MSG lpMsg, int ncode); // Clipboard Manager Functions - [DllImport( "user32", EntryPoint = "OpenClipboard", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenClipboard( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "OpenClipboard", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenClipboard(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "CloseClipboard", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "CloseClipboard", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int CloseClipboard(); - [DllImport( "user32", EntryPoint = "GetClipboardOwner", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "GetClipboardOwner", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetClipboardOwner(); - [DllImport( "user32", EntryPoint = "SetClipboardViewer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetClipboardViewer( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "SetClipboardViewer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetClipboardViewer(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "GetClipboardViewer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "GetClipboardViewer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetClipboardViewer(); - [DllImport( "user32", EntryPoint = "ChangeClipboardChain", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ChangeClipboardChain( IntPtr hWnd, IntPtr hWndNext ); + [DllImport("user32", EntryPoint = "ChangeClipboardChain", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ChangeClipboardChain(IntPtr hWnd, IntPtr hWndNext); - [DllImport( "user32", EntryPoint = "SetClipboardData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetClipboardData( int wFormat, IntPtr hMem ); + [DllImport("user32", EntryPoint = "SetClipboardData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetClipboardData(int wFormat, IntPtr hMem); - [DllImport( "user32", EntryPoint = "GetClipboardData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetClipboardData( int wFormat ); + [DllImport("user32", EntryPoint = "GetClipboardData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetClipboardData(int wFormat); - [DllImport( "user32", EntryPoint = "RegisterClipboardFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegisterClipboardFormat( string lpString ); + [DllImport("user32", EntryPoint = "RegisterClipboardFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegisterClipboardFormat(string lpString); - [DllImport( "user32", EntryPoint = "CountClipboardFormats", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "CountClipboardFormats", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int CountClipboardFormats(); - [DllImport( "user32", EntryPoint = "EnumClipboardFormats", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumClipboardFormats( int wFormat ); + [DllImport("user32", EntryPoint = "EnumClipboardFormats", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumClipboardFormats(int wFormat); - [DllImport( "user32", EntryPoint = "GetClipboardFormatName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetClipboardFormatName( int wFormat, string lpString, int nMaxCount ); + [DllImport("user32", EntryPoint = "GetClipboardFormatName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetClipboardFormatName(int wFormat, string lpString, int nMaxCount); - [DllImport( "user32", EntryPoint = "EmptyClipboard", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "EmptyClipboard", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int EmptyClipboard(); - [DllImport( "user32", EntryPoint = "IsClipboardFormatAvailable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsClipboardFormatAvailable( int wFormat ); + [DllImport("user32", EntryPoint = "IsClipboardFormatAvailable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsClipboardFormatAvailable(int wFormat); - [DllImport( "user32", EntryPoint = "GetPriorityClipboardFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetPriorityClipboardFormat( IntPtr lpPriorityList, int nCount ); + [DllImport("user32", EntryPoint = "GetPriorityClipboardFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetPriorityClipboardFormat(IntPtr lpPriorityList, int nCount); - [DllImport( "user32", EntryPoint = "GetOpenClipboardWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "GetOpenClipboardWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetOpenClipboardWindow(); - [DllImport( "user32", EntryPoint = "CharToOem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CharToOem( string lpszSrc, string lpszDst ); + [DllImport("user32", EntryPoint = "CharToOem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CharToOem(string lpszSrc, string lpszDst); - [DllImport( "user32", EntryPoint = "OemToChar", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OemToChar( string lpszSrc, string lpszDst ); + [DllImport("user32", EntryPoint = "OemToChar", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OemToChar(string lpszSrc, string lpszDst); - [DllImport( "user32", EntryPoint = "CharToOemBuff", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CharToOemBuff( string lpszSrc, string lpszDst, int cchDstLength ); + [DllImport("user32", EntryPoint = "CharToOemBuff", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CharToOemBuff(string lpszSrc, string lpszDst, int cchDstLength); - [DllImport( "user32", EntryPoint = "OemToCharBuff", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OemToCharBuff( string lpszSrc, string lpszDst, int cchDstLength ); + [DllImport("user32", EntryPoint = "OemToCharBuff", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OemToCharBuff(string lpszSrc, string lpszDst, int cchDstLength); - [DllImport( "user32", EntryPoint = "CharUpper", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern string CharUpper( string lpsz ); + [DllImport("user32", EntryPoint = "CharUpper", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern string CharUpper(string lpsz); - [DllImport( "user32", EntryPoint = "CharUpperBuff", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CharUpperBuff( string lpsz, int cchLength ); + [DllImport("user32", EntryPoint = "CharUpperBuff", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CharUpperBuff(string lpsz, int cchLength); - [DllImport( "user32", EntryPoint = "CharLower", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern string CharLower( string lpsz ); + [DllImport("user32", EntryPoint = "CharLower", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern string CharLower(string lpsz); - [DllImport( "user32", EntryPoint = "CharLowerBuff", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CharLowerBuff( string lpsz, int cchLength ); + [DllImport("user32", EntryPoint = "CharLowerBuff", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CharLowerBuff(string lpsz, int cchLength); - [DllImport( "user32", EntryPoint = "CharNext", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern string CharNext( string lpsz ); + [DllImport("user32", EntryPoint = "CharNext", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern string CharNext(string lpsz); - [DllImport( "user32", EntryPoint = "CharPrev", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern string CharPrev( string lpszStart, string lpszCurrent ); + [DllImport("user32", EntryPoint = "CharPrev", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern string CharPrev(string lpszStart, string lpszCurrent); // Language dependent Routines - [DllImport( "user32", EntryPoint = "IsCharAlpha", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsCharAlpha( byte cChar ); + [DllImport("user32", EntryPoint = "IsCharAlpha", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsCharAlpha(byte cChar); - [DllImport( "user32", EntryPoint = "IsCharAlphaNumeric", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsCharAlphaNumeric( byte cChar ); + [DllImport("user32", EntryPoint = "IsCharAlphaNumeric", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsCharAlphaNumeric(byte cChar); - [DllImport( "user32", EntryPoint = "IsCharUpper", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsCharUpper( byte cChar ); + [DllImport("user32", EntryPoint = "IsCharUpper", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsCharUpper(byte cChar); - [DllImport( "user32", EntryPoint = "IsCharLower", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsCharLower( byte cChar ); + [DllImport("user32", EntryPoint = "IsCharLower", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsCharLower(byte cChar); - [DllImport( "user32", EntryPoint = "SetFocus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetFocus( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "SetFocus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetFocus(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "GetFocus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "GetFocus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetFocus(); - [DllImport( "user32", EntryPoint = "GetActiveWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "GetActiveWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetActiveWindow(); // Keyboard Information Routines - [DllImport( "user32", EntryPoint = "GetKBCodePage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "GetKBCodePage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetKBCodePage(); - [DllImport( "user32", EntryPoint = "GetKeyState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetKeyState( int nVirtKey ); + [DllImport("user32", EntryPoint = "GetKeyState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetKeyState(int nVirtKey); - [DllImport( "user32", EntryPoint = "GetAsyncKeyState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetAsyncKeyState( int vKey ); + [DllImport("user32", EntryPoint = "GetAsyncKeyState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetAsyncKeyState(int vKey); - [DllImport( "user32", EntryPoint = "GetKeyboardState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetKeyboardState( byte pbKeyState ); + [DllImport("user32", EntryPoint = "GetKeyboardState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetKeyboardState(byte pbKeyState); - [DllImport( "user32", EntryPoint = "SetKeyboardState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetKeyboardState( ref byte lppbKeyState ); + [DllImport("user32", EntryPoint = "SetKeyboardState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetKeyboardState(ref byte lppbKeyState); - [DllImport( "user32", EntryPoint = "GetKeyboardType", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetKeyboardType( int nTypeFlag ); + [DllImport("user32", EntryPoint = "GetKeyboardType", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetKeyboardType(int nTypeFlag); - [DllImport( "user32", EntryPoint = "GetKeyNameText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetKeyNameText( int lParam, string lpBuffer, int nSize ); + [DllImport("user32", EntryPoint = "GetKeyNameText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetKeyNameText(int lParam, string lpBuffer, int nSize); - [DllImport( "user32", EntryPoint = "ToAscii", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ToAscii( int uVirtKey, int uScanCode, ref byte lpbKeyState, IntPtr lpwTransKey, int fuState ); + [DllImport("user32", EntryPoint = "ToAscii", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ToAscii(int uVirtKey, int uScanCode, ref byte lpbKeyState, IntPtr lpwTransKey, int fuState); - [DllImport( "user32", EntryPoint = "ToUnicode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ToUnicode( int wVirtKey, int wScanCode, ref byte lpKeyState, string pwszBuff, int cchBuff, int wFlags ); + [DllImport("user32", EntryPoint = "ToUnicode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ToUnicode(int wVirtKey, int wScanCode, ref byte lpKeyState, string pwszBuff, int cchBuff, int wFlags); - [DllImport( "user32", EntryPoint = "OemKeyScan", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OemKeyScan( int wOemChar ); + [DllImport("user32", EntryPoint = "OemKeyScan", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OemKeyScan(int wOemChar); - [DllImport( "user32", EntryPoint = "VkKeyScan", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int VkKeyScan( byte cChar ); + [DllImport("user32", EntryPoint = "VkKeyScan", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int VkKeyScan(byte cChar); - public const int KEYEVENTF_EXTENDEDKEY = unchecked( (int)( 0x1 ) ); - public const int KEYEVENTF_KEYUP = unchecked( (int)( 0x2 ) ); + public const int KEYEVENTF_EXTENDEDKEY = unchecked((int)(0x1)); + public const int KEYEVENTF_KEYUP = unchecked((int)(0x2)); - [DllImport( "user32", EntryPoint = "keybd_event", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void keybd_event( byte bVk, byte bScan, int dwFlags, int dwExtraInfo ); + [DllImport("user32", EntryPoint = "keybd_event", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo); - public const int MOUSEEVENTF_MOVE = unchecked( (int)( 0x1 ) );// mouse move - public const int MOUSEEVENTF_LEFTDOWN = unchecked( (int)( 0x2 ) );// left button down - public const int MOUSEEVENTF_LEFTUP = unchecked( (int)( 0x4 ) );// left button up - public const int MOUSEEVENTF_RIGHTDOWN = unchecked( (int)( 0x8 ) );// right button down - public const int MOUSEEVENTF_RIGHTUP = unchecked( (int)( 0x10 ) );// right button up - public const int MOUSEEVENTF_MIDDLEDOWN = unchecked( (int)( 0x20 ) );// middle button down - public const int MOUSEEVENTF_MIDDLEUP = unchecked( (int)( 0x40 ) );// middle button up - public const int MOUSEEVENTF_ABSOLUTE = unchecked( (int)( 0x8000 ) );// absolute move + public const int MOUSEEVENTF_MOVE = unchecked((int)(0x1));// mouse move + public const int MOUSEEVENTF_LEFTDOWN = unchecked((int)(0x2));// left button down + public const int MOUSEEVENTF_LEFTUP = unchecked((int)(0x4));// left button up + public const int MOUSEEVENTF_RIGHTDOWN = unchecked((int)(0x8));// right button down + public const int MOUSEEVENTF_RIGHTUP = unchecked((int)(0x10));// right button up + public const int MOUSEEVENTF_MIDDLEDOWN = unchecked((int)(0x20));// middle button down + public const int MOUSEEVENTF_MIDDLEUP = unchecked((int)(0x40));// middle button up + public const int MOUSEEVENTF_ABSOLUTE = unchecked((int)(0x8000));// absolute move - [DllImport( "user32", EntryPoint = "mouse_event", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void mouse_event( int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo ); + [DllImport("user32", EntryPoint = "mouse_event", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo); - [DllImport( "user32", EntryPoint = "MapVirtualKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MapVirtualKey( int wCode, int wMapType ); + [DllImport("user32", EntryPoint = "MapVirtualKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MapVirtualKey(int wCode, int wMapType); - [DllImport( "user32", EntryPoint = "GetInputState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "GetInputState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetInputState(); - [DllImport( "user32", EntryPoint = "GetQueueStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetQueueStatus( int fuFlags ); + [DllImport("user32", EntryPoint = "GetQueueStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetQueueStatus(int fuFlags); - [DllImport( "user32", EntryPoint = "GetCapture", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "GetCapture", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetCapture(); - [DllImport( "user32", EntryPoint = "SetCapture", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetCapture( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "SetCapture", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetCapture(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "ReleaseCapture", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "ReleaseCapture", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int ReleaseCapture(); - [DllImport( "user32", EntryPoint = "MsgWaitForMultipleObjects", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MsgWaitForMultipleObjects( int nCount, int pHandles, int fWaitAll, int dwMilliseconds, int dwWakeMask ); + [DllImport("user32", EntryPoint = "MsgWaitForMultipleObjects", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MsgWaitForMultipleObjects(int nCount, int pHandles, int fWaitAll, int dwMilliseconds, int dwWakeMask); // GetQueueStatus flags - public const int QS_KEY = unchecked( (int)( 0x1 ) ); - public const int QS_MOUSEMOVE = unchecked( (int)( 0x2 ) ); - public const int QS_MOUSEBUTTON = unchecked( (int)( 0x4 ) ); - public const int QS_POSTMESSAGE = unchecked( (int)( 0x8 ) ); - public const int QS_TIMER = unchecked( (int)( 0x10 ) ); - public const int QS_PAINT = unchecked( (int)( 0x20 ) ); - public const int QS_SENDMESSAGE = unchecked( (int)( 0x40 ) ); - public const int QS_HOTKEY = unchecked( (int)( 0x80 ) ); + public const int QS_KEY = unchecked((int)(0x1)); + public const int QS_MOUSEMOVE = unchecked((int)(0x2)); + public const int QS_MOUSEBUTTON = unchecked((int)(0x4)); + public const int QS_POSTMESSAGE = unchecked((int)(0x8)); + public const int QS_TIMER = unchecked((int)(0x10)); + public const int QS_PAINT = unchecked((int)(0x20)); + public const int QS_SENDMESSAGE = unchecked((int)(0x40)); + public const int QS_HOTKEY = unchecked((int)(0x80)); - public const int QS_MOUSE = unchecked( (int)( ( QS_MOUSEMOVE | QS_MOUSEBUTTON ) ) ); + public const int QS_MOUSE = unchecked((int)((QS_MOUSEMOVE | QS_MOUSEBUTTON))); - public const int QS_INPUT = unchecked( (int)( ( QS_MOUSE | QS_KEY ) ) ); + public const int QS_INPUT = unchecked((int)((QS_MOUSE | QS_KEY))); - public const int QS_ALLEVENTS = unchecked( (int)( ( QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY ) ) ); + public const int QS_ALLEVENTS = unchecked((int)((QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY))); - public const int QS_ALLINPUT = unchecked( (int)( ( QS_SENDMESSAGE | QS_PAINT | QS_TIMER | QS_POSTMESSAGE | QS_MOUSEBUTTON | QS_MOUSEMOVE | QS_HOTKEY | QS_KEY ) ) ); + public const int QS_ALLINPUT = unchecked((int)((QS_SENDMESSAGE | QS_PAINT | QS_TIMER | QS_POSTMESSAGE | QS_MOUSEBUTTON | QS_MOUSEMOVE | QS_HOTKEY | QS_KEY))); // Windows Functions - [DllImport( "user32", EntryPoint = "KillTimer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int KillTimer( IntPtr hWnd, int nIDEvent ); + [DllImport("user32", EntryPoint = "KillTimer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int KillTimer(IntPtr hWnd, int nIDEvent); - [DllImport( "user32", EntryPoint = "IsWindowUnicode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsWindowUnicode( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "IsWindowUnicode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsWindowUnicode(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "EnableWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnableWindow( IntPtr hWnd, int fEnable ); + [DllImport("user32", EntryPoint = "EnableWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnableWindow(IntPtr hWnd, int fEnable); - [DllImport( "user32", EntryPoint = "IsWindowEnabled", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsWindowEnabled( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "IsWindowEnabled", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsWindowEnabled(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "LoadAccelerators", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LoadAccelerators( IntPtr hInstance, string lpTableName ); + [DllImport("user32", EntryPoint = "LoadAccelerators", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LoadAccelerators(IntPtr hInstance, string lpTableName); - [DllImport( "user32", EntryPoint = "CreateAcceleratorTable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateAcceleratorTable( ref ACCEL lpaccl, int cEntries ); + [DllImport("user32", EntryPoint = "CreateAcceleratorTable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateAcceleratorTable(ref ACCEL lpaccl, int cEntries); - [DllImport( "user32", EntryPoint = "DestroyAcceleratorTable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DestroyAcceleratorTable( IntPtr haccel ); + [DllImport("user32", EntryPoint = "DestroyAcceleratorTable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DestroyAcceleratorTable(IntPtr haccel); - [DllImport( "user32", EntryPoint = "CopyAcceleratorTable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CopyAcceleratorTable( IntPtr hAccelSrc, ref ACCEL lpAccelDst, int cAccelEntries ); + [DllImport("user32", EntryPoint = "CopyAcceleratorTable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CopyAcceleratorTable(IntPtr hAccelSrc, ref ACCEL lpAccelDst, int cAccelEntries); - [DllImport( "user32", EntryPoint = "TranslateAccelerator", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int TranslateAccelerator( IntPtr hWnd, IntPtr hAccTable, ref MSG lpMsg ); + [DllImport("user32", EntryPoint = "TranslateAccelerator", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int TranslateAccelerator(IntPtr hWnd, IntPtr hAccTable, ref MSG lpMsg); // GetSystemMetrics() codes - public const int SM_CXSCREEN = unchecked( (int)( 0 ) ); - public const int SM_CYSCREEN = unchecked( (int)( 1 ) ); - public const int SM_CXVSCROLL = unchecked( (int)( 2 ) ); - public const int SM_CYHSCROLL = unchecked( (int)( 3 ) ); - public const int SM_CYCAPTION = unchecked( (int)( 4 ) ); - public const int SM_CXBORDER = unchecked( (int)( 5 ) ); - public const int SM_CYBORDER = unchecked( (int)( 6 ) ); - public const int SM_CXDLGFRAME = unchecked( (int)( 7 ) ); - public const int SM_CYDLGFRAME = unchecked( (int)( 8 ) ); - public const int SM_CYVTHUMB = unchecked( (int)( 9 ) ); - public const int SM_CXHTHUMB = unchecked( (int)( 10 ) ); - public const int SM_CXICON = unchecked( (int)( 11 ) ); - public const int SM_CYICON = unchecked( (int)( 12 ) ); - public const int SM_CXCURSOR = unchecked( (int)( 13 ) ); - public const int SM_CYCURSOR = unchecked( (int)( 14 ) ); - public const int SM_CYMENU = unchecked( (int)( 15 ) ); - public const int SM_CXFULLSCREEN = unchecked( (int)( 16 ) ); - public const int SM_CYFULLSCREEN = unchecked( (int)( 17 ) ); - public const int SM_CYKANJIWINDOW = unchecked( (int)( 18 ) ); - public const int SM_MOUSEPRESENT = unchecked( (int)( 19 ) ); - public const int SM_CYVSCROLL = unchecked( (int)( 20 ) ); - public const int SM_CXHSCROLL = unchecked( (int)( 21 ) ); - public const int SM_DEBUG = unchecked( (int)( 22 ) ); - public const int SM_SWAPBUTTON = unchecked( (int)( 23 ) ); - public const int SM_RESERVED1 = unchecked( (int)( 24 ) ); - public const int SM_RESERVED2 = unchecked( (int)( 25 ) ); - public const int SM_RESERVED3 = unchecked( (int)( 26 ) ); - public const int SM_RESERVED4 = unchecked( (int)( 27 ) ); - public const int SM_CXMIN = unchecked( (int)( 28 ) ); - public const int SM_CYMIN = unchecked( (int)( 29 ) ); - public const int SM_CXSIZE = unchecked( (int)( 30 ) ); - public const int SM_CYSIZE = unchecked( (int)( 31 ) ); - public const int SM_CXFRAME = unchecked( (int)( 32 ) ); - public const int SM_CYFRAME = unchecked( (int)( 33 ) ); - public const int SM_CXMINTRACK = unchecked( (int)( 34 ) ); - public const int SM_CYMINTRACK = unchecked( (int)( 35 ) ); - public const int SM_CXDOUBLECLK = unchecked( (int)( 36 ) ); - public const int SM_CYDOUBLECLK = unchecked( (int)( 37 ) ); - public const int SM_CXICONSPACING = unchecked( (int)( 38 ) ); - public const int SM_CYICONSPACING = unchecked( (int)( 39 ) ); - public const int SM_MENUDROPALIGNMENT = unchecked( (int)( 40 ) ); - public const int SM_PENWINDOWS = unchecked( (int)( 41 ) ); - public const int SM_DBCSENABLED = unchecked( (int)( 42 ) ); - public const int SM_CMOUSEBUTTONS = unchecked( (int)( 43 ) ); - public const int SM_CMETRICS = unchecked( (int)( 44 ) ); - public const int SM_CXSIZEFRAME = unchecked( (int)( SM_CXFRAME ) ); - public const int SM_CYSIZEFRAME = unchecked( (int)( SM_CYFRAME ) ); - public const int SM_CXFIXEDFRAME = unchecked( (int)( SM_CXDLGFRAME ) ); - public const int SM_CYFIXEDFRAME = unchecked( (int)( SM_CYDLGFRAME ) ); - - - [DllImport( "user32", EntryPoint = "GetSystemMetrics", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSystemMetrics( int nIndex ); - - - [DllImport( "user32", EntryPoint = "LoadMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LoadMenu( IntPtr hInstance, string lpString ); - - [DllImport( "user32", EntryPoint = "LoadMenuIndirect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LoadMenuIndirect( IntPtr lpMenuTemplate ); - - [DllImport( "user32", EntryPoint = "GetMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetMenu( IntPtr hWnd ); - - [DllImport( "user32", EntryPoint = "SetMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetMenu( IntPtr hWnd, IntPtr hMenu ); - - [DllImport( "user32", EntryPoint = "HiliteMenuItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int HiliteMenuItem( IntPtr hWnd, IntPtr hMenu, int wIDHiliteItem, int wHilite ); - - [DllImport( "user32", EntryPoint = "GetMenuString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetMenuString( IntPtr hMenu, int wIDItem, string lpString, int nMaxCount, int wFlag ); - - [DllImport( "user32", EntryPoint = "GetMenuState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetMenuState( IntPtr hMenu, int wID, int wFlags ); - - [DllImport( "user32", EntryPoint = "DrawMenuBar", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DrawMenuBar( IntPtr hWnd ); - - [DllImport( "user32", EntryPoint = "GetSystemMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSystemMenu( IntPtr hWnd, int bRevert ); - - [DllImport( "user32", EntryPoint = "CreateMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + public const int SM_CXSCREEN = unchecked((int)(0)); + public const int SM_CYSCREEN = unchecked((int)(1)); + public const int SM_CXVSCROLL = unchecked((int)(2)); + public const int SM_CYHSCROLL = unchecked((int)(3)); + public const int SM_CYCAPTION = unchecked((int)(4)); + public const int SM_CXBORDER = unchecked((int)(5)); + public const int SM_CYBORDER = unchecked((int)(6)); + public const int SM_CXDLGFRAME = unchecked((int)(7)); + public const int SM_CYDLGFRAME = unchecked((int)(8)); + public const int SM_CYVTHUMB = unchecked((int)(9)); + public const int SM_CXHTHUMB = unchecked((int)(10)); + public const int SM_CXICON = unchecked((int)(11)); + public const int SM_CYICON = unchecked((int)(12)); + public const int SM_CXCURSOR = unchecked((int)(13)); + public const int SM_CYCURSOR = unchecked((int)(14)); + public const int SM_CYMENU = unchecked((int)(15)); + public const int SM_CXFULLSCREEN = unchecked((int)(16)); + public const int SM_CYFULLSCREEN = unchecked((int)(17)); + public const int SM_CYKANJIWINDOW = unchecked((int)(18)); + public const int SM_MOUSEPRESENT = unchecked((int)(19)); + public const int SM_CYVSCROLL = unchecked((int)(20)); + public const int SM_CXHSCROLL = unchecked((int)(21)); + public const int SM_DEBUG = unchecked((int)(22)); + public const int SM_SWAPBUTTON = unchecked((int)(23)); + public const int SM_RESERVED1 = unchecked((int)(24)); + public const int SM_RESERVED2 = unchecked((int)(25)); + public const int SM_RESERVED3 = unchecked((int)(26)); + public const int SM_RESERVED4 = unchecked((int)(27)); + public const int SM_CXMIN = unchecked((int)(28)); + public const int SM_CYMIN = unchecked((int)(29)); + public const int SM_CXSIZE = unchecked((int)(30)); + public const int SM_CYSIZE = unchecked((int)(31)); + public const int SM_CXFRAME = unchecked((int)(32)); + public const int SM_CYFRAME = unchecked((int)(33)); + public const int SM_CXMINTRACK = unchecked((int)(34)); + public const int SM_CYMINTRACK = unchecked((int)(35)); + public const int SM_CXDOUBLECLK = unchecked((int)(36)); + public const int SM_CYDOUBLECLK = unchecked((int)(37)); + public const int SM_CXICONSPACING = unchecked((int)(38)); + public const int SM_CYICONSPACING = unchecked((int)(39)); + public const int SM_MENUDROPALIGNMENT = unchecked((int)(40)); + public const int SM_PENWINDOWS = unchecked((int)(41)); + public const int SM_DBCSENABLED = unchecked((int)(42)); + public const int SM_CMOUSEBUTTONS = unchecked((int)(43)); + public const int SM_CMETRICS = unchecked((int)(44)); + public const int SM_CXSIZEFRAME = unchecked((int)(SM_CXFRAME)); + public const int SM_CYSIZEFRAME = unchecked((int)(SM_CYFRAME)); + public const int SM_CXFIXEDFRAME = unchecked((int)(SM_CXDLGFRAME)); + public const int SM_CYFIXEDFRAME = unchecked((int)(SM_CYDLGFRAME)); + + + [DllImport("user32", EntryPoint = "GetSystemMetrics", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSystemMetrics(int nIndex); + + + [DllImport("user32", EntryPoint = "LoadMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LoadMenu(IntPtr hInstance, string lpString); + + [DllImport("user32", EntryPoint = "LoadMenuIndirect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LoadMenuIndirect(IntPtr lpMenuTemplate); + + [DllImport("user32", EntryPoint = "GetMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetMenu(IntPtr hWnd); + + [DllImport("user32", EntryPoint = "SetMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetMenu(IntPtr hWnd, IntPtr hMenu); + + [DllImport("user32", EntryPoint = "HiliteMenuItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int HiliteMenuItem(IntPtr hWnd, IntPtr hMenu, int wIDHiliteItem, int wHilite); + + [DllImport("user32", EntryPoint = "GetMenuString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetMenuString(IntPtr hMenu, int wIDItem, string lpString, int nMaxCount, int wFlag); + + [DllImport("user32", EntryPoint = "GetMenuState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetMenuState(IntPtr hMenu, int wID, int wFlags); + + [DllImport("user32", EntryPoint = "DrawMenuBar", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DrawMenuBar(IntPtr hWnd); + + [DllImport("user32", EntryPoint = "GetSystemMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSystemMenu(IntPtr hWnd, int bRevert); + + [DllImport("user32", EntryPoint = "CreateMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int CreateMenu(); - [DllImport( "user32", EntryPoint = "CreatePopupMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "CreatePopupMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int CreatePopupMenu(); - [DllImport( "user32", EntryPoint = "DestroyMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DestroyMenu( IntPtr hMenu ); + [DllImport("user32", EntryPoint = "DestroyMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DestroyMenu(IntPtr hMenu); - [DllImport( "user32", EntryPoint = "CheckMenuItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CheckMenuItem( IntPtr hMenu, int wIDCheckItem, int wCheck ); + [DllImport("user32", EntryPoint = "CheckMenuItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CheckMenuItem(IntPtr hMenu, int wIDCheckItem, int wCheck); - [DllImport( "user32", EntryPoint = "EnableMenuItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnableMenuItem( IntPtr hMenu, int wIDEnableItem, int wEnable ); + [DllImport("user32", EntryPoint = "EnableMenuItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnableMenuItem(IntPtr hMenu, int wIDEnableItem, int wEnable); - [DllImport( "user32", EntryPoint = "GetSubMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSubMenu( IntPtr hMenu, int nPos ); + [DllImport("user32", EntryPoint = "GetSubMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSubMenu(IntPtr hMenu, int nPos); - [DllImport( "user32", EntryPoint = "GetMenuItemID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetMenuItemID( IntPtr hMenu, int nPos ); + [DllImport("user32", EntryPoint = "GetMenuItemID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetMenuItemID(IntPtr hMenu, int nPos); - [DllImport( "user32", EntryPoint = "GetMenuItemCount", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetMenuItemCount( IntPtr hMenu ); + [DllImport("user32", EntryPoint = "GetMenuItemCount", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetMenuItemCount(IntPtr hMenu); - [DllImport( "user32", EntryPoint = "InsertMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int InsertMenu( IntPtr hMenu, int nPosition, int wFlags, int wIDNewItem, IntPtr lpNewItem ); + [DllImport("user32", EntryPoint = "InsertMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int InsertMenu(IntPtr hMenu, int nPosition, int wFlags, int wIDNewItem, IntPtr lpNewItem); - [DllImport( "user32", EntryPoint = "AppendMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AppendMenu( IntPtr hMenu, int wFlags, int wIDNewItem, IntPtr lpNewItem ); + [DllImport("user32", EntryPoint = "AppendMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AppendMenu(IntPtr hMenu, int wFlags, int wIDNewItem, IntPtr lpNewItem); - [DllImport( "user32", EntryPoint = "ModifyMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ModifyMenu( IntPtr hMenu, int nPosition, int wFlags, int wIDNewItem, IntPtr lpString ); + [DllImport("user32", EntryPoint = "ModifyMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ModifyMenu(IntPtr hMenu, int nPosition, int wFlags, int wIDNewItem, IntPtr lpString); - [DllImport( "user32", EntryPoint = "RemoveMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RemoveMenu( IntPtr hMenu, int nPosition, int wFlags ); + [DllImport("user32", EntryPoint = "RemoveMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RemoveMenu(IntPtr hMenu, int nPosition, int wFlags); - [DllImport( "user32", EntryPoint = "DeleteMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeleteMenu( IntPtr hMenu, int nPosition, int wFlags ); + [DllImport("user32", EntryPoint = "DeleteMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeleteMenu(IntPtr hMenu, int nPosition, int wFlags); - [DllImport( "user32", EntryPoint = "SetMenuItemBitmaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetMenuItemBitmaps( IntPtr hMenu, int nPosition, int wFlags, IntPtr hBitmapUnchecked, IntPtr hBitmapChecked ); + [DllImport("user32", EntryPoint = "SetMenuItemBitmaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetMenuItemBitmaps(IntPtr hMenu, int nPosition, int wFlags, IntPtr hBitmapUnchecked, IntPtr hBitmapChecked); - [DllImport( "user32", EntryPoint = "GetMenuCheckMarkDimensions", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "GetMenuCheckMarkDimensions", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetMenuCheckMarkDimensions(); - [DllImport( "user32", EntryPoint = "TrackPopupMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int TrackPopupMenu( IntPtr hMenu, int wFlags, int x, int y, int nReserved, IntPtr hWnd, ref RECT lprc ); + [DllImport("user32", EntryPoint = "TrackPopupMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int TrackPopupMenu(IntPtr hMenu, int wFlags, int x, int y, int nReserved, IntPtr hWnd, ref RECT lprc); // Flags for TrackPopupMenu - public const int TPM_LEFTBUTTON = unchecked( (int)( 0x0 ) ); - public const int TPM_RIGHTBUTTON = unchecked( (int)( 0x2 ) ); - public const int TPM_LEFTALIGN = unchecked( (int)( 0x0 ) ); - public const int TPM_CENTERALIGN = unchecked( (int)( 0x4 ) ); - public const int TPM_RIGHTALIGN = unchecked( (int)( 0x8 ) ); + public const int TPM_LEFTBUTTON = unchecked((int)(0x0)); + public const int TPM_RIGHTBUTTON = unchecked((int)(0x2)); + public const int TPM_LEFTALIGN = unchecked((int)(0x0)); + public const int TPM_CENTERALIGN = unchecked((int)(0x4)); + public const int TPM_RIGHTALIGN = unchecked((int)(0x8)); - [DllImport( "user32", EntryPoint = "DrawIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DrawIcon( IntPtr hdc, int x, int y, IntPtr hIcon ); + [DllImport("user32", EntryPoint = "DrawIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DrawIcon(IntPtr hdc, int x, int y, IntPtr hIcon); // DrawText() Format Flags - public const int DT_TOP = unchecked( (int)( 0x0 ) ); - public const int DT_LEFT = unchecked( (int)( 0x0 ) ); - public const int DT_CENTER = unchecked( (int)( 0x1 ) ); - public const int DT_RIGHT = unchecked( (int)( 0x2 ) ); - public const int DT_VCENTER = unchecked( (int)( 0x4 ) ); - public const int DT_BOTTOM = unchecked( (int)( 0x8 ) ); - public const int DT_WORDBREAK = unchecked( (int)( 0x10 ) ); - public const int DT_SINGLELINE = unchecked( (int)( 0x20 ) ); - public const int DT_EXPANDTABS = unchecked( (int)( 0x40 ) ); - public const int DT_TABSTOP = unchecked( (int)( 0x80 ) ); - public const int DT_NOCLIP = unchecked( (int)( 0x100 ) ); - public const int DT_EXTERNALLEADING = unchecked( (int)( 0x200 ) ); - public const int DT_CALCRECT = unchecked( (int)( 0x400 ) ); - public const int DT_NOPREFIX = unchecked( (int)( 0x800 ) ); - public const int DT_INTERNAL = unchecked( (int)( 0x1000 ) ); + public const int DT_TOP = unchecked((int)(0x0)); + public const int DT_LEFT = unchecked((int)(0x0)); + public const int DT_CENTER = unchecked((int)(0x1)); + public const int DT_RIGHT = unchecked((int)(0x2)); + public const int DT_VCENTER = unchecked((int)(0x4)); + public const int DT_BOTTOM = unchecked((int)(0x8)); + public const int DT_WORDBREAK = unchecked((int)(0x10)); + public const int DT_SINGLELINE = unchecked((int)(0x20)); + public const int DT_EXPANDTABS = unchecked((int)(0x40)); + public const int DT_TABSTOP = unchecked((int)(0x80)); + public const int DT_NOCLIP = unchecked((int)(0x100)); + public const int DT_EXTERNALLEADING = unchecked((int)(0x200)); + public const int DT_CALCRECT = unchecked((int)(0x400)); + public const int DT_NOPREFIX = unchecked((int)(0x800)); + public const int DT_INTERNAL = unchecked((int)(0x1000)); - [DllImport( "user32", EntryPoint = "DrawText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DrawText( IntPtr hdc, string lpStr, int nCount, ref RECT lpRect, int wFormat ); + [DllImport("user32", EntryPoint = "DrawText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DrawText(IntPtr hdc, string lpStr, int nCount, ref RECT lpRect, int wFormat); - [DllImport( "user32", EntryPoint = "TabbedTextOut", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int TabbedTextOut( IntPtr hdc, int x, int y, string lpString, int nCount, int nTabPositions, IntPtr lpnTabStopPositions, int nTabOrigin ); + [DllImport("user32", EntryPoint = "TabbedTextOut", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int TabbedTextOut(IntPtr hdc, int x, int y, string lpString, int nCount, int nTabPositions, IntPtr lpnTabStopPositions, int nTabOrigin); - [DllImport( "user32", EntryPoint = "GetTabbedTextExtent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTabbedTextExtent( IntPtr hdc, string lpString, int nCount, int nTabPositions, IntPtr lpnTabStopPositions ); + [DllImport("user32", EntryPoint = "GetTabbedTextExtent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTabbedTextExtent(IntPtr hdc, string lpString, int nCount, int nTabPositions, IntPtr lpnTabStopPositions); - [DllImport( "user32", EntryPoint = "UpdateWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int UpdateWindow( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "UpdateWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int UpdateWindow(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "SetActiveWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetActiveWindow( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "SetActiveWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetActiveWindow(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "GetForegroundWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "GetForegroundWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetForegroundWindow(); - [DllImport( "user32", EntryPoint = "SetForegroundWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetForegroundWindow( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "SetForegroundWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetForegroundWindow(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "WindowFromDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WindowFromDC( IntPtr hdc ); + [DllImport("user32", EntryPoint = "WindowFromDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WindowFromDC(IntPtr hdc); - [DllImport( "user32", EntryPoint = "GetDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetDC( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "GetDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetDC(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "GetDCEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetDCEx( IntPtr hWnd, IntPtr hrgnclip, int fdwOptions ); + [DllImport("user32", EntryPoint = "GetDCEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetDCEx(IntPtr hWnd, IntPtr hrgnclip, int fdwOptions); - public const int DCX_WINDOW = unchecked( (int)( 0x1 ) ); - public const int DCX_CACHE = unchecked( (int)( 0x2 ) ); - public const int DCX_NORESETATTRS = unchecked( (int)( 0x4 ) ); - public const int DCX_CLIPCHILDREN = unchecked( (int)( 0x8 ) ); - public const int DCX_CLIPSIBLINGS = unchecked( (int)( 0x10 ) ); - public const int DCX_PARENTCLIP = unchecked( (int)( 0x20 ) ); + public const int DCX_WINDOW = unchecked((int)(0x1)); + public const int DCX_CACHE = unchecked((int)(0x2)); + public const int DCX_NORESETATTRS = unchecked((int)(0x4)); + public const int DCX_CLIPCHILDREN = unchecked((int)(0x8)); + public const int DCX_CLIPSIBLINGS = unchecked((int)(0x10)); + public const int DCX_PARENTCLIP = unchecked((int)(0x20)); - public const int DCX_EXCLUDERGN = unchecked( (int)( 0x40 ) ); - public const int DCX_INTERSECTRGN = unchecked( (int)( 0x80 ) ); + public const int DCX_EXCLUDERGN = unchecked((int)(0x40)); + public const int DCX_INTERSECTRGN = unchecked((int)(0x80)); - public const int DCX_EXCLUDEUPDATE = unchecked( (int)( 0x100 ) ); - public const int DCX_INTERSECTUPDATE = unchecked( (int)( 0x200 ) ); + public const int DCX_EXCLUDEUPDATE = unchecked((int)(0x100)); + public const int DCX_INTERSECTUPDATE = unchecked((int)(0x200)); - public const int DCX_LOCKWINDOWUPDATE = unchecked( (int)( 0x400 ) ); + public const int DCX_LOCKWINDOWUPDATE = unchecked((int)(0x400)); - public const int DCX_NORECOMPUTE = unchecked( (int)( 0x100000 ) ); - public const int DCX_VALIDATE = unchecked( (int)( 0x200000 ) ); + public const int DCX_NORECOMPUTE = unchecked((int)(0x100000)); + public const int DCX_VALIDATE = unchecked((int)(0x200000)); - [DllImport( "user32", EntryPoint = "GetWindowDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWindowDC( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "GetWindowDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWindowDC(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "ReleaseDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ReleaseDC( IntPtr hWnd, IntPtr hdc ); + [DllImport("user32", EntryPoint = "ReleaseDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ReleaseDC(IntPtr hWnd, IntPtr hdc); - [DllImport( "user32", EntryPoint = "BeginPaint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int BeginPaint( IntPtr hWnd, ref PAINTSTRUCT lpPaint ); + [DllImport("user32", EntryPoint = "BeginPaint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int BeginPaint(IntPtr hWnd, ref PAINTSTRUCT lpPaint); - [DllImport( "user32", EntryPoint = "EndPaint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EndPaint( IntPtr hWnd, ref PAINTSTRUCT lpPaint ); + [DllImport("user32", EntryPoint = "EndPaint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EndPaint(IntPtr hWnd, ref PAINTSTRUCT lpPaint); - [DllImport( "user32", EntryPoint = "GetUpdateRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetUpdateRect( IntPtr hWnd, ref RECT lpRect, int bErase ); + [DllImport("user32", EntryPoint = "GetUpdateRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetUpdateRect(IntPtr hWnd, ref RECT lpRect, int bErase); - [DllImport( "user32", EntryPoint = "GetUpdateRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetUpdateRgn( IntPtr hWnd, IntPtr hRgn, int fErase ); + [DllImport("user32", EntryPoint = "GetUpdateRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetUpdateRgn(IntPtr hWnd, IntPtr hRgn, int fErase); - [DllImport( "user32", EntryPoint = "ExcludeUpdateRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ExcludeUpdateRgn( IntPtr hdc, IntPtr hWnd ); + [DllImport("user32", EntryPoint = "ExcludeUpdateRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ExcludeUpdateRgn(IntPtr hdc, IntPtr hWnd); - [DllImport( "user32", EntryPoint = "InvalidateRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int InvalidateRect( IntPtr hWnd, ref RECT lpRect, int bErase ); + [DllImport("user32", EntryPoint = "InvalidateRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int InvalidateRect(IntPtr hWnd, ref RECT lpRect, int bErase); - [DllImport( "user32", EntryPoint = "ValidateRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ValidateRect( IntPtr hWnd, ref RECT lpRect ); + [DllImport("user32", EntryPoint = "ValidateRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ValidateRect(IntPtr hWnd, ref RECT lpRect); - [DllImport( "user32", EntryPoint = "InvalidateRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int InvalidateRgn( IntPtr hWnd, IntPtr hRgn, int bErase ); + [DllImport("user32", EntryPoint = "InvalidateRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int InvalidateRgn(IntPtr hWnd, IntPtr hRgn, int bErase); - [DllImport( "user32", EntryPoint = "ValidateRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ValidateRgn( IntPtr hWnd, IntPtr hRgn ); + [DllImport("user32", EntryPoint = "ValidateRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ValidateRgn(IntPtr hWnd, IntPtr hRgn); - [DllImport( "user32", EntryPoint = "RedrawWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RedrawWindow( IntPtr hWnd, ref RECT lprcUpdate, IntPtr hrgnUpdate, int fuRedraw ); + [DllImport("user32", EntryPoint = "RedrawWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RedrawWindow(IntPtr hWnd, ref RECT lprcUpdate, IntPtr hrgnUpdate, int fuRedraw); - public const int RDW_INVALIDATE = unchecked( (int)( 0x1 ) ); - public const int RDW_INTERNALPAINT = unchecked( (int)( 0x2 ) ); - public const int RDW_ERASE = unchecked( (int)( 0x4 ) ); + public const int RDW_INVALIDATE = unchecked((int)(0x1)); + public const int RDW_INTERNALPAINT = unchecked((int)(0x2)); + public const int RDW_ERASE = unchecked((int)(0x4)); - public const int RDW_VALIDATE = unchecked( (int)( 0x8 ) ); - public const int RDW_NOINTERNALPAINT = unchecked( (int)( 0x10 ) ); - public const int RDW_NOERASE = unchecked( (int)( 0x20 ) ); + public const int RDW_VALIDATE = unchecked((int)(0x8)); + public const int RDW_NOINTERNALPAINT = unchecked((int)(0x10)); + public const int RDW_NOERASE = unchecked((int)(0x20)); - public const int RDW_NOCHILDREN = unchecked( (int)( 0x40 ) ); - public const int RDW_ALLCHILDREN = unchecked( (int)( 0x80 ) ); + public const int RDW_NOCHILDREN = unchecked((int)(0x40)); + public const int RDW_ALLCHILDREN = unchecked((int)(0x80)); - public const int RDW_UPDATENOW = unchecked( (int)( 0x100 ) ); - public const int RDW_ERASENOW = unchecked( (int)( 0x200 ) ); + public const int RDW_UPDATENOW = unchecked((int)(0x100)); + public const int RDW_ERASENOW = unchecked((int)(0x200)); - public const int RDW_FRAME = unchecked( (int)( 0x400 ) ); - public const int RDW_NOFRAME = unchecked( (int)( 0x800 ) ); + public const int RDW_FRAME = unchecked((int)(0x400)); + public const int RDW_NOFRAME = unchecked((int)(0x800)); - [DllImport( "user32", EntryPoint = "LockWindowUpdate", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LockWindowUpdate( IntPtr hwndLock ); + [DllImport("user32", EntryPoint = "LockWindowUpdate", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LockWindowUpdate(IntPtr hwndLock); - [DllImport( "user32", EntryPoint = "ScrollWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ScrollWindow( IntPtr hWnd, int XAmount, int YAmount, ref RECT lpRect, ref RECT lpClipRect ); + [DllImport("user32", EntryPoint = "ScrollWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ScrollWindow(IntPtr hWnd, int XAmount, int YAmount, ref RECT lpRect, ref RECT lpClipRect); - [DllImport( "user32", EntryPoint = "ScrollDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ScrollDC( IntPtr hdc, int dx, int dy, ref RECT lprcScroll, ref RECT lprcClip, IntPtr hrgnUpdate, ref RECT lprcUpdate ); + [DllImport("user32", EntryPoint = "ScrollDC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ScrollDC(IntPtr hdc, int dx, int dy, ref RECT lprcScroll, ref RECT lprcClip, IntPtr hrgnUpdate, ref RECT lprcUpdate); - [DllImport( "user32", EntryPoint = "ScrollWindowEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ScrollWindowEx( IntPtr hWnd, int dx, int dy, ref RECT lprcScroll, ref RECT lprcClip, IntPtr hrgnUpdate, ref RECT lprcUpdate, int fuScroll ); + [DllImport("user32", EntryPoint = "ScrollWindowEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ScrollWindowEx(IntPtr hWnd, int dx, int dy, ref RECT lprcScroll, ref RECT lprcClip, IntPtr hrgnUpdate, ref RECT lprcUpdate, int fuScroll); - public const int SW_SCROLLCHILDREN = unchecked( (int)( 0x1 ) ); - public const int SW_INVALIDATE = unchecked( (int)( 0x2 ) ); - public const int SW_ERASE = unchecked( (int)( 0x4 ) ); + public const int SW_SCROLLCHILDREN = unchecked((int)(0x1)); + public const int SW_INVALIDATE = unchecked((int)(0x2)); + public const int SW_ERASE = unchecked((int)(0x4)); - [DllImport( "user32", EntryPoint = "SetScrollPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetScrollPos( IntPtr hWnd, int nBar, int nPos, int bRedraw ); + [DllImport("user32", EntryPoint = "SetScrollPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetScrollPos(IntPtr hWnd, int nBar, int nPos, int bRedraw); - [DllImport( "user32", EntryPoint = "GetScrollPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetScrollPos( IntPtr hWnd, int nBar ); + [DllImport("user32", EntryPoint = "GetScrollPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetScrollPos(IntPtr hWnd, int nBar); - [DllImport( "user32", EntryPoint = "SetScrollRange", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetScrollRange( IntPtr hWnd, int nBar, int nMinPos, int nMaxPos, int bRedraw ); + [DllImport("user32", EntryPoint = "SetScrollRange", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetScrollRange(IntPtr hWnd, int nBar, int nMinPos, int nMaxPos, int bRedraw); - [DllImport( "user32", EntryPoint = "GetScrollRange", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetScrollRange( IntPtr hWnd, int nBar, IntPtr lpMinPos, IntPtr lpMaxPos ); + [DllImport("user32", EntryPoint = "GetScrollRange", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetScrollRange(IntPtr hWnd, int nBar, IntPtr lpMinPos, IntPtr lpMaxPos); - [DllImport( "user32", EntryPoint = "ShowScrollBar", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ShowScrollBar( IntPtr hWnd, int wBar, int bShow ); + [DllImport("user32", EntryPoint = "ShowScrollBar", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ShowScrollBar(IntPtr hWnd, int wBar, int bShow); - [DllImport( "user32", EntryPoint = "EnableScrollBar", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnableScrollBar( IntPtr hWnd, int wSBflags, int wArrows ); + [DllImport("user32", EntryPoint = "EnableScrollBar", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnableScrollBar(IntPtr hWnd, int wSBflags, int wArrows); // EnableScrollBar() flags - public const int ESB_ENABLE_BOTH = unchecked( (int)( 0x0 ) ); - public const int ESB_DISABLE_BOTH = unchecked( (int)( 0x3 ) ); + public const int ESB_ENABLE_BOTH = unchecked((int)(0x0)); + public const int ESB_DISABLE_BOTH = unchecked((int)(0x3)); - public const int ESB_DISABLE_LEFT = unchecked( (int)( 0x1 ) ); - public const int ESB_DISABLE_RIGHT = unchecked( (int)( 0x2 ) ); + public const int ESB_DISABLE_LEFT = unchecked((int)(0x1)); + public const int ESB_DISABLE_RIGHT = unchecked((int)(0x2)); - public const int ESB_DISABLE_UP = unchecked( (int)( 0x1 ) ); - public const int ESB_DISABLE_DOWN = unchecked( (int)( 0x2 ) ); + public const int ESB_DISABLE_UP = unchecked((int)(0x1)); + public const int ESB_DISABLE_DOWN = unchecked((int)(0x2)); - public const int ESB_DISABLE_LTUP = unchecked( (int)( ESB_DISABLE_LEFT ) ); - public const int ESB_DISABLE_RTDN = unchecked( (int)( ESB_DISABLE_RIGHT ) ); + public const int ESB_DISABLE_LTUP = unchecked((int)(ESB_DISABLE_LEFT)); + public const int ESB_DISABLE_RTDN = unchecked((int)(ESB_DISABLE_RIGHT)); - [DllImport( "user32", EntryPoint = "SetProp", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetProp( IntPtr hWnd, string lpString, IntPtr hData ); + [DllImport("user32", EntryPoint = "SetProp", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetProp(IntPtr hWnd, string lpString, IntPtr hData); - [DllImport( "user32", EntryPoint = "GetProp", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetProp( IntPtr hWnd, string lpString ); + [DllImport("user32", EntryPoint = "GetProp", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetProp(IntPtr hWnd, string lpString); - [DllImport( "user32", EntryPoint = "RemoveProp", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RemoveProp( IntPtr hWnd, string lpString ); + [DllImport("user32", EntryPoint = "RemoveProp", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RemoveProp(IntPtr hWnd, string lpString); - [DllImport( "user32", EntryPoint = "SetWindowText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetWindowText( IntPtr hWnd, string lpString ); + [DllImport("user32", EntryPoint = "SetWindowText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetWindowText(IntPtr hWnd, string lpString); - [DllImport( "user32", EntryPoint = "SetWindowTextA", SetLastError = true, CharSet = CharSet.None, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetWindowTextA( IntPtr hWnd, string lpString ); + [DllImport("user32", EntryPoint = "SetWindowTextA", SetLastError = true, CharSet = CharSet.None, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetWindowTextA(IntPtr hWnd, string lpString); - [DllImport( "user32", EntryPoint = "SetWindowTextW", SetLastError = true, CharSet = CharSet.None, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetWindowTextW( IntPtr hWnd, string lpString ); + [DllImport("user32", EntryPoint = "SetWindowTextW", SetLastError = true, CharSet = CharSet.None, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetWindowTextW(IntPtr hWnd, string lpString); - [DllImport( "user32", EntryPoint = "GetWindowText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWindowText( IntPtr hWnd, string sString, int cch ); + [DllImport("user32", EntryPoint = "GetWindowText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWindowText(IntPtr hWnd, string sString, int cch); - [DllImport( "user32", EntryPoint = "GetWindowTextA", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWindowTextA( IntPtr hWnd, IntPtr lpString, int cch ); + [DllImport("user32", EntryPoint = "GetWindowTextA", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWindowTextA(IntPtr hWnd, IntPtr lpString, int cch); - [DllImport( "user32", EntryPoint = "GetWindowTextW", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWindowTextW( IntPtr hWnd, IntPtr lpString, int cch ); + [DllImport("user32", EntryPoint = "GetWindowTextW", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWindowTextW(IntPtr hWnd, IntPtr lpString, int cch); - [DllImport( "user32", EntryPoint = "GetWindowTextLength", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWindowTextLength( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "GetWindowTextLength", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWindowTextLength(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "GetWindowTextLengthA", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWindowTextLengthA( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "GetWindowTextLengthA", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWindowTextLengthA(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "GetWindowTextLengthW", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWindowTextLengthW( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "GetWindowTextLengthW", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWindowTextLengthW(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "GetClientRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetClientRect( IntPtr hWnd, ref RECT lpRect ); + [DllImport("user32", EntryPoint = "GetClientRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetClientRect(IntPtr hWnd, ref RECT lpRect); - [DllImport( "user32", EntryPoint = "GetWindowRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWindowRect( IntPtr hWnd, ref RECT lpRect ); + [DllImport("user32", EntryPoint = "GetWindowRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWindowRect(IntPtr hWnd, ref RECT lpRect); - [DllImport( "user32", EntryPoint = "AdjustWindowRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AdjustWindowRect( ref RECT lpRect, int dwStyle, int bMenu ); + [DllImport("user32", EntryPoint = "AdjustWindowRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AdjustWindowRect(ref RECT lpRect, int dwStyle, int bMenu); - [DllImport( "user32", EntryPoint = "AdjustWindowRectEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AdjustWindowRectEx( ref RECT lpRect, int dsStyle, int bMenu, int dwEsStyle ); + [DllImport("user32", EntryPoint = "AdjustWindowRectEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AdjustWindowRectEx(ref RECT lpRect, int dsStyle, int bMenu, int dwEsStyle); // MessageBox() Flags - public const int MB_OK = unchecked( (int)( 0x0 ) ); - public const int MB_OKCANCEL = unchecked( (int)( 0x1 ) ); - public const int MB_ABORTRETRYIGNORE = unchecked( (int)( 0x2 ) ); - public const int MB_YESNOCANCEL = unchecked( (int)( 0x3 ) ); - public const int MB_YESNO = unchecked( (int)( 0x4 ) ); - public const int MB_RETRYCANCEL = unchecked( (int)( 0x5 ) ); + public const int MB_OK = unchecked((int)(0x0)); + public const int MB_OKCANCEL = unchecked((int)(0x1)); + public const int MB_ABORTRETRYIGNORE = unchecked((int)(0x2)); + public const int MB_YESNOCANCEL = unchecked((int)(0x3)); + public const int MB_YESNO = unchecked((int)(0x4)); + public const int MB_RETRYCANCEL = unchecked((int)(0x5)); - public const int MB_ICONHAND = unchecked( (int)( 0x10 ) ); - public const int MB_ICONQUESTION = unchecked( (int)( 0x20 ) ); - public const int MB_ICONEXCLAMATION = unchecked( (int)( 0x30 ) ); - public const int MB_ICONASTERISK = unchecked( (int)( 0x40 ) ); + public const int MB_ICONHAND = unchecked((int)(0x10)); + public const int MB_ICONQUESTION = unchecked((int)(0x20)); + public const int MB_ICONEXCLAMATION = unchecked((int)(0x30)); + public const int MB_ICONASTERISK = unchecked((int)(0x40)); - public const int MB_ICONINFORMATION = unchecked( (int)( MB_ICONASTERISK ) ); - public const int MB_ICONSTOP = unchecked( (int)( MB_ICONHAND ) ); + public const int MB_ICONINFORMATION = unchecked((int)(MB_ICONASTERISK)); + public const int MB_ICONSTOP = unchecked((int)(MB_ICONHAND)); - public const int MB_DEFBUTTON1 = unchecked( (int)( 0x0 ) ); - public const int MB_DEFBUTTON2 = unchecked( (int)( 0x100 ) ); - public const int MB_DEFBUTTON3 = unchecked( (int)( 0x200 ) ); + public const int MB_DEFBUTTON1 = unchecked((int)(0x0)); + public const int MB_DEFBUTTON2 = unchecked((int)(0x100)); + public const int MB_DEFBUTTON3 = unchecked((int)(0x200)); - public const int MB_APPLMODAL = unchecked( (int)( 0x0 ) ); - public const int MB_SYSTEMMODAL = unchecked( (int)( 0x1000 ) ); - public const int MB_TASKMODAL = unchecked( (int)( 0x2000 ) ); + public const int MB_APPLMODAL = unchecked((int)(0x0)); + public const int MB_SYSTEMMODAL = unchecked((int)(0x1000)); + public const int MB_TASKMODAL = unchecked((int)(0x2000)); - public const int MB_NOFOCUS = unchecked( (int)( 0x8000 ) ); - public const int MB_SETFOREGROUND = unchecked( (int)( 0x10000 ) ); - public const int MB_DEFAULT_DESKTOP_ONLY = unchecked( (int)( 0x20000 ) ); + public const int MB_NOFOCUS = unchecked((int)(0x8000)); + public const int MB_SETFOREGROUND = unchecked((int)(0x10000)); + public const int MB_DEFAULT_DESKTOP_ONLY = unchecked((int)(0x20000)); - public const int MB_TYPEMASK = unchecked( (int)( 0xF ) ); - public const int MB_ICONMASK = unchecked( (int)( 0xF0 ) ); - public const int MB_DEFMASK = unchecked( (int)( 0xF00 ) ); - public const int MB_MODEMASK = unchecked( (int)( 0x3000 ) ); - public const int MB_MISCMASK = unchecked( (int)( 0xC000 ) ); + public const int MB_TYPEMASK = unchecked((int)(0xF)); + public const int MB_ICONMASK = unchecked((int)(0xF0)); + public const int MB_DEFMASK = unchecked((int)(0xF00)); + public const int MB_MODEMASK = unchecked((int)(0x3000)); + public const int MB_MISCMASK = unchecked((int)(0xC000)); - [DllImport( "user32", EntryPoint = "MessageBox", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MessageBox( IntPtr hWnd, string lpText, string lpCaption, int wType ); + [DllImport("user32", EntryPoint = "MessageBox", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MessageBox(IntPtr hWnd, string lpText, string lpCaption, int wType); - [DllImport( "user32", EntryPoint = "MessageBoxEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MessageBoxEx( IntPtr hWnd, string lpText, string lpCaption, int uType, int wLanguageId ); + [DllImport("user32", EntryPoint = "MessageBoxEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MessageBoxEx(IntPtr hWnd, string lpText, string lpCaption, int uType, int wLanguageId); - [DllImport( "user32", EntryPoint = "MessageBeep", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MessageBeep( int wType ); + [DllImport("user32", EntryPoint = "MessageBeep", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MessageBeep(int wType); - [DllImport( "user32", EntryPoint = "ShowCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ShowCursor( int bShow ); + [DllImport("user32", EntryPoint = "ShowCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ShowCursor(int bShow); - [DllImport( "user32", EntryPoint = "SetCursorPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetCursorPos( int x, int y ); + [DllImport("user32", EntryPoint = "SetCursorPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetCursorPos(int x, int y); - [DllImport( "user32", EntryPoint = "SetCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetCursor( IntPtr hCursor ); + [DllImport("user32", EntryPoint = "SetCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetCursor(IntPtr hCursor); - [DllImport( "user32", EntryPoint = "GetCursorPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCursorPos( ref POINTAPI lpPoint ); + [DllImport("user32", EntryPoint = "GetCursorPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCursorPos(ref POINTAPI lpPoint); - [DllImport( "user32", EntryPoint = "ClipCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ClipCursor( IntPtr lpRect ); + [DllImport("user32", EntryPoint = "ClipCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ClipCursor(IntPtr lpRect); - [DllImport( "user32", EntryPoint = "GetCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "GetCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetCursor(); - [DllImport( "user32", EntryPoint = "GetClipCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetClipCursor( ref RECT lprc ); + [DllImport("user32", EntryPoint = "GetClipCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetClipCursor(ref RECT lprc); - [DllImport( "user32", EntryPoint = "CreateCaret", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateCaret( IntPtr hWnd, IntPtr hBitmap, int nWidth, int nHeight ); + [DllImport("user32", EntryPoint = "CreateCaret", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateCaret(IntPtr hWnd, IntPtr hBitmap, int nWidth, int nHeight); - [DllImport( "user32", EntryPoint = "GetCaretBlinkTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "GetCaretBlinkTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetCaretBlinkTime(); - [DllImport( "user32", EntryPoint = "SetCaretBlinkTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetCaretBlinkTime( int wMSeconds ); + [DllImport("user32", EntryPoint = "SetCaretBlinkTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetCaretBlinkTime(int wMSeconds); - [DllImport( "user32", EntryPoint = "DestroyCaret", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "DestroyCaret", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int DestroyCaret(); - [DllImport( "user32", EntryPoint = "HideCaret", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int HideCaret( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "HideCaret", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int HideCaret(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "ShowCaret", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ShowCaret( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "ShowCaret", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ShowCaret(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "SetCaretPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetCaretPos( int x, int y ); + [DllImport("user32", EntryPoint = "SetCaretPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetCaretPos(int x, int y); - [DllImport( "user32", EntryPoint = "GetCaretPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCaretPos( ref POINTAPI lpPoint ); + [DllImport("user32", EntryPoint = "GetCaretPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCaretPos(ref POINTAPI lpPoint); - [DllImport( "user32", EntryPoint = "ClientToScreen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ClientToScreen( IntPtr hWnd, ref POINTAPI lpPoint ); + [DllImport("user32", EntryPoint = "ClientToScreen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ClientToScreen(IntPtr hWnd, ref POINTAPI lpPoint); - [DllImport( "user32", EntryPoint = "ScreenToClient", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ScreenToClient( IntPtr hWnd, ref POINTAPI lpPoint ); + [DllImport("user32", EntryPoint = "ScreenToClient", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ScreenToClient(IntPtr hWnd, ref POINTAPI lpPoint); - [DllImport( "user32", EntryPoint = "MapWindowPoints", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MapWindowPoints( IntPtr hwndFrom, IntPtr hwndTo, ref RECT lprt, int cPoints ); + [DllImport("user32", EntryPoint = "MapWindowPoints", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MapWindowPoints(IntPtr hwndFrom, IntPtr hwndTo, ref RECT lprt, int cPoints); - [DllImport( "user32", EntryPoint = "MapWindowPoints", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MapWindowPoints( IntPtr hwndFrom, IntPtr hwndTo, ref POINTAPI lppt, int cPoints ); + [DllImport("user32", EntryPoint = "MapWindowPoints", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MapWindowPoints(IntPtr hwndFrom, IntPtr hwndTo, ref POINTAPI lppt, int cPoints); - [DllImport( "user32", EntryPoint = "WindowFromPoint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WindowFromPoint( int xPoint, int yPoint ); + [DllImport("user32", EntryPoint = "WindowFromPoint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WindowFromPoint(int xPoint, int yPoint); - [DllImport( "user32", EntryPoint = "ChildWindowFromPoint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ChildWindowFromPoint( IntPtr hWnd, int xPoint, int yPoint ); + [DllImport("user32", EntryPoint = "ChildWindowFromPoint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ChildWindowFromPoint(IntPtr hWnd, int xPoint, int yPoint); - [DllImport( "user32", EntryPoint = "RealChildWindowFromPoint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RealChildWindowFromPoint( IntPtr hWnd, int xPoint, int yPoint ); + [DllImport("user32", EntryPoint = "RealChildWindowFromPoint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RealChildWindowFromPoint(IntPtr hWnd, int xPoint, int yPoint); // Color Types - public const int CTLCOLOR_MSGBOX = unchecked( (int)( 0 ) ); - public const int CTLCOLOR_EDIT = unchecked( (int)( 1 ) ); - public const int CTLCOLOR_LISTBOX = unchecked( (int)( 2 ) ); - public const int CTLCOLOR_BTN = unchecked( (int)( 3 ) ); - public const int CTLCOLOR_DLG = unchecked( (int)( 4 ) ); - public const int CTLCOLOR_SCROLLBAR = unchecked( (int)( 5 ) ); - public const int CTLCOLOR_STATIC = unchecked( (int)( 6 ) ); - public const int CTLCOLOR_MAX = unchecked( (int)( 8 ) );// three bits max + public const int CTLCOLOR_MSGBOX = unchecked((int)(0)); + public const int CTLCOLOR_EDIT = unchecked((int)(1)); + public const int CTLCOLOR_LISTBOX = unchecked((int)(2)); + public const int CTLCOLOR_BTN = unchecked((int)(3)); + public const int CTLCOLOR_DLG = unchecked((int)(4)); + public const int CTLCOLOR_SCROLLBAR = unchecked((int)(5)); + public const int CTLCOLOR_STATIC = unchecked((int)(6)); + public const int CTLCOLOR_MAX = unchecked((int)(8));// three bits max - public const int COLOR_SCROLLBAR = unchecked( (int)( 0 ) ); - public const int COLOR_BACKGROUND = unchecked( (int)( 1 ) ); - public const int COLOR_ACTIVECAPTION = unchecked( (int)( 2 ) ); - public const int COLOR_INACTIVECAPTION = unchecked( (int)( 3 ) ); - public const int COLOR_MENU = unchecked( (int)( 4 ) ); - public const int COLOR_WINDOW = unchecked( (int)( 5 ) ); - public const int COLOR_WINDOWFRAME = unchecked( (int)( 6 ) ); - public const int COLOR_MENUTEXT = unchecked( (int)( 7 ) ); - public const int COLOR_WINDOWTEXT = unchecked( (int)( 8 ) ); - public const int COLOR_CAPTIONTEXT = unchecked( (int)( 9 ) ); - public const int COLOR_ACTIVEBORDER = unchecked( (int)( 10 ) ); - public const int COLOR_INACTIVEBORDER = unchecked( (int)( 11 ) ); - public const int COLOR_APPWORKSPACE = unchecked( (int)( 12 ) ); - public const int COLOR_HIGHLIGHT = unchecked( (int)( 13 ) ); - public const int COLOR_HIGHLIGHTTEXT = unchecked( (int)( 14 ) ); - public const int COLOR_BTNFACE = unchecked( (int)( 15 ) ); - public const int COLOR_BTNSHADOW = unchecked( (int)( 16 ) ); - public const int COLOR_GRAYTEXT = unchecked( (int)( 17 ) ); - public const int COLOR_BTNTEXT = unchecked( (int)( 18 ) ); - public const int COLOR_INACTIVECAPTIONTEXT = unchecked( (int)( 19 ) ); - public const int COLOR_BTNHIGHLIGHT = unchecked( (int)( 20 ) ); + public const int COLOR_SCROLLBAR = unchecked((int)(0)); + public const int COLOR_BACKGROUND = unchecked((int)(1)); + public const int COLOR_ACTIVECAPTION = unchecked((int)(2)); + public const int COLOR_INACTIVECAPTION = unchecked((int)(3)); + public const int COLOR_MENU = unchecked((int)(4)); + public const int COLOR_WINDOW = unchecked((int)(5)); + public const int COLOR_WINDOWFRAME = unchecked((int)(6)); + public const int COLOR_MENUTEXT = unchecked((int)(7)); + public const int COLOR_WINDOWTEXT = unchecked((int)(8)); + public const int COLOR_CAPTIONTEXT = unchecked((int)(9)); + public const int COLOR_ACTIVEBORDER = unchecked((int)(10)); + public const int COLOR_INACTIVEBORDER = unchecked((int)(11)); + public const int COLOR_APPWORKSPACE = unchecked((int)(12)); + public const int COLOR_HIGHLIGHT = unchecked((int)(13)); + public const int COLOR_HIGHLIGHTTEXT = unchecked((int)(14)); + public const int COLOR_BTNFACE = unchecked((int)(15)); + public const int COLOR_BTNSHADOW = unchecked((int)(16)); + public const int COLOR_GRAYTEXT = unchecked((int)(17)); + public const int COLOR_BTNTEXT = unchecked((int)(18)); + public const int COLOR_INACTIVECAPTIONTEXT = unchecked((int)(19)); + public const int COLOR_BTNHIGHLIGHT = unchecked((int)(20)); - [DllImport( "user32", EntryPoint = "GetSysColor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSysColor( int nIndex ); + [DllImport("user32", EntryPoint = "GetSysColor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSysColor(int nIndex); - [DllImport( "user32", EntryPoint = "SetSysColors", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetSysColors( int nChanges, IntPtr lpSysColor, IntPtr lpColorValues ); + [DllImport("user32", EntryPoint = "SetSysColors", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetSysColors(int nChanges, IntPtr lpSysColor, IntPtr lpColorValues); - [DllImport( "user32", EntryPoint = "DrawFocusRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DrawFocusRect( IntPtr hdc, ref RECT lpRect ); + [DllImport("user32", EntryPoint = "DrawFocusRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DrawFocusRect(IntPtr hdc, ref RECT lpRect); - [DllImport( "user32", EntryPoint = "FillRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FillRect( IntPtr hdc, ref RECT lpRect, IntPtr hBrush ); + [DllImport("user32", EntryPoint = "FillRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FillRect(IntPtr hdc, ref RECT lpRect, IntPtr hBrush); - [DllImport( "user32", EntryPoint = "FrameRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FrameRect( IntPtr hdc, ref RECT lpRect, IntPtr hBrush ); + [DllImport("user32", EntryPoint = "FrameRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FrameRect(IntPtr hdc, ref RECT lpRect, IntPtr hBrush); - [DllImport( "user32", EntryPoint = "InvertRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int InvertRect( IntPtr hdc, ref RECT lpRect ); + [DllImport("user32", EntryPoint = "InvertRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int InvertRect(IntPtr hdc, ref RECT lpRect); - [DllImport( "user32", EntryPoint = "SetRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetRect( ref RECT lpRect, int X1, int Y1, int X2, int Y2 ); + [DllImport("user32", EntryPoint = "SetRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetRect(ref RECT lpRect, int X1, int Y1, int X2, int Y2); - [DllImport( "user32", EntryPoint = "SetRectEmpty", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetRectEmpty( ref RECT lpRect ); + [DllImport("user32", EntryPoint = "SetRectEmpty", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetRectEmpty(ref RECT lpRect); - [DllImport( "user32", EntryPoint = "CopyRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CopyRect( ref RECT lpDestRect, ref RECT lpSourceRect ); + [DllImport("user32", EntryPoint = "CopyRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CopyRect(ref RECT lpDestRect, ref RECT lpSourceRect); - [DllImport( "user32", EntryPoint = "InflateRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int InflateRect( ref RECT lpRect, int x, int y ); + [DllImport("user32", EntryPoint = "InflateRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int InflateRect(ref RECT lpRect, int x, int y); - [DllImport( "user32", EntryPoint = "IntersectRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IntersectRect( ref RECT lpDestRect, ref RECT lpSrc1Rect, ref RECT lpSrc2Rect ); + [DllImport("user32", EntryPoint = "IntersectRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IntersectRect(ref RECT lpDestRect, ref RECT lpSrc1Rect, ref RECT lpSrc2Rect); - [DllImport( "user32", EntryPoint = "UnionRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int UnionRect( ref RECT lpDestRect, ref RECT lpSrc1Rect, ref RECT lpSrc2Rect ); + [DllImport("user32", EntryPoint = "UnionRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int UnionRect(ref RECT lpDestRect, ref RECT lpSrc1Rect, ref RECT lpSrc2Rect); - [DllImport( "user32", EntryPoint = "SubtractRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SubtractRect( ref RECT lprcDst, ref RECT lprcSrc1, ref RECT lprcSrc2 ); + [DllImport("user32", EntryPoint = "SubtractRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SubtractRect(ref RECT lprcDst, ref RECT lprcSrc1, ref RECT lprcSrc2); - [DllImport( "user32", EntryPoint = "OffsetRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OffsetRect( ref RECT lpRect, int x, int y ); + [DllImport("user32", EntryPoint = "OffsetRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OffsetRect(ref RECT lpRect, int x, int y); - [DllImport( "user32", EntryPoint = "IsRectEmpty", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsRectEmpty( ref RECT lpRect ); + [DllImport("user32", EntryPoint = "IsRectEmpty", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsRectEmpty(ref RECT lpRect); - [DllImport( "user32", EntryPoint = "EqualRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EqualRect( ref RECT lpRect1, ref RECT lpRect2 ); + [DllImport("user32", EntryPoint = "EqualRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EqualRect(ref RECT lpRect1, ref RECT lpRect2); - [DllImport( "user32", EntryPoint = "PtInRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PtInRect( ref RECT lpRect, POINTAPI pt ); + [DllImport("user32", EntryPoint = "PtInRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PtInRect(ref RECT lpRect, POINTAPI pt); - [DllImport( "user32", EntryPoint = "GetWindowWord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWindowWord( IntPtr hWnd, int nIndex ); + [DllImport("user32", EntryPoint = "GetWindowWord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWindowWord(IntPtr hWnd, int nIndex); - [DllImport( "user32", EntryPoint = "SetWindowWord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetWindowWord( IntPtr hWnd, int nIndex, int wNewWord ); + [DllImport("user32", EntryPoint = "SetWindowWord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetWindowWord(IntPtr hWnd, int nIndex, int wNewWord); - [DllImport( "user32", EntryPoint = "GetWindowLong", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWindowLong( IntPtr hWnd, int nIndex ); + [DllImport("user32", EntryPoint = "GetWindowLong", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWindowLong(IntPtr hWnd, int nIndex); - [DllImport( "user32", EntryPoint = "SetWindowLong", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetWindowLong( IntPtr hWnd, int nIndex, int dwNewLong ); + [DllImport("user32", EntryPoint = "SetWindowLong", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); - [DllImport( "user32", EntryPoint = "GetClassWord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetClassWord( IntPtr hWnd, int nIndex ); + [DllImport("user32", EntryPoint = "GetClassWord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetClassWord(IntPtr hWnd, int nIndex); - [DllImport( "user32", EntryPoint = "SetClassWord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetClassWord( IntPtr hWnd, int nIndex, int wNewWord ); + [DllImport("user32", EntryPoint = "SetClassWord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetClassWord(IntPtr hWnd, int nIndex, int wNewWord); - [DllImport( "user32", EntryPoint = "GetClassLong", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetClassLong( IntPtr hWnd, int nIndex ); + [DllImport("user32", EntryPoint = "GetClassLong", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetClassLong(IntPtr hWnd, int nIndex); - [DllImport( "user32", EntryPoint = "SetClassLong", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetClassLong( IntPtr hWnd, int nIndex, int dwNewLong ); + [DllImport("user32", EntryPoint = "SetClassLong", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetClassLong(IntPtr hWnd, int nIndex, int dwNewLong); - [DllImport( "user32", EntryPoint = "GetDesktopWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("user32", EntryPoint = "GetDesktopWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int GetDesktopWindow(); - [DllImport( "user32", EntryPoint = "GetParent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern IntPtr GetParent( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "GetParent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern IntPtr GetParent(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "SetParent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetParent( IntPtr hWndChild, IntPtr hWndNewParent ); + [DllImport("user32", EntryPoint = "SetParent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetParent(IntPtr hWndChild, IntPtr hWndNewParent); - [DllImport( "user32", EntryPoint = "FindWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FindWindow( string lpClassName, string lpWindowName ); + [DllImport("user32", EntryPoint = "FindWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FindWindow(string lpClassName, string lpWindowName); - [DllImport( "user32", EntryPoint = "GetClassName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetClassName( IntPtr hWnd, string sClassName, int nMaxCount ); + [DllImport("user32", EntryPoint = "GetClassName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetClassName(IntPtr hWnd, string sClassName, int nMaxCount); - [DllImport( "user32", EntryPoint = "GetClassNameA", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetClassNameA( IntPtr hWnd, IntPtr lpClassName, int nMaxCount ); + [DllImport("user32", EntryPoint = "GetClassNameA", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetClassNameA(IntPtr hWnd, IntPtr lpClassName, int nMaxCount); - [DllImport( "user32", EntryPoint = "GetClassNameW", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetClassNameW( IntPtr hWnd, IntPtr lpClassName, int nMaxCount ); + [DllImport("user32", EntryPoint = "GetClassNameW", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetClassNameW(IntPtr hWnd, IntPtr lpClassName, int nMaxCount); - [DllImport( "user32", EntryPoint = "GetTopWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetTopWindow( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "GetTopWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetTopWindow(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "GetWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetNextWindow( IntPtr hWnd, int wFlag ); + [DllImport("user32", EntryPoint = "GetWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetNextWindow(IntPtr hWnd, int wFlag); - [DllImport( "user32", EntryPoint = "GetWindowThreadProcessId", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWindowThreadProcessId( IntPtr hWnd, ref int lpdwProcessId ); + [DllImport("user32", EntryPoint = "GetWindowThreadProcessId", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWindowThreadProcessId(IntPtr hWnd, ref int lpdwProcessId); - [DllImport( "user32", EntryPoint = "GetLastActivePopup", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetLastActivePopup( IntPtr hwndOwnder ); + [DllImport("user32", EntryPoint = "GetLastActivePopup", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetLastActivePopup(IntPtr hwndOwnder); // GetWindow() Constants - public const int GW_HWNDFIRST = unchecked( (int)( 0 ) ); - public const int GW_HWNDLAST = unchecked( (int)( 1 ) ); - public const int GW_HWNDNEXT = unchecked( (int)( 2 ) ); - public const int GW_HWNDPREV = unchecked( (int)( 3 ) ); - public const int GW_OWNER = unchecked( (int)( 4 ) ); - public const int GW_CHILD = unchecked( (int)( 5 ) ); - public const int GW_MAX = unchecked( (int)( 5 ) ); + public const int GW_HWNDFIRST = unchecked((int)(0)); + public const int GW_HWNDLAST = unchecked((int)(1)); + public const int GW_HWNDNEXT = unchecked((int)(2)); + public const int GW_HWNDPREV = unchecked((int)(3)); + public const int GW_OWNER = unchecked((int)(4)); + public const int GW_CHILD = unchecked((int)(5)); + public const int GW_MAX = unchecked((int)(5)); - [DllImport( "user32", EntryPoint = "GetWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWindow( IntPtr hWnd, int wCmd ); + [DllImport("user32", EntryPoint = "GetWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWindow(IntPtr hWnd, int wCmd); - [DllImport( "user32", EntryPoint = "UnhookWindowsHookEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int UnhookWindowsHookEx( IntPtr hHook ); + [DllImport("user32", EntryPoint = "UnhookWindowsHookEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int UnhookWindowsHookEx(IntPtr hHook); - [DllImport( "user32", EntryPoint = "CallNextHookEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CallNextHookEx( IntPtr hHook, int ncode, int wParam, object lParam ); + [DllImport("user32", EntryPoint = "CallNextHookEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CallNextHookEx(IntPtr hHook, int ncode, int wParam, object lParam); // Menu flags for Add/Check/EnableMenuItem() - public const int MF_INSERT = unchecked( (int)( 0x0 ) ); - public const int MF_CHANGE = unchecked( (int)( 0x80 ) ); - public const int MF_APPEND = unchecked( (int)( 0x100 ) ); - public const int MF_DELETE = unchecked( (int)( 0x200 ) ); - public const int MF_REMOVE = unchecked( (int)( 0x1000 ) ); + public const int MF_INSERT = unchecked((int)(0x0)); + public const int MF_CHANGE = unchecked((int)(0x80)); + public const int MF_APPEND = unchecked((int)(0x100)); + public const int MF_DELETE = unchecked((int)(0x200)); + public const int MF_REMOVE = unchecked((int)(0x1000)); - public const int MF_BYCOMMAND = unchecked( (int)( 0x0 ) ); - public const int MF_BYPOSITION = unchecked( (int)( 0x400 ) ); + public const int MF_BYCOMMAND = unchecked((int)(0x0)); + public const int MF_BYPOSITION = unchecked((int)(0x400)); - public const int MF_SEPARATOR = unchecked( (int)( 0x800 ) ); + public const int MF_SEPARATOR = unchecked((int)(0x800)); - public const int MF_ENABLED = unchecked( (int)( 0x0 ) ); - public const int MF_GRAYED = unchecked( (int)( 0x1 ) ); - public const int MF_DISABLED = unchecked( (int)( 0x2 ) ); + public const int MF_ENABLED = unchecked((int)(0x0)); + public const int MF_GRAYED = unchecked((int)(0x1)); + public const int MF_DISABLED = unchecked((int)(0x2)); - public const int MF_UNCHECKED = unchecked( (int)( 0x0 ) ); - public const int MF_CHECKED = unchecked( (int)( 0x8 ) ); - public const int MF_USECHECKBITMAPS = unchecked( (int)( 0x200 ) ); + public const int MF_UNCHECKED = unchecked((int)(0x0)); + public const int MF_CHECKED = unchecked((int)(0x8)); + public const int MF_USECHECKBITMAPS = unchecked((int)(0x200)); - public const int MF_STRING = unchecked( (int)( 0x0 ) ); - public const int MF_BITMAP = unchecked( (int)( 0x4 ) ); - public const int MF_OWNERDRAW = unchecked( (int)( 0x100 ) ); + public const int MF_STRING = unchecked((int)(0x0)); + public const int MF_BITMAP = unchecked((int)(0x4)); + public const int MF_OWNERDRAW = unchecked((int)(0x100)); - public const int MF_POPUP = unchecked( (int)( 0x10 ) ); - public const int MF_MENUBARBREAK = unchecked( (int)( 0x20 ) ); - public const int MF_MENUBREAK = unchecked( (int)( 0x40 ) ); + public const int MF_POPUP = unchecked((int)(0x10)); + public const int MF_MENUBARBREAK = unchecked((int)(0x20)); + public const int MF_MENUBREAK = unchecked((int)(0x40)); - public const int MF_UNHILITE = unchecked( (int)( 0x0 ) ); - public const int MF_HILITE = unchecked( (int)( 0x80 ) ); + public const int MF_UNHILITE = unchecked((int)(0x0)); + public const int MF_HILITE = unchecked((int)(0x80)); - public const int MF_SYSMENU = unchecked( (int)( 0x2000 ) ); - public const int MF_HELP = unchecked( (int)( 0x4000 ) ); - public const int MF_MOUSESELECT = unchecked( (int)( 0x8000 ) ); + public const int MF_SYSMENU = unchecked((int)(0x2000)); + public const int MF_HELP = unchecked((int)(0x4000)); + public const int MF_MOUSESELECT = unchecked((int)(0x8000)); // Menu item resource format - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MENUITEMTEMPLATEHEADER { public int versionNumber; public int offset; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MENUITEMTEMPLATE { public int mtOption; @@ -9774,66 +9774,66 @@ public struct MENUITEMTEMPLATE public byte mtString; } - public const int MF_END = unchecked( (int)( 0x80 ) ); + public const int MF_END = unchecked((int)(0x80)); // System Menu Command Values - public const int SC_SIZE = unchecked( (int)( 0xF000 ) ); - public const int SC_MOVE = unchecked( (int)( 0xF010 ) ); - public const int SC_MINIMIZE = unchecked( (int)( 0xF020 ) ); - public const int SC_MAXIMIZE = unchecked( (int)( 0xF030 ) ); - public const int SC_NEXTWINDOW = unchecked( (int)( 0xF040 ) ); - public const int SC_PREVWINDOW = unchecked( (int)( 0xF050 ) ); - public const int SC_CLOSE = unchecked( (int)( 0xF060 ) ); - public const int SC_VSCROLL = unchecked( (int)( 0xF070 ) ); - public const int SC_HSCROLL = unchecked( (int)( 0xF080 ) ); - public const int SC_MOUSEMENU = unchecked( (int)( 0xF090 ) ); - public const int SC_KEYMENU = unchecked( (int)( 0xF100 ) ); - public const int SC_ARRANGE = unchecked( (int)( 0xF110 ) ); - public const int SC_RESTORE = unchecked( (int)( 0xF120 ) ); - public const int SC_TASKLIST = unchecked( (int)( 0xF130 ) ); - public const int SC_SCREENSAVE = unchecked( (int)( 0xF140 ) ); - public const int SC_HOTKEY = unchecked( (int)( 0xF150 ) ); + public const int SC_SIZE = unchecked((int)(0xF000)); + public const int SC_MOVE = unchecked((int)(0xF010)); + public const int SC_MINIMIZE = unchecked((int)(0xF020)); + public const int SC_MAXIMIZE = unchecked((int)(0xF030)); + public const int SC_NEXTWINDOW = unchecked((int)(0xF040)); + public const int SC_PREVWINDOW = unchecked((int)(0xF050)); + public const int SC_CLOSE = unchecked((int)(0xF060)); + public const int SC_VSCROLL = unchecked((int)(0xF070)); + public const int SC_HSCROLL = unchecked((int)(0xF080)); + public const int SC_MOUSEMENU = unchecked((int)(0xF090)); + public const int SC_KEYMENU = unchecked((int)(0xF100)); + public const int SC_ARRANGE = unchecked((int)(0xF110)); + public const int SC_RESTORE = unchecked((int)(0xF120)); + public const int SC_TASKLIST = unchecked((int)(0xF130)); + public const int SC_SCREENSAVE = unchecked((int)(0xF140)); + public const int SC_HOTKEY = unchecked((int)(0xF150)); // Obsolete names - public const int SC_ICON = unchecked( (int)( SC_MINIMIZE ) ); - public const int SC_ZOOM = unchecked( (int)( SC_MAXIMIZE ) ); + public const int SC_ICON = unchecked((int)(SC_MINIMIZE)); + public const int SC_ZOOM = unchecked((int)(SC_MAXIMIZE)); // Resource Loading Routines - [DllImport( "user32", EntryPoint = "LoadBitmap", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LoadBitmap( IntPtr hInstance, string lpBitmapName ); + [DllImport("user32", EntryPoint = "LoadBitmap", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LoadBitmap(IntPtr hInstance, string lpBitmapName); - [DllImport( "user32", EntryPoint = "LoadCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LoadCursor( IntPtr hInstance, string lpCursorName ); + [DllImport("user32", EntryPoint = "LoadCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LoadCursor(IntPtr hInstance, string lpCursorName); - [DllImport( "user32", EntryPoint = "CreateCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateCursor( IntPtr hInstance, int nXhotspot, int nYhotspot, int nWidth, int nHeight, IntPtr lpANDbitPlane, IntPtr lpXORbitPlane ); + [DllImport("user32", EntryPoint = "CreateCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateCursor(IntPtr hInstance, int nXhotspot, int nYhotspot, int nWidth, int nHeight, IntPtr lpANDbitPlane, IntPtr lpXORbitPlane); - [DllImport( "user32", EntryPoint = "DestroyCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DestroyCursor( IntPtr hCursor ); + [DllImport("user32", EntryPoint = "DestroyCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DestroyCursor(IntPtr hCursor); - [DllImport( "user32", EntryPoint = "CopyCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CopyCursor( IntPtr hcur ); + [DllImport("user32", EntryPoint = "CopyCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CopyCursor(IntPtr hcur); // Standard Cursor IDs - public const int IDC_ARROW = unchecked( (int)( 32512 ) ); - public const int IDC_IBEAM = unchecked( (int)( 32513 ) ); - public const int IDC_WAIT = unchecked( (int)( 32514 ) ); - public const int IDC_CROSS = unchecked( (int)( 32515 ) ); - public const int IDC_UPARROW = unchecked( (int)( 32516 ) ); - public const int IDC_SIZE = unchecked( (int)( 32640 ) ); - public const int IDC_ICON = unchecked( (int)( 32641 ) ); - public const int IDC_SIZENWSE = unchecked( (int)( 32642 ) ); - public const int IDC_SIZENESW = unchecked( (int)( 32643 ) ); - public const int IDC_SIZEWE = unchecked( (int)( 32644 ) ); - public const int IDC_SIZENS = unchecked( (int)( 32645 ) ); - public const int IDC_SIZEALL = unchecked( (int)( 32646 ) ); - public const int IDC_NO = unchecked( (int)( 32648 ) ); - public const int IDC_APPSTARTING = unchecked( (int)( 32650 ) ); - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int IDC_ARROW = unchecked((int)(32512)); + public const int IDC_IBEAM = unchecked((int)(32513)); + public const int IDC_WAIT = unchecked((int)(32514)); + public const int IDC_CROSS = unchecked((int)(32515)); + public const int IDC_UPARROW = unchecked((int)(32516)); + public const int IDC_SIZE = unchecked((int)(32640)); + public const int IDC_ICON = unchecked((int)(32641)); + public const int IDC_SIZENWSE = unchecked((int)(32642)); + public const int IDC_SIZENESW = unchecked((int)(32643)); + public const int IDC_SIZEWE = unchecked((int)(32644)); + public const int IDC_SIZENS = unchecked((int)(32645)); + public const int IDC_SIZEALL = unchecked((int)(32646)); + public const int IDC_NO = unchecked((int)(32648)); + public const int IDC_APPSTARTING = unchecked((int)(32650)); + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ICONINFO { public int fIcon; @@ -9844,295 +9844,295 @@ public struct ICONINFO } - [DllImport( "user32", EntryPoint = "LoadIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LoadIcon( IntPtr hInstance, string lpIconName ); + [DllImport("user32", EntryPoint = "LoadIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LoadIcon(IntPtr hInstance, string lpIconName); - [DllImport( "user32", EntryPoint = "CreateIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateIcon( IntPtr hInstance, int nWidth, int nHeight, byte nPlanes, byte nBitsPixel, ref byte lpANDbits, ref byte lpXORbits ); + [DllImport("user32", EntryPoint = "CreateIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateIcon(IntPtr hInstance, int nWidth, int nHeight, byte nPlanes, byte nBitsPixel, ref byte lpANDbits, ref byte lpXORbits); - [DllImport( "user32", EntryPoint = "DestroyIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DestroyIcon( IntPtr hIcon ); + [DllImport("user32", EntryPoint = "DestroyIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DestroyIcon(IntPtr hIcon); - [DllImport( "user32", EntryPoint = "LookupIconIdFromDirectory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LookupIconIdFromDirectory( byte presbits, int fIcon ); + [DllImport("user32", EntryPoint = "LookupIconIdFromDirectory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LookupIconIdFromDirectory(byte presbits, int fIcon); - [DllImport( "user32", EntryPoint = "CreateIconIndirect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateIconIndirect( ICONINFO piconinfo ); + [DllImport("user32", EntryPoint = "CreateIconIndirect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateIconIndirect(ICONINFO piconinfo); - [DllImport( "user32", EntryPoint = "CopyIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CopyIcon( IntPtr hIcon ); + [DllImport("user32", EntryPoint = "CopyIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CopyIcon(IntPtr hIcon); - [DllImport( "user32", EntryPoint = "GetIconInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetIconInfo( IntPtr hIcon, ICONINFO piconinfo ); + [DllImport("user32", EntryPoint = "GetIconInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetIconInfo(IntPtr hIcon, ICONINFO piconinfo); // OEM Resource Ordinal Numbers - public const int OBM_CLOSE = unchecked( (int)( 32754 ) ); - public const int OBM_UPARROW = unchecked( (int)( 32753 ) ); - public const int OBM_DNARROW = unchecked( (int)( 32752 ) ); - public const int OBM_RGARROW = unchecked( (int)( 32751 ) ); - public const int OBM_LFARROW = unchecked( (int)( 32750 ) ); - public const int OBM_REDUCE = unchecked( (int)( 32749 ) ); - public const int OBM_ZOOM = unchecked( (int)( 32748 ) ); - public const int OBM_RESTORE = unchecked( (int)( 32747 ) ); - public const int OBM_REDUCED = unchecked( (int)( 32746 ) ); - public const int OBM_ZOOMD = unchecked( (int)( 32745 ) ); - public const int OBM_RESTORED = unchecked( (int)( 32744 ) ); - public const int OBM_UPARROWD = unchecked( (int)( 32743 ) ); - public const int OBM_DNARROWD = unchecked( (int)( 32742 ) ); - public const int OBM_RGARROWD = unchecked( (int)( 32741 ) ); - public const int OBM_LFARROWD = unchecked( (int)( 32740 ) ); - public const int OBM_MNARROW = unchecked( (int)( 32739 ) ); - public const int OBM_COMBO = unchecked( (int)( 32738 ) ); - public const int OBM_UPARROWI = unchecked( (int)( 32737 ) ); - public const int OBM_DNARROWI = unchecked( (int)( 32736 ) ); - public const int OBM_RGARROWI = unchecked( (int)( 32735 ) ); - public const int OBM_LFARROWI = unchecked( (int)( 32734 ) ); - - public const int OBM_OLD_CLOSE = unchecked( (int)( 32767 ) ); - public const int OBM_SIZE = unchecked( (int)( 32766 ) ); - public const int OBM_OLD_UPARROW = unchecked( (int)( 32765 ) ); - public const int OBM_OLD_DNARROW = unchecked( (int)( 32764 ) ); - public const int OBM_OLD_RGARROW = unchecked( (int)( 32763 ) ); - public const int OBM_OLD_LFARROW = unchecked( (int)( 32762 ) ); - public const int OBM_BTSIZE = unchecked( (int)( 32761 ) ); - public const int OBM_CHECK = unchecked( (int)( 32760 ) ); - public const int OBM_CHECKBOXES = unchecked( (int)( 32759 ) ); - public const int OBM_BTNCORNERS = unchecked( (int)( 32758 ) ); - public const int OBM_OLD_REDUCE = unchecked( (int)( 32757 ) ); - public const int OBM_OLD_ZOOM = unchecked( (int)( 32756 ) ); - public const int OBM_OLD_RESTORE = unchecked( (int)( 32755 ) ); - - public const int OCR_NORMAL = unchecked( (int)( 32512 ) ); - public const int OCR_IBEAM = unchecked( (int)( 32513 ) ); - public const int OCR_WAIT = unchecked( (int)( 32514 ) ); - public const int OCR_CROSS = unchecked( (int)( 32515 ) ); - public const int OCR_UP = unchecked( (int)( 32516 ) ); - public const int OCR_SIZE = unchecked( (int)( 32640 ) ); - public const int OCR_ICON = unchecked( (int)( 32641 ) ); - public const int OCR_SIZENWSE = unchecked( (int)( 32642 ) ); - public const int OCR_SIZENESW = unchecked( (int)( 32643 ) ); - public const int OCR_SIZEWE = unchecked( (int)( 32644 ) ); - public const int OCR_SIZENS = unchecked( (int)( 32645 ) ); - public const int OCR_SIZEALL = unchecked( (int)( 32646 ) ); - public const int OCR_ICOCUR = unchecked( (int)( 32647 ) ); - public const int OCR_NO = unchecked( (int)( 32648 ) );// not in win3.1 - - public const int OIC_SAMPLE = unchecked( (int)( 32512 ) ); - public const int OIC_HAND = unchecked( (int)( 32513 ) ); - public const int OIC_QUES = unchecked( (int)( 32514 ) ); - public const int OIC_BANG = unchecked( (int)( 32515 ) ); - public const int OIC_NOTE = unchecked( (int)( 32516 ) ); - - public const int ORD_LANGDRIVER = unchecked( (int)( 1 ) );// The ordinal number for the entry point of + public const int OBM_CLOSE = unchecked((int)(32754)); + public const int OBM_UPARROW = unchecked((int)(32753)); + public const int OBM_DNARROW = unchecked((int)(32752)); + public const int OBM_RGARROW = unchecked((int)(32751)); + public const int OBM_LFARROW = unchecked((int)(32750)); + public const int OBM_REDUCE = unchecked((int)(32749)); + public const int OBM_ZOOM = unchecked((int)(32748)); + public const int OBM_RESTORE = unchecked((int)(32747)); + public const int OBM_REDUCED = unchecked((int)(32746)); + public const int OBM_ZOOMD = unchecked((int)(32745)); + public const int OBM_RESTORED = unchecked((int)(32744)); + public const int OBM_UPARROWD = unchecked((int)(32743)); + public const int OBM_DNARROWD = unchecked((int)(32742)); + public const int OBM_RGARROWD = unchecked((int)(32741)); + public const int OBM_LFARROWD = unchecked((int)(32740)); + public const int OBM_MNARROW = unchecked((int)(32739)); + public const int OBM_COMBO = unchecked((int)(32738)); + public const int OBM_UPARROWI = unchecked((int)(32737)); + public const int OBM_DNARROWI = unchecked((int)(32736)); + public const int OBM_RGARROWI = unchecked((int)(32735)); + public const int OBM_LFARROWI = unchecked((int)(32734)); + + public const int OBM_OLD_CLOSE = unchecked((int)(32767)); + public const int OBM_SIZE = unchecked((int)(32766)); + public const int OBM_OLD_UPARROW = unchecked((int)(32765)); + public const int OBM_OLD_DNARROW = unchecked((int)(32764)); + public const int OBM_OLD_RGARROW = unchecked((int)(32763)); + public const int OBM_OLD_LFARROW = unchecked((int)(32762)); + public const int OBM_BTSIZE = unchecked((int)(32761)); + public const int OBM_CHECK = unchecked((int)(32760)); + public const int OBM_CHECKBOXES = unchecked((int)(32759)); + public const int OBM_BTNCORNERS = unchecked((int)(32758)); + public const int OBM_OLD_REDUCE = unchecked((int)(32757)); + public const int OBM_OLD_ZOOM = unchecked((int)(32756)); + public const int OBM_OLD_RESTORE = unchecked((int)(32755)); + + public const int OCR_NORMAL = unchecked((int)(32512)); + public const int OCR_IBEAM = unchecked((int)(32513)); + public const int OCR_WAIT = unchecked((int)(32514)); + public const int OCR_CROSS = unchecked((int)(32515)); + public const int OCR_UP = unchecked((int)(32516)); + public const int OCR_SIZE = unchecked((int)(32640)); + public const int OCR_ICON = unchecked((int)(32641)); + public const int OCR_SIZENWSE = unchecked((int)(32642)); + public const int OCR_SIZENESW = unchecked((int)(32643)); + public const int OCR_SIZEWE = unchecked((int)(32644)); + public const int OCR_SIZENS = unchecked((int)(32645)); + public const int OCR_SIZEALL = unchecked((int)(32646)); + public const int OCR_ICOCUR = unchecked((int)(32647)); + public const int OCR_NO = unchecked((int)(32648));// not in win3.1 + + public const int OIC_SAMPLE = unchecked((int)(32512)); + public const int OIC_HAND = unchecked((int)(32513)); + public const int OIC_QUES = unchecked((int)(32514)); + public const int OIC_BANG = unchecked((int)(32515)); + public const int OIC_NOTE = unchecked((int)(32516)); + + public const int ORD_LANGDRIVER = unchecked((int)(1));// The ordinal number for the entry point of // language drivers. // Standard Icon IDs - public const int IDI_APPLICATION = unchecked( (int)( 32512 ) ); - public const int IDI_HAND = unchecked( (int)( 32513 ) ); - public const int IDI_QUESTION = unchecked( (int)( 32514 ) ); - public const int IDI_EXCLAMATION = unchecked( (int)( 32515 ) ); - public const int IDI_ASTERISK = unchecked( (int)( 32516 ) ); + public const int IDI_APPLICATION = unchecked((int)(32512)); + public const int IDI_HAND = unchecked((int)(32513)); + public const int IDI_QUESTION = unchecked((int)(32514)); + public const int IDI_EXCLAMATION = unchecked((int)(32515)); + public const int IDI_ASTERISK = unchecked((int)(32516)); - [DllImport( "user32", EntryPoint = "LoadString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LoadString( IntPtr hInstance, int wID, string lpBuffer, int nBufferMax ); + [DllImport("user32", EntryPoint = "LoadString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LoadString(IntPtr hInstance, int wID, string lpBuffer, int nBufferMax); // Dialog Box Command IDs - public const int IDOK = unchecked( (int)( 1 ) ); - public const int IDCANCEL = unchecked( (int)( 2 ) ); - public const int IDABORT = unchecked( (int)( 3 ) ); - public const int IDRETRY = unchecked( (int)( 4 ) ); - public const int IDIGNORE = unchecked( (int)( 5 ) ); - public const int IDYES = unchecked( (int)( 6 ) ); - public const int IDNO = unchecked( (int)( 7 ) ); + public const int IDOK = unchecked((int)(1)); + public const int IDCANCEL = unchecked((int)(2)); + public const int IDABORT = unchecked((int)(3)); + public const int IDRETRY = unchecked((int)(4)); + public const int IDIGNORE = unchecked((int)(5)); + public const int IDYES = unchecked((int)(6)); + public const int IDNO = unchecked((int)(7)); // Control Manager Structures and Definitions // Edit Control Styles - public const int ES_LEFT = unchecked( (int)( 0x0 ) ); - public const int ES_CENTER = unchecked( (int)( 0x1 ) ); - public const int ES_RIGHT = unchecked( (int)( 0x2 ) ); - public const int ES_MULTILINE = unchecked( (int)( 0x4 ) ); - public const int ES_UPPERCASE = unchecked( (int)( 0x8 ) ); - public const int ES_LOWERCASE = unchecked( (int)( 0x10 ) ); - public const int ES_PASSWORD = unchecked( (int)( 0x20 ) ); - public const int ES_AUTOVSCROLL = unchecked( (int)( 0x40 ) ); - public const int ES_AUTOHSCROLL = unchecked( (int)( 0x80 ) ); - public const int ES_NOHIDESEL = unchecked( (int)( 0x100 ) ); - public const int ES_OEMCONVERT = unchecked( (int)( 0x400 ) ); - public const int ES_READONLY = unchecked( (int)( 0x800 ) ); - public const int ES_WANTRETURN = unchecked( (int)( 0x1000 ) ); + public const int ES_LEFT = unchecked((int)(0x0)); + public const int ES_CENTER = unchecked((int)(0x1)); + public const int ES_RIGHT = unchecked((int)(0x2)); + public const int ES_MULTILINE = unchecked((int)(0x4)); + public const int ES_UPPERCASE = unchecked((int)(0x8)); + public const int ES_LOWERCASE = unchecked((int)(0x10)); + public const int ES_PASSWORD = unchecked((int)(0x20)); + public const int ES_AUTOVSCROLL = unchecked((int)(0x40)); + public const int ES_AUTOHSCROLL = unchecked((int)(0x80)); + public const int ES_NOHIDESEL = unchecked((int)(0x100)); + public const int ES_OEMCONVERT = unchecked((int)(0x400)); + public const int ES_READONLY = unchecked((int)(0x800)); + public const int ES_WANTRETURN = unchecked((int)(0x1000)); // Edit Control Notification Codes - public const int EN_SETFOCUS = unchecked( (int)( 0x100 ) ); - public const int EN_KILLFOCUS = unchecked( (int)( 0x200 ) ); - public const int EN_CHANGE = unchecked( (int)( 0x300 ) ); - public const int EN_UPDATE = unchecked( (int)( 0x400 ) ); - public const int EN_ERRSPACE = unchecked( (int)( 0x500 ) ); - public const int EN_MAXTEXT = unchecked( (int)( 0x501 ) ); - public const int EN_HSCROLL = unchecked( (int)( 0x601 ) ); - public const int EN_VSCROLL = unchecked( (int)( 0x602 ) ); + public const int EN_SETFOCUS = unchecked((int)(0x100)); + public const int EN_KILLFOCUS = unchecked((int)(0x200)); + public const int EN_CHANGE = unchecked((int)(0x300)); + public const int EN_UPDATE = unchecked((int)(0x400)); + public const int EN_ERRSPACE = unchecked((int)(0x500)); + public const int EN_MAXTEXT = unchecked((int)(0x501)); + public const int EN_HSCROLL = unchecked((int)(0x601)); + public const int EN_VSCROLL = unchecked((int)(0x602)); // Edit Control Messages - public const int EM_GETSEL = unchecked( (int)( 0xB0 ) ); - public const int EM_SETSEL = unchecked( (int)( 0xB1 ) ); - public const int EM_GETRECT = unchecked( (int)( 0xB2 ) ); - public const int EM_SETRECT = unchecked( (int)( 0xB3 ) ); - public const int EM_SETRECTNP = unchecked( (int)( 0xB4 ) ); - public const int EM_SCROLL = unchecked( (int)( 0xB5 ) ); - public const int EM_LINESCROLL = unchecked( (int)( 0xB6 ) ); - public const int EM_SCROLLCARET = unchecked( (int)( 0xB7 ) ); - public const int EM_GETMODIFY = unchecked( (int)( 0xB8 ) ); - public const int EM_SETMODIFY = unchecked( (int)( 0xB9 ) ); - public const int EM_GETLINECOUNT = unchecked( (int)( 0xBA ) ); - public const int EM_LINEINDEX = unchecked( (int)( 0xBB ) ); - public const int EM_SETHANDLE = unchecked( (int)( 0xBC ) ); - public const int EM_GETHANDLE = unchecked( (int)( 0xBD ) ); - public const int EM_GETTHUMB = unchecked( (int)( 0xBE ) ); - public const int EM_LINELENGTH = unchecked( (int)( 0xC1 ) ); - public const int EM_REPLACESEL = unchecked( (int)( 0xC2 ) ); - public const int EM_GETLINE = unchecked( (int)( 0xC4 ) ); - public const int EM_LIMITTEXT = unchecked( (int)( 0xC5 ) ); - public const int EM_CANUNDO = unchecked( (int)( 0xC6 ) ); - public const int EM_UNDO = unchecked( (int)( 0xC7 ) ); - public const int EM_FMTLINES = unchecked( (int)( 0xC8 ) ); - public const int EM_LINEFROMCHAR = unchecked( (int)( 0xC9 ) ); - public const int EM_SETTABSTOPS = unchecked( (int)( 0xCB ) ); - public const int EM_SETPASSWORDCHAR = unchecked( (int)( 0xCC ) ); - public const int EM_EMPTYUNDOBUFFER = unchecked( (int)( 0xCD ) ); - public const int EM_GETFIRSTVISIBLELINE = unchecked( (int)( 0xCE ) ); - public const int EM_SETREADONLY = unchecked( (int)( 0xCF ) ); - public const int EM_SETWORDBREAKPROC = unchecked( (int)( 0xD0 ) ); - public const int EM_GETWORDBREAKPROC = unchecked( (int)( 0xD1 ) ); - public const int EM_GETPASSWORDCHAR = unchecked( (int)( 0xD2 ) ); + public const int EM_GETSEL = unchecked((int)(0xB0)); + public const int EM_SETSEL = unchecked((int)(0xB1)); + public const int EM_GETRECT = unchecked((int)(0xB2)); + public const int EM_SETRECT = unchecked((int)(0xB3)); + public const int EM_SETRECTNP = unchecked((int)(0xB4)); + public const int EM_SCROLL = unchecked((int)(0xB5)); + public const int EM_LINESCROLL = unchecked((int)(0xB6)); + public const int EM_SCROLLCARET = unchecked((int)(0xB7)); + public const int EM_GETMODIFY = unchecked((int)(0xB8)); + public const int EM_SETMODIFY = unchecked((int)(0xB9)); + public const int EM_GETLINECOUNT = unchecked((int)(0xBA)); + public const int EM_LINEINDEX = unchecked((int)(0xBB)); + public const int EM_SETHANDLE = unchecked((int)(0xBC)); + public const int EM_GETHANDLE = unchecked((int)(0xBD)); + public const int EM_GETTHUMB = unchecked((int)(0xBE)); + public const int EM_LINELENGTH = unchecked((int)(0xC1)); + public const int EM_REPLACESEL = unchecked((int)(0xC2)); + public const int EM_GETLINE = unchecked((int)(0xC4)); + public const int EM_LIMITTEXT = unchecked((int)(0xC5)); + public const int EM_CANUNDO = unchecked((int)(0xC6)); + public const int EM_UNDO = unchecked((int)(0xC7)); + public const int EM_FMTLINES = unchecked((int)(0xC8)); + public const int EM_LINEFROMCHAR = unchecked((int)(0xC9)); + public const int EM_SETTABSTOPS = unchecked((int)(0xCB)); + public const int EM_SETPASSWORDCHAR = unchecked((int)(0xCC)); + public const int EM_EMPTYUNDOBUFFER = unchecked((int)(0xCD)); + public const int EM_GETFIRSTVISIBLELINE = unchecked((int)(0xCE)); + public const int EM_SETREADONLY = unchecked((int)(0xCF)); + public const int EM_SETWORDBREAKPROC = unchecked((int)(0xD0)); + public const int EM_GETWORDBREAKPROC = unchecked((int)(0xD1)); + public const int EM_GETPASSWORDCHAR = unchecked((int)(0xD2)); // EDITWORDBREAKPROC code values - public const int WB_LEFT = unchecked( (int)( 0 ) ); - public const int WB_RIGHT = unchecked( (int)( 1 ) ); - public const int WB_ISDELIMITER = unchecked( (int)( 2 ) ); + public const int WB_LEFT = unchecked((int)(0)); + public const int WB_RIGHT = unchecked((int)(1)); + public const int WB_ISDELIMITER = unchecked((int)(2)); // Button Control Styles - public const int BS_PUSHBUTTON = unchecked( (int)( 0x0 ) ); - public const int BS_DEFPUSHBUTTON = unchecked( (int)( 0x1 ) ); - public const int BS_CHECKBOX = unchecked( (int)( 0x2 ) ); - public const int BS_AUTOCHECKBOX = unchecked( (int)( 0x3 ) ); - public const int BS_RADIOBUTTON = unchecked( (int)( 0x4 ) ); - public const int BS_3STATE = unchecked( (int)( 0x5 ) ); - public const int BS_AUTO3STATE = unchecked( (int)( 0x6 ) ); - public const int BS_GROUPBOX = unchecked( (int)( 0x7 ) ); - public const int BS_USERBUTTON = unchecked( (int)( 0x8 ) ); - public const int BS_AUTORADIOBUTTON = unchecked( (int)( 0x9 ) ); - public const int BS_OWNERDRAW = unchecked( (int)( 0xB ) ); - public const int BS_LEFTTEXT = unchecked( (int)( 0x20 ) ); + public const int BS_PUSHBUTTON = unchecked((int)(0x0)); + public const int BS_DEFPUSHBUTTON = unchecked((int)(0x1)); + public const int BS_CHECKBOX = unchecked((int)(0x2)); + public const int BS_AUTOCHECKBOX = unchecked((int)(0x3)); + public const int BS_RADIOBUTTON = unchecked((int)(0x4)); + public const int BS_3STATE = unchecked((int)(0x5)); + public const int BS_AUTO3STATE = unchecked((int)(0x6)); + public const int BS_GROUPBOX = unchecked((int)(0x7)); + public const int BS_USERBUTTON = unchecked((int)(0x8)); + public const int BS_AUTORADIOBUTTON = unchecked((int)(0x9)); + public const int BS_OWNERDRAW = unchecked((int)(0xB)); + public const int BS_LEFTTEXT = unchecked((int)(0x20)); // User Button Notification Codes - public const int BN_CLICKED = unchecked( (int)( 0 ) ); - public const int BN_PAINT = unchecked( (int)( 1 ) ); - public const int BN_HILITE = unchecked( (int)( 2 ) ); - public const int BN_UNHILITE = unchecked( (int)( 3 ) ); - public const int BN_DISABLE = unchecked( (int)( 4 ) ); - public const int BN_DOUBLECLICKED = unchecked( (int)( 5 ) ); + public const int BN_CLICKED = unchecked((int)(0)); + public const int BN_PAINT = unchecked((int)(1)); + public const int BN_HILITE = unchecked((int)(2)); + public const int BN_UNHILITE = unchecked((int)(3)); + public const int BN_DISABLE = unchecked((int)(4)); + public const int BN_DOUBLECLICKED = unchecked((int)(5)); // Button Control Messages - public const int BM_GETCHECK = unchecked( (int)( 0xF0 ) ); - public const int BM_SETCHECK = unchecked( (int)( 0xF1 ) ); - public const int BM_GETSTATE = unchecked( (int)( 0xF2 ) ); - public const int BM_SETSTATE = unchecked( (int)( 0xF3 ) ); - public const int BM_SETSTYLE = unchecked( (int)( 0xF4 ) ); + public const int BM_GETCHECK = unchecked((int)(0xF0)); + public const int BM_SETCHECK = unchecked((int)(0xF1)); + public const int BM_GETSTATE = unchecked((int)(0xF2)); + public const int BM_SETSTATE = unchecked((int)(0xF3)); + public const int BM_SETSTYLE = unchecked((int)(0xF4)); // Static Control Constants - public const int SS_LEFT = unchecked( (int)( 0x0 ) ); - public const int SS_CENTER = unchecked( (int)( 0x1 ) ); - public const int SS_RIGHT = unchecked( (int)( 0x2 ) ); - public const int SS_ICON = unchecked( (int)( 0x3 ) ); - public const int SS_BLACKRECT = unchecked( (int)( 0x4 ) ); - public const int SS_GRAYRECT = unchecked( (int)( 0x5 ) ); - public const int SS_WHITERECT = unchecked( (int)( 0x6 ) ); - public const int SS_BLACKFRAME = unchecked( (int)( 0x7 ) ); - public const int SS_GRAYFRAME = unchecked( (int)( 0x8 ) ); - public const int SS_WHITEFRAME = unchecked( (int)( 0x9 ) ); - public const int SS_USERITEM = unchecked( (int)( 0xA ) ); - public const int SS_SIMPLE = unchecked( (int)( 0xB ) ); - public const int SS_LEFTNOWORDWRAP = unchecked( (int)( 0xC ) ); - public const int SS_NOPREFIX = unchecked( (int)( 0x80 ) );// Don't do "&" character translation + public const int SS_LEFT = unchecked((int)(0x0)); + public const int SS_CENTER = unchecked((int)(0x1)); + public const int SS_RIGHT = unchecked((int)(0x2)); + public const int SS_ICON = unchecked((int)(0x3)); + public const int SS_BLACKRECT = unchecked((int)(0x4)); + public const int SS_GRAYRECT = unchecked((int)(0x5)); + public const int SS_WHITERECT = unchecked((int)(0x6)); + public const int SS_BLACKFRAME = unchecked((int)(0x7)); + public const int SS_GRAYFRAME = unchecked((int)(0x8)); + public const int SS_WHITEFRAME = unchecked((int)(0x9)); + public const int SS_USERITEM = unchecked((int)(0xA)); + public const int SS_SIMPLE = unchecked((int)(0xB)); + public const int SS_LEFTNOWORDWRAP = unchecked((int)(0xC)); + public const int SS_NOPREFIX = unchecked((int)(0x80));// Don't do "&" character translation // Static Control Mesages - public const int STM_SETICON = unchecked( (int)( 0x170 ) ); - public const int STM_GETICON = unchecked( (int)( 0x171 ) ); - public const int STM_MSGMAX = unchecked( (int)( 0x172 ) ); + public const int STM_SETICON = unchecked((int)(0x170)); + public const int STM_GETICON = unchecked((int)(0x171)); + public const int STM_MSGMAX = unchecked((int)(0x172)); - public const int WC_DIALOG = unchecked( (int)( 8002 ) ); + public const int WC_DIALOG = unchecked((int)(8002)); // Get/SetWindowWord/Long offsets for use with WC_DIALOG windows - public const int DWL_MSGRESULT = unchecked( (int)( 0 ) ); - public const int DWL_DLGPROC = unchecked( (int)( 4 ) ); - public const int DWL_USER = unchecked( (int)( 8 ) ); + public const int DWL_MSGRESULT = unchecked((int)(0)); + public const int DWL_DLGPROC = unchecked((int)(4)); + public const int DWL_USER = unchecked((int)(8)); // Dialog Manager Routines - [DllImport( "user32", EntryPoint = "IsDialogMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsDialogMessage( IntPtr hDlg, ref MSG lpMsg ); + [DllImport("user32", EntryPoint = "IsDialogMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsDialogMessage(IntPtr hDlg, ref MSG lpMsg); - [DllImport( "user32", EntryPoint = "MapDialogRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MapDialogRect( IntPtr hDlg, ref RECT lpRect ); + [DllImport("user32", EntryPoint = "MapDialogRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MapDialogRect(IntPtr hDlg, ref RECT lpRect); - [DllImport( "user32", EntryPoint = "DlgDirList", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DlgDirList( IntPtr hDlg, string lpPathSpec, int nIDListBox, int nIDStaticPath, int wFileType ); + [DllImport("user32", EntryPoint = "DlgDirList", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DlgDirList(IntPtr hDlg, string lpPathSpec, int nIDListBox, int nIDStaticPath, int wFileType); // DlgDirList, DlgDirListComboBox flags values - public const int DDL_READWRITE = unchecked( (int)( 0x0 ) ); - public const int DDL_READONLY = unchecked( (int)( 0x1 ) ); - public const int DDL_HIDDEN = unchecked( (int)( 0x2 ) ); - public const int DDL_SYSTEM = unchecked( (int)( 0x4 ) ); - public const int DDL_DIRECTORY = unchecked( (int)( 0x10 ) ); - public const int DDL_ARCHIVE = unchecked( (int)( 0x20 ) ); + public const int DDL_READWRITE = unchecked((int)(0x0)); + public const int DDL_READONLY = unchecked((int)(0x1)); + public const int DDL_HIDDEN = unchecked((int)(0x2)); + public const int DDL_SYSTEM = unchecked((int)(0x4)); + public const int DDL_DIRECTORY = unchecked((int)(0x10)); + public const int DDL_ARCHIVE = unchecked((int)(0x20)); - public const int DDL_POSTMSGS = unchecked( (int)( 0x2000 ) ); - public const int DDL_DRIVES = unchecked( (int)( 0x4000 ) ); - public const int DDL_EXCLUSIVE = unchecked( (int)( 0x8000 ) ); + public const int DDL_POSTMSGS = unchecked((int)(0x2000)); + public const int DDL_DRIVES = unchecked((int)(0x4000)); + public const int DDL_EXCLUSIVE = unchecked((int)(0x8000)); - [DllImport( "user32", EntryPoint = "DlgDirSelectEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DlgDirSelectEx( IntPtr hWndDlg, string lpszPath, int cbPath, int idListBox ); + [DllImport("user32", EntryPoint = "DlgDirSelectEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DlgDirSelectEx(IntPtr hWndDlg, string lpszPath, int cbPath, int idListBox); - [DllImport( "user32", EntryPoint = "DlgDirListComboBox", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DlgDirListComboBox( IntPtr hDlg, string lpPathSpec, int nIDComboBox, int nIDStaticPath, int wFileType ); + [DllImport("user32", EntryPoint = "DlgDirListComboBox", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DlgDirListComboBox(IntPtr hDlg, string lpPathSpec, int nIDComboBox, int nIDStaticPath, int wFileType); - [DllImport( "user32", EntryPoint = "DlgDirSelectComboBoxEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DlgDirSelectComboBoxEx( IntPtr hWndDlg, string lpszPath, int cbPath, int idComboBox ); + [DllImport("user32", EntryPoint = "DlgDirSelectComboBoxEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DlgDirSelectComboBoxEx(IntPtr hWndDlg, string lpszPath, int cbPath, int idComboBox); // Dialog Styles - public const int DS_ABSALIGN = unchecked( (int)( 0x1 ) ); - public const int DS_SYSMODAL = unchecked( (int)( 0x2 ) ); - public const int DS_LOCALEDIT = unchecked( (int)( 0x20 ) );// Edit items get Local storage. - public const int DS_SETFONT = unchecked( (int)( 0x40 ) );// User specified font for Dlg controls - public const int DS_MODALFRAME = unchecked( (int)( 0x80 ) );// Can be combined with WS_CAPTION - public const int DS_NOIDLEMSG = unchecked( (int)( 0x100 ) );// WM_ENTERIDLE message will not be sent - public const int DS_SETFOREGROUND = unchecked( (int)( 0x200 ) );// not in win3.1 - - public const int DM_GETDEFID = unchecked( (int)( WM_USER + 0 ) ); - public const int DM_SETDEFID = unchecked( (int)( WM_USER + 1 ) ); - public const int DC_HASDEFID = unchecked( (int)( 0x534 ) );//0x534B + public const int DS_ABSALIGN = unchecked((int)(0x1)); + public const int DS_SYSMODAL = unchecked((int)(0x2)); + public const int DS_LOCALEDIT = unchecked((int)(0x20));// Edit items get Local storage. + public const int DS_SETFONT = unchecked((int)(0x40));// User specified font for Dlg controls + public const int DS_MODALFRAME = unchecked((int)(0x80));// Can be combined with WS_CAPTION + public const int DS_NOIDLEMSG = unchecked((int)(0x100));// WM_ENTERIDLE message will not be sent + public const int DS_SETFOREGROUND = unchecked((int)(0x200));// not in win3.1 + + public const int DM_GETDEFID = unchecked((int)(WM_USER + 0)); + public const int DM_SETDEFID = unchecked((int)(WM_USER + 1)); + public const int DC_HASDEFID = unchecked((int)(0x534));//0x534B // Dialog Codes - public const int DLGC_WANTARROWS = unchecked( (int)( 0x1 ) );// Control wants arrow keys - public const int DLGC_WANTTAB = unchecked( (int)( 0x2 ) );// Control wants tab keys - public const int DLGC_WANTALLKEYS = unchecked( (int)( 0x4 ) );// Control wants all keys - public const int DLGC_WANTMESSAGE = unchecked( (int)( 0x4 ) );// Pass message to control - public const int DLGC_HASSETSEL = unchecked( (int)( 0x8 ) );// Understands EM_SETSEL message - public const int DLGC_DEFPUSHBUTTON = unchecked( (int)( 0x10 ) );// Default pushbutton - public const int DLGC_UNDEFPUSHBUTTON = unchecked( (int)( 0x20 ) );// Non-default pushbutton - public const int DLGC_RADIOBUTTON = unchecked( (int)( 0x40 ) );// Radio button - public const int DLGC_WANTCHARS = unchecked( (int)( 0x80 ) );// Want WM_CHAR messages - public const int DLGC_STATIC = unchecked( (int)( 0x100 ) );// Static item: don't include - public const int DLGC_BUTTON = unchecked( (int)( 0x2000 ) );// Button item: can be checked - - public const int LB_CTLCODE = unchecked( (int)( 0 ) ); + public const int DLGC_WANTARROWS = unchecked((int)(0x1));// Control wants arrow keys + public const int DLGC_WANTTAB = unchecked((int)(0x2));// Control wants tab keys + public const int DLGC_WANTALLKEYS = unchecked((int)(0x4));// Control wants all keys + public const int DLGC_WANTMESSAGE = unchecked((int)(0x4));// Pass message to control + public const int DLGC_HASSETSEL = unchecked((int)(0x8));// Understands EM_SETSEL message + public const int DLGC_DEFPUSHBUTTON = unchecked((int)(0x10));// Default pushbutton + public const int DLGC_UNDEFPUSHBUTTON = unchecked((int)(0x20));// Non-default pushbutton + public const int DLGC_RADIOBUTTON = unchecked((int)(0x40));// Radio button + public const int DLGC_WANTCHARS = unchecked((int)(0x80));// Want WM_CHAR messages + public const int DLGC_STATIC = unchecked((int)(0x100));// Static item: don't include + public const int DLGC_BUTTON = unchecked((int)(0x2000));// Button item: can be checked + + public const int LB_CTLCODE = unchecked((int)(0)); // Listbox Return Values - public const int LB_OKAY = unchecked( (int)( 0 ) ); - public const int LB_ERR = unchecked( (int)( ( -1 ) ) ); - public const int LB_ERRSPACE = unchecked( (int)( ( -2 ) ) ); + public const int LB_OKAY = unchecked((int)(0)); + public const int LB_ERR = unchecked((int)((-1))); + public const int LB_ERRSPACE = unchecked((int)((-2))); // The idStaticPath parameter to DlgDirList can have the following values // ORed if the list box should show other details of the files along with @@ -10140,159 +10140,159 @@ public struct ICONINFO // all other details also will be returned // Listbox Notification Codes - public const int LBN_ERRSPACE = unchecked( (int)( ( -2 ) ) ); - public const int LBN_SELCHANGE = unchecked( (int)( 1 ) ); - public const int LBN_DBLCLK = unchecked( (int)( 2 ) ); - public const int LBN_SELCANCEL = unchecked( (int)( 3 ) ); - public const int LBN_SETFOCUS = unchecked( (int)( 4 ) ); - public const int LBN_KILLFOCUS = unchecked( (int)( 5 ) ); + public const int LBN_ERRSPACE = unchecked((int)((-2))); + public const int LBN_SELCHANGE = unchecked((int)(1)); + public const int LBN_DBLCLK = unchecked((int)(2)); + public const int LBN_SELCANCEL = unchecked((int)(3)); + public const int LBN_SETFOCUS = unchecked((int)(4)); + public const int LBN_KILLFOCUS = unchecked((int)(5)); // Listbox messages - public const int LB_ADDSTRING = unchecked( (int)( 0x180 ) ); - public const int LB_INSERTSTRING = unchecked( (int)( 0x181 ) ); - public const int LB_DELETESTRING = unchecked( (int)( 0x182 ) ); - public const int LB_SELITEMRANGEEX = unchecked( (int)( 0x183 ) ); - public const int LB_RESETCONTENT = unchecked( (int)( 0x184 ) ); - public const int LB_SETSEL = unchecked( (int)( 0x185 ) ); - public const int LB_SETCURSEL = unchecked( (int)( 0x186 ) ); - public const int LB_GETSEL = unchecked( (int)( 0x187 ) ); - public const int LB_GETCURSEL = unchecked( (int)( 0x188 ) ); - public const int LB_GETTEXT = unchecked( (int)( 0x189 ) ); - public const int LB_GETTEXTLEN = unchecked( (int)( 0x18A ) ); - public const int LB_GETCOUNT = unchecked( (int)( 0x18B ) ); - public const int LB_SELECTSTRING = unchecked( (int)( 0x18C ) ); - public const int LB_DIR = unchecked( (int)( 0x18D ) ); - public const int LB_GETTOPINDEX = unchecked( (int)( 0x18E ) ); - public const int LB_FINDSTRING = unchecked( (int)( 0x18F ) ); - public const int LB_GETSELCOUNT = unchecked( (int)( 0x190 ) ); - public const int LB_GETSELITEMS = unchecked( (int)( 0x191 ) ); - public const int LB_SETTABSTOPS = unchecked( (int)( 0x192 ) ); - public const int LB_GETHORIZONTALEXTENT = unchecked( (int)( 0x193 ) ); - public const int LB_SETHORIZONTALEXTENT = unchecked( (int)( 0x194 ) ); - public const int LB_SETCOLUMNWIDTH = unchecked( (int)( 0x195 ) ); - public const int LB_ADDFILE = unchecked( (int)( 0x196 ) ); - public const int LB_SETTOPINDEX = unchecked( (int)( 0x197 ) ); - public const int LB_GETITEMRECT = unchecked( (int)( 0x198 ) ); - public const int LB_GETITEMDATA = unchecked( (int)( 0x199 ) ); - public const int LB_SETITEMDATA = unchecked( (int)( 0x19A ) ); - public const int LB_SELITEMRANGE = unchecked( (int)( 0x19B ) ); - public const int LB_SETANCHORINDEX = unchecked( (int)( 0x19C ) ); - public const int LB_GETANCHORINDEX = unchecked( (int)( 0x19D ) ); - public const int LB_SETCARETINDEX = unchecked( (int)( 0x19E ) ); - public const int LB_GETCARETINDEX = unchecked( (int)( 0x19F ) ); - public const int LB_SETITEMHEIGHT = unchecked( (int)( 0x1A0 ) ); - public const int LB_GETITEMHEIGHT = unchecked( (int)( 0x1A1 ) ); - public const int LB_FINDSTRINGEXACT = unchecked( (int)( 0x1A2 ) ); - public const int LB_SETLOCALE = unchecked( (int)( 0x1A5 ) ); - public const int LB_GETLOCALE = unchecked( (int)( 0x1A6 ) ); - public const int LB_SETCOUNT = unchecked( (int)( 0x1A7 ) ); - public const int LB_MSGMAX = unchecked( (int)( 0x1A8 ) ); + public const int LB_ADDSTRING = unchecked((int)(0x180)); + public const int LB_INSERTSTRING = unchecked((int)(0x181)); + public const int LB_DELETESTRING = unchecked((int)(0x182)); + public const int LB_SELITEMRANGEEX = unchecked((int)(0x183)); + public const int LB_RESETCONTENT = unchecked((int)(0x184)); + public const int LB_SETSEL = unchecked((int)(0x185)); + public const int LB_SETCURSEL = unchecked((int)(0x186)); + public const int LB_GETSEL = unchecked((int)(0x187)); + public const int LB_GETCURSEL = unchecked((int)(0x188)); + public const int LB_GETTEXT = unchecked((int)(0x189)); + public const int LB_GETTEXTLEN = unchecked((int)(0x18A)); + public const int LB_GETCOUNT = unchecked((int)(0x18B)); + public const int LB_SELECTSTRING = unchecked((int)(0x18C)); + public const int LB_DIR = unchecked((int)(0x18D)); + public const int LB_GETTOPINDEX = unchecked((int)(0x18E)); + public const int LB_FINDSTRING = unchecked((int)(0x18F)); + public const int LB_GETSELCOUNT = unchecked((int)(0x190)); + public const int LB_GETSELITEMS = unchecked((int)(0x191)); + public const int LB_SETTABSTOPS = unchecked((int)(0x192)); + public const int LB_GETHORIZONTALEXTENT = unchecked((int)(0x193)); + public const int LB_SETHORIZONTALEXTENT = unchecked((int)(0x194)); + public const int LB_SETCOLUMNWIDTH = unchecked((int)(0x195)); + public const int LB_ADDFILE = unchecked((int)(0x196)); + public const int LB_SETTOPINDEX = unchecked((int)(0x197)); + public const int LB_GETITEMRECT = unchecked((int)(0x198)); + public const int LB_GETITEMDATA = unchecked((int)(0x199)); + public const int LB_SETITEMDATA = unchecked((int)(0x19A)); + public const int LB_SELITEMRANGE = unchecked((int)(0x19B)); + public const int LB_SETANCHORINDEX = unchecked((int)(0x19C)); + public const int LB_GETANCHORINDEX = unchecked((int)(0x19D)); + public const int LB_SETCARETINDEX = unchecked((int)(0x19E)); + public const int LB_GETCARETINDEX = unchecked((int)(0x19F)); + public const int LB_SETITEMHEIGHT = unchecked((int)(0x1A0)); + public const int LB_GETITEMHEIGHT = unchecked((int)(0x1A1)); + public const int LB_FINDSTRINGEXACT = unchecked((int)(0x1A2)); + public const int LB_SETLOCALE = unchecked((int)(0x1A5)); + public const int LB_GETLOCALE = unchecked((int)(0x1A6)); + public const int LB_SETCOUNT = unchecked((int)(0x1A7)); + public const int LB_MSGMAX = unchecked((int)(0x1A8)); // Listbox Styles - public const int LBS_NOTIFY = unchecked( (int)( 0x1 ) ); - public const int LBS_SORT = unchecked( (int)( 0x2 ) ); - public const int LBS_NOREDRAW = unchecked( (int)( 0x4 ) ); - public const int LBS_MULTIPLESEL = unchecked( (int)( 0x8 ) ); - public const int LBS_OWNERDRAWFIXED = unchecked( (int)( 0x10 ) ); - public const int LBS_OWNERDRAWVARIABLE = unchecked( (int)( 0x20 ) ); - public const int LBS_HASSTRINGS = unchecked( (int)( 0x40 ) ); - public const int LBS_USETABSTOPS = unchecked( (int)( 0x80 ) ); - public const int LBS_NOINTEGRALHEIGHT = unchecked( (int)( 0x100 ) ); - public const int LBS_MULTICOLUMN = unchecked( (int)( 0x200 ) ); - public const int LBS_WANTKEYBOARDINPUT = unchecked( (int)( 0x400 ) ); - public const int LBS_EXTENDEDSEL = unchecked( (int)( 0x800 ) ); - public const int LBS_DISABLENOSCROLL = unchecked( (int)( 0x1000 ) ); - public const int LBS_NODATA = unchecked( (int)( 0x2000 ) ); - public const int LBS_STANDARD = unchecked( (int)( ( LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER ) ) ); + public const int LBS_NOTIFY = unchecked((int)(0x1)); + public const int LBS_SORT = unchecked((int)(0x2)); + public const int LBS_NOREDRAW = unchecked((int)(0x4)); + public const int LBS_MULTIPLESEL = unchecked((int)(0x8)); + public const int LBS_OWNERDRAWFIXED = unchecked((int)(0x10)); + public const int LBS_OWNERDRAWVARIABLE = unchecked((int)(0x20)); + public const int LBS_HASSTRINGS = unchecked((int)(0x40)); + public const int LBS_USETABSTOPS = unchecked((int)(0x80)); + public const int LBS_NOINTEGRALHEIGHT = unchecked((int)(0x100)); + public const int LBS_MULTICOLUMN = unchecked((int)(0x200)); + public const int LBS_WANTKEYBOARDINPUT = unchecked((int)(0x400)); + public const int LBS_EXTENDEDSEL = unchecked((int)(0x800)); + public const int LBS_DISABLENOSCROLL = unchecked((int)(0x1000)); + public const int LBS_NODATA = unchecked((int)(0x2000)); + public const int LBS_STANDARD = unchecked((int)((LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER))); // Combo Box return Values - public const int CB_OKAY = unchecked( (int)( 0 ) ); - public const int CB_ERR = unchecked( (int)( ( -1 ) ) ); - public const int CB_ERRSPACE = unchecked( (int)( ( -2 ) ) ); + public const int CB_OKAY = unchecked((int)(0)); + public const int CB_ERR = unchecked((int)((-1))); + public const int CB_ERRSPACE = unchecked((int)((-2))); // Combo Box Notification Codes - public const int CBN_ERRSPACE = unchecked( (int)( ( -1 ) ) ); - public const int CBN_SELCHANGE = unchecked( (int)( 1 ) ); - public const int CBN_DBLCLK = unchecked( (int)( 2 ) ); - public const int CBN_SETFOCUS = unchecked( (int)( 3 ) ); - public const int CBN_KILLFOCUS = unchecked( (int)( 4 ) ); - public const int CBN_EDITCHANGE = unchecked( (int)( 5 ) ); - public const int CBN_EDITUPDATE = unchecked( (int)( 6 ) ); - public const int CBN_DROPDOWN = unchecked( (int)( 7 ) ); - public const int CBN_CLOSEUP = unchecked( (int)( 8 ) ); - public const int CBN_SELENDOK = unchecked( (int)( 9 ) ); - public const int CBN_SELENDCANCEL = unchecked( (int)( 10 ) ); + public const int CBN_ERRSPACE = unchecked((int)((-1))); + public const int CBN_SELCHANGE = unchecked((int)(1)); + public const int CBN_DBLCLK = unchecked((int)(2)); + public const int CBN_SETFOCUS = unchecked((int)(3)); + public const int CBN_KILLFOCUS = unchecked((int)(4)); + public const int CBN_EDITCHANGE = unchecked((int)(5)); + public const int CBN_EDITUPDATE = unchecked((int)(6)); + public const int CBN_DROPDOWN = unchecked((int)(7)); + public const int CBN_CLOSEUP = unchecked((int)(8)); + public const int CBN_SELENDOK = unchecked((int)(9)); + public const int CBN_SELENDCANCEL = unchecked((int)(10)); // Combo Box styles - public const int CBS_SIMPLE = unchecked( (int)( 0x1 ) ); - public const int CBS_DROPDOWN = unchecked( (int)( 0x2 ) ); - public const int CBS_DROPDOWNLIST = unchecked( (int)( 0x3 ) ); - public const int CBS_OWNERDRAWFIXED = unchecked( (int)( 0x10 ) ); - public const int CBS_OWNERDRAWVARIABLE = unchecked( (int)( 0x20 ) ); - public const int CBS_AUTOHSCROLL = unchecked( (int)( 0x40 ) ); - public const int CBS_OEMCONVERT = unchecked( (int)( 0x80 ) ); - public const int CBS_SORT = unchecked( (int)( 0x100 ) ); - public const int CBS_HASSTRINGS = unchecked( (int)( 0x200 ) ); - public const int CBS_NOINTEGRALHEIGHT = unchecked( (int)( 0x400 ) ); - public const int CBS_DISABLENOSCROLL = unchecked( (int)( 0x800 ) ); + public const int CBS_SIMPLE = unchecked((int)(0x1)); + public const int CBS_DROPDOWN = unchecked((int)(0x2)); + public const int CBS_DROPDOWNLIST = unchecked((int)(0x3)); + public const int CBS_OWNERDRAWFIXED = unchecked((int)(0x10)); + public const int CBS_OWNERDRAWVARIABLE = unchecked((int)(0x20)); + public const int CBS_AUTOHSCROLL = unchecked((int)(0x40)); + public const int CBS_OEMCONVERT = unchecked((int)(0x80)); + public const int CBS_SORT = unchecked((int)(0x100)); + public const int CBS_HASSTRINGS = unchecked((int)(0x200)); + public const int CBS_NOINTEGRALHEIGHT = unchecked((int)(0x400)); + public const int CBS_DISABLENOSCROLL = unchecked((int)(0x800)); // Combo Box messages - public const int CB_GETEDITSEL = unchecked( (int)( 0x140 ) ); - public const int CB_LIMITTEXT = unchecked( (int)( 0x141 ) ); - public const int CB_SETEDITSEL = unchecked( (int)( 0x142 ) ); - public const int CB_ADDSTRING = unchecked( (int)( 0x143 ) ); - public const int CB_DELETESTRING = unchecked( (int)( 0x144 ) ); - public const int CB_DIR = unchecked( (int)( 0x145 ) ); - public const int CB_GETCOUNT = unchecked( (int)( 0x146 ) ); - public const int CB_GETCURSEL = unchecked( (int)( 0x147 ) ); - public const int CB_GETLBTEXT = unchecked( (int)( 0x148 ) ); - public const int CB_GETLBTEXTLEN = unchecked( (int)( 0x149 ) ); - public const int CB_INSERTSTRING = unchecked( (int)( 0x14A ) ); - public const int CB_RESETCONTENT = unchecked( (int)( 0x14B ) ); - public const int CB_FINDSTRING = unchecked( (int)( 0x14C ) ); - public const int CB_SELECTSTRING = unchecked( (int)( 0x14D ) ); - public const int CB_SETCURSEL = unchecked( (int)( 0x14E ) ); - public const int CB_SHOWDROPDOWN = unchecked( (int)( 0x14F ) ); - public const int CB_GETITEMDATA = unchecked( (int)( 0x150 ) ); - public const int CB_SETITEMDATA = unchecked( (int)( 0x151 ) ); - public const int CB_GETDROPPEDCONTROLRECT = unchecked( (int)( 0x152 ) ); - public const int CB_SETITEMHEIGHT = unchecked( (int)( 0x153 ) ); - public const int CB_GETITEMHEIGHT = unchecked( (int)( 0x154 ) ); - public const int CB_SETEXTENDEDUI = unchecked( (int)( 0x155 ) ); - public const int CB_GETEXTENDEDUI = unchecked( (int)( 0x156 ) ); - public const int CB_GETDROPPEDSTATE = unchecked( (int)( 0x157 ) ); - public const int CB_FINDSTRINGEXACT = unchecked( (int)( 0x158 ) ); - public const int CB_SETLOCALE = unchecked( (int)( 0x159 ) ); - public const int CB_GETLOCALE = unchecked( (int)( 0x15A ) ); - public const int CB_MSGMAX = unchecked( (int)( 0x15B ) ); + public const int CB_GETEDITSEL = unchecked((int)(0x140)); + public const int CB_LIMITTEXT = unchecked((int)(0x141)); + public const int CB_SETEDITSEL = unchecked((int)(0x142)); + public const int CB_ADDSTRING = unchecked((int)(0x143)); + public const int CB_DELETESTRING = unchecked((int)(0x144)); + public const int CB_DIR = unchecked((int)(0x145)); + public const int CB_GETCOUNT = unchecked((int)(0x146)); + public const int CB_GETCURSEL = unchecked((int)(0x147)); + public const int CB_GETLBTEXT = unchecked((int)(0x148)); + public const int CB_GETLBTEXTLEN = unchecked((int)(0x149)); + public const int CB_INSERTSTRING = unchecked((int)(0x14A)); + public const int CB_RESETCONTENT = unchecked((int)(0x14B)); + public const int CB_FINDSTRING = unchecked((int)(0x14C)); + public const int CB_SELECTSTRING = unchecked((int)(0x14D)); + public const int CB_SETCURSEL = unchecked((int)(0x14E)); + public const int CB_SHOWDROPDOWN = unchecked((int)(0x14F)); + public const int CB_GETITEMDATA = unchecked((int)(0x150)); + public const int CB_SETITEMDATA = unchecked((int)(0x151)); + public const int CB_GETDROPPEDCONTROLRECT = unchecked((int)(0x152)); + public const int CB_SETITEMHEIGHT = unchecked((int)(0x153)); + public const int CB_GETITEMHEIGHT = unchecked((int)(0x154)); + public const int CB_SETEXTENDEDUI = unchecked((int)(0x155)); + public const int CB_GETEXTENDEDUI = unchecked((int)(0x156)); + public const int CB_GETDROPPEDSTATE = unchecked((int)(0x157)); + public const int CB_FINDSTRINGEXACT = unchecked((int)(0x158)); + public const int CB_SETLOCALE = unchecked((int)(0x159)); + public const int CB_GETLOCALE = unchecked((int)(0x15A)); + public const int CB_MSGMAX = unchecked((int)(0x15B)); // Scroll Bar Styles - public const int SBS_HORZ = unchecked( (int)( 0x0 ) ); - public const int SBS_VERT = unchecked( (int)( 0x1 ) ); - public const int SBS_TOPALIGN = unchecked( (int)( 0x2 ) ); - public const int SBS_LEFTALIGN = unchecked( (int)( 0x2 ) ); - public const int SBS_BOTTOMALIGN = unchecked( (int)( 0x4 ) ); - public const int SBS_RIGHTALIGN = unchecked( (int)( 0x4 ) ); - public const int SBS_SIZEBOXTOPLEFTALIGN = unchecked( (int)( 0x2 ) ); - public const int SBS_SIZEBOXBOTTOMRIGHTALIGN = unchecked( (int)( 0x4 ) ); - public const int SBS_SIZEBOX = unchecked( (int)( 0x8 ) ); + public const int SBS_HORZ = unchecked((int)(0x0)); + public const int SBS_VERT = unchecked((int)(0x1)); + public const int SBS_TOPALIGN = unchecked((int)(0x2)); + public const int SBS_LEFTALIGN = unchecked((int)(0x2)); + public const int SBS_BOTTOMALIGN = unchecked((int)(0x4)); + public const int SBS_RIGHTALIGN = unchecked((int)(0x4)); + public const int SBS_SIZEBOXTOPLEFTALIGN = unchecked((int)(0x2)); + public const int SBS_SIZEBOXBOTTOMRIGHTALIGN = unchecked((int)(0x4)); + public const int SBS_SIZEBOX = unchecked((int)(0x8)); // Scroll bar messages - public const int SBM_SETPOS = unchecked( (int)( 0xE0 ) );// not in win3.1 - public const int SBM_GETPOS = unchecked( (int)( 0xE1 ) );// not in win3.1 - public const int SBM_SETRANGE = unchecked( (int)( 0xE2 ) );// not in win3.1 - public const int SBM_SETRANGEREDRAW = unchecked( (int)( 0xE6 ) );// not in win3.1 - public const int SBM_GETRANGE = unchecked( (int)( 0xE3 ) );// not in win3.1 - public const int SBM_ENABLE_ARROWS = unchecked( (int)( 0xE4 ) );// not in win3.1 + public const int SBM_SETPOS = unchecked((int)(0xE0));// not in win3.1 + public const int SBM_GETPOS = unchecked((int)(0xE1));// not in win3.1 + public const int SBM_SETRANGE = unchecked((int)(0xE2));// not in win3.1 + public const int SBM_SETRANGEREDRAW = unchecked((int)(0xE6));// not in win3.1 + public const int SBM_GETRANGE = unchecked((int)(0xE3));// not in win3.1 + public const int SBM_ENABLE_ARROWS = unchecked((int)(0xE4));// not in win3.1 - public const int MDIS_ALLCHILDSTYLES = unchecked( (int)( 0x1 ) ); + public const int MDIS_ALLCHILDSTYLES = unchecked((int)(0x1)); // wParam values for WM_MDITILE and WM_MDICASCADE messages. - public const int MDITILE_VERTICAL = unchecked( (int)( 0x0 ) ); - public const int MDITILE_HORIZONTAL = unchecked( (int)( 0x1 ) ); - public const int MDITILE_SKIPDISABLED = unchecked( (int)( 0x2 ) ); + public const int MDITILE_VERTICAL = unchecked((int)(0x0)); + public const int MDITILE_HORIZONTAL = unchecked((int)(0x1)); + public const int MDITILE_SKIPDISABLED = unchecked((int)(0x2)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MDICREATESTRUCT { public string szClass; @@ -10306,7 +10306,7 @@ public struct MDICREATESTRUCT public int lParam; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CLIENTCREATESTRUCT { public IntPtr hWindowMenu; @@ -10314,36 +10314,36 @@ public struct CLIENTCREATESTRUCT } - [DllImport( "user32", EntryPoint = "DefFrameProc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DefFrameProc( IntPtr hWnd, IntPtr hWndMDIClient, int wMsg, int wParam, int lParam ); + [DllImport("user32", EntryPoint = "DefFrameProc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DefFrameProc(IntPtr hWnd, IntPtr hWndMDIClient, int wMsg, int wParam, int lParam); - [DllImport( "user32", EntryPoint = "DefMDIChildProc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DefMDIChildProc( IntPtr hWnd, int wMsg, int wParam, int lParam ); + [DllImport("user32", EntryPoint = "DefMDIChildProc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DefMDIChildProc(IntPtr hWnd, int wMsg, int wParam, int lParam); - [DllImport( "user32", EntryPoint = "TranslateMDISysAccel", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int TranslateMDISysAccel( IntPtr hWndClient, ref MSG lpMsg ); + [DllImport("user32", EntryPoint = "TranslateMDISysAccel", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int TranslateMDISysAccel(IntPtr hWndClient, ref MSG lpMsg); - [DllImport( "user32", EntryPoint = "ArrangeIconicWindows", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ArrangeIconicWindows( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "ArrangeIconicWindows", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ArrangeIconicWindows(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "CreateMDIWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateMDIWindow( string lpClassName, string lpWindowName, int dwStyle, int x, int y, int nWidth, int nHeight, IntPtr hWndParent, IntPtr hInstance, int lParam ); + [DllImport("user32", EntryPoint = "CreateMDIWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateMDIWindow(string lpClassName, string lpWindowName, int dwStyle, int x, int y, int nWidth, int nHeight, IntPtr hWndParent, IntPtr hInstance, int lParam); // Help engine section. - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MULTIKEYHELP { public int mkSize; public byte mkKeylist; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = 253 )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 253)] public string szKeyphrase;// Array length is arbitrary; may be changed } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct HELPWININFO { public int wStructSize; @@ -10352,142 +10352,142 @@ public struct HELPWININFO public int dx; public int dy; public int wMax; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = 2 )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)] public string rgchMember; } // Commands to pass WinHelp() - public const int HELP_CONTEXT = unchecked( (int)( 0x1 ) );// Display topic in ulTopic - public const int HELP_QUIT = unchecked( (int)( 0x2 ) );// Terminate help - public const int HELP_INDEX = unchecked( (int)( 0x3 ) );// Display index - public const int HELP_CONTENTS = unchecked( (int)( 0x3 ) ); - public const int HELP_HELPONHELP = unchecked( (int)( 0x4 ) );// Display help on using help - public const int HELP_SETINDEX = unchecked( (int)( 0x5 ) );// Set current Index for multi index help - public const int HELP_SETCONTENTS = unchecked( (int)( 0x5 ) ); - public const int HELP_CONTEXTPOPUP = unchecked( (int)( 0x8 ) ); - public const int HELP_FORCEFILE = unchecked( (int)( 0x9 ) ); - public const int HELP_KEY = unchecked( (int)( 0x101 ) );// Display topic for keyword in offabData - public const int HELP_COMMAND = unchecked( (int)( 0x102 ) ); - public const int HELP_PARTIALKEY = unchecked( (int)( 0x105 ) ); - public const int HELP_MULTIKEY = unchecked( (int)( 0x201 ) ); - public const int HELP_SETWINPOS = unchecked( (int)( 0x203 ) ); - - - [DllImport( "user32", EntryPoint = "WinHelp", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WinHelp( IntPtr hWnd, string lpHelpFile, int wCommand, int dwData ); + public const int HELP_CONTEXT = unchecked((int)(0x1));// Display topic in ulTopic + public const int HELP_QUIT = unchecked((int)(0x2));// Terminate help + public const int HELP_INDEX = unchecked((int)(0x3));// Display index + public const int HELP_CONTENTS = unchecked((int)(0x3)); + public const int HELP_HELPONHELP = unchecked((int)(0x4));// Display help on using help + public const int HELP_SETINDEX = unchecked((int)(0x5));// Set current Index for multi index help + public const int HELP_SETCONTENTS = unchecked((int)(0x5)); + public const int HELP_CONTEXTPOPUP = unchecked((int)(0x8)); + public const int HELP_FORCEFILE = unchecked((int)(0x9)); + public const int HELP_KEY = unchecked((int)(0x101));// Display topic for keyword in offabData + public const int HELP_COMMAND = unchecked((int)(0x102)); + public const int HELP_PARTIALKEY = unchecked((int)(0x105)); + public const int HELP_MULTIKEY = unchecked((int)(0x201)); + public const int HELP_SETWINPOS = unchecked((int)(0x203)); + + + [DllImport("user32", EntryPoint = "WinHelp", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WinHelp(IntPtr hWnd, string lpHelpFile, int wCommand, int dwData); // Parameter for SystemParametersInfo() - public const int SPI_GETBEEP = unchecked( (int)( 1 ) ); - public const int SPI_SETBEEP = unchecked( (int)( 2 ) ); - public const int SPI_GETMOUSE = unchecked( (int)( 3 ) ); - public const int SPI_SETMOUSE = unchecked( (int)( 4 ) ); - public const int SPI_GETBORDER = unchecked( (int)( 5 ) ); - public const int SPI_SETBORDER = unchecked( (int)( 6 ) ); - public const int SPI_GETKEYBOARDSPEED = unchecked( (int)( 10 ) ); - public const int SPI_SETKEYBOARDSPEED = unchecked( (int)( 11 ) ); - public const int SPI_LANGDRIVER = unchecked( (int)( 12 ) ); - public const int SPI_ICONHORIZONTALSPACING = unchecked( (int)( 13 ) ); - public const int SPI_GETSCREENSAVETIMEOUT = unchecked( (int)( 14 ) ); - public const int SPI_SETSCREENSAVETIMEOUT = unchecked( (int)( 15 ) ); - public const int SPI_GETSCREENSAVEACTIVE = unchecked( (int)( 16 ) ); - public const int SPI_SETSCREENSAVEACTIVE = unchecked( (int)( 17 ) ); - public const int SPI_GETGRIDGRANULARITY = unchecked( (int)( 18 ) ); - public const int SPI_SETGRIDGRANULARITY = unchecked( (int)( 19 ) ); - public const int SPI_SETDESKWALLPAPER = unchecked( (int)( 20 ) ); - public const int SPI_SETDESKPATTERN = unchecked( (int)( 21 ) ); - public const int SPI_GETKEYBOARDDELAY = unchecked( (int)( 22 ) ); - public const int SPI_SETKEYBOARDDELAY = unchecked( (int)( 23 ) ); - public const int SPI_ICONVERTICALSPACING = unchecked( (int)( 24 ) ); - public const int SPI_GETICONTITLEWRAP = unchecked( (int)( 25 ) ); - public const int SPI_SETICONTITLEWRAP = unchecked( (int)( 26 ) ); - public const int SPI_GETMENUDROPALIGNMENT = unchecked( (int)( 27 ) ); - public const int SPI_SETMENUDROPALIGNMENT = unchecked( (int)( 28 ) ); - public const int SPI_SETDOUBLECLKWIDTH = unchecked( (int)( 29 ) ); - public const int SPI_SETDOUBLECLKHEIGHT = unchecked( (int)( 30 ) ); - public const int SPI_GETICONTITLELOGFONT = unchecked( (int)( 31 ) ); - public const int SPI_SETDOUBLECLICKTIME = unchecked( (int)( 32 ) ); - public const int SPI_SETMOUSEBUTTONSWAP = unchecked( (int)( 33 ) ); - public const int SPI_SETICONTITLELOGFONT = unchecked( (int)( 34 ) ); - public const int SPI_GETFASTTASKSWITCH = unchecked( (int)( 35 ) ); - public const int SPI_SETFASTTASKSWITCH = unchecked( (int)( 36 ) ); - public const int SPI_SETDRAGFULLWINDOWS = unchecked( (int)( 37 ) ); - public const int SPI_GETDRAGFULLWINDOWS = unchecked( (int)( 38 ) ); - public const int SPI_GETNONCLIENTMETRICS = unchecked( (int)( 41 ) ); - public const int SPI_SETNONCLIENTMETRICS = unchecked( (int)( 42 ) ); - public const int SPI_GETMINIMIZEDMETRICS = unchecked( (int)( 43 ) ); - public const int SPI_SETMINIMIZEDMETRICS = unchecked( (int)( 44 ) ); - public const int SPI_GETICONMETRICS = unchecked( (int)( 45 ) ); - public const int SPI_SETICONMETRICS = unchecked( (int)( 46 ) ); - public const int SPI_SETWORKAREA = unchecked( (int)( 47 ) ); - public const int SPI_GETWORKAREA = unchecked( (int)( 48 ) ); - public const int SPI_SETPENWINDOWS = unchecked( (int)( 49 ) ); - public const int SPI_GETFILTERKEYS = unchecked( (int)( 50 ) ); - public const int SPI_SETFILTERKEYS = unchecked( (int)( 51 ) ); - public const int SPI_GETTOGGLEKEYS = unchecked( (int)( 52 ) ); - public const int SPI_SETTOGGLEKEYS = unchecked( (int)( 53 ) ); - public const int SPI_GETMOUSEKEYS = unchecked( (int)( 54 ) ); - public const int SPI_SETMOUSEKEYS = unchecked( (int)( 55 ) ); - public const int SPI_GETSHOWSOUNDS = unchecked( (int)( 56 ) ); - public const int SPI_SETSHOWSOUNDS = unchecked( (int)( 57 ) ); - public const int SPI_GETSTICKYKEYS = unchecked( (int)( 58 ) ); - public const int SPI_SETSTICKYKEYS = unchecked( (int)( 59 ) ); - public const int SPI_GETACCESSTIMEOUT = unchecked( (int)( 60 ) ); - public const int SPI_SETACCESSTIMEOUT = unchecked( (int)( 61 ) ); - public const int SPI_GETSERIALKEYS = unchecked( (int)( 62 ) ); - public const int SPI_SETSERIALKEYS = unchecked( (int)( 63 ) ); - public const int SPI_GETSOUNDSENTRY = unchecked( (int)( 64 ) ); - public const int SPI_SETSOUNDSENTRY = unchecked( (int)( 65 ) ); - public const int SPI_GETHIGHCONTRAST = unchecked( (int)( 66 ) ); - public const int SPI_SETHIGHCONTRAST = unchecked( (int)( 67 ) ); - public const int SPI_GETKEYBOARDPREF = unchecked( (int)( 68 ) ); - public const int SPI_SETKEYBOARDPREF = unchecked( (int)( 69 ) ); - public const int SPI_GETSCREENREADER = unchecked( (int)( 70 ) ); - public const int SPI_SETSCREENREADER = unchecked( (int)( 71 ) ); - public const int SPI_GETANIMATION = unchecked( (int)( 72 ) ); - public const int SPI_SETANIMATION = unchecked( (int)( 73 ) ); - public const int SPI_GETFONTSMOOTHING = unchecked( (int)( 74 ) ); - public const int SPI_SETFONTSMOOTHING = unchecked( (int)( 75 ) ); - public const int SPI_SETDRAGWIDTH = unchecked( (int)( 76 ) ); - public const int SPI_SETDRAGHEIGHT = unchecked( (int)( 77 ) ); - public const int SPI_SETHANDHELD = unchecked( (int)( 78 ) ); - public const int SPI_GETLOWPOWERTIMEOUT = unchecked( (int)( 79 ) ); - public const int SPI_GETPOWEROFFTIMEOUT = unchecked( (int)( 80 ) ); - public const int SPI_SETLOWPOWERTIMEOUT = unchecked( (int)( 81 ) ); - public const int SPI_SETPOWEROFFTIMEOUT = unchecked( (int)( 82 ) ); - public const int SPI_GETLOWPOWERACTIVE = unchecked( (int)( 83 ) ); - public const int SPI_GETPOWEROFFACTIVE = unchecked( (int)( 84 ) ); - public const int SPI_SETLOWPOWERACTIVE = unchecked( (int)( 85 ) ); - public const int SPI_SETPOWEROFFACTIVE = unchecked( (int)( 86 ) ); - public const int SPI_SETCURSORS = unchecked( (int)( 87 ) ); - public const int SPI_SETICONS = unchecked( (int)( 88 ) ); - public const int SPI_GETDEFAULTINPUTLANG = unchecked( (int)( 89 ) ); - public const int SPI_SETDEFAULTINPUTLANG = unchecked( (int)( 90 ) ); - public const int SPI_SETLANGTOGGLE = unchecked( (int)( 91 ) ); - public const int SPI_GETWINDOWSEXTENSION = unchecked( (int)( 92 ) ); - public const int SPI_SETMOUSETRAILS = unchecked( (int)( 93 ) ); - public const int SPI_GETMOUSETRAILS = unchecked( (int)( 94 ) ); - public const int SPI_SCREENSAVERRUNNING = unchecked( (int)( 97 ) ); + public const int SPI_GETBEEP = unchecked((int)(1)); + public const int SPI_SETBEEP = unchecked((int)(2)); + public const int SPI_GETMOUSE = unchecked((int)(3)); + public const int SPI_SETMOUSE = unchecked((int)(4)); + public const int SPI_GETBORDER = unchecked((int)(5)); + public const int SPI_SETBORDER = unchecked((int)(6)); + public const int SPI_GETKEYBOARDSPEED = unchecked((int)(10)); + public const int SPI_SETKEYBOARDSPEED = unchecked((int)(11)); + public const int SPI_LANGDRIVER = unchecked((int)(12)); + public const int SPI_ICONHORIZONTALSPACING = unchecked((int)(13)); + public const int SPI_GETSCREENSAVETIMEOUT = unchecked((int)(14)); + public const int SPI_SETSCREENSAVETIMEOUT = unchecked((int)(15)); + public const int SPI_GETSCREENSAVEACTIVE = unchecked((int)(16)); + public const int SPI_SETSCREENSAVEACTIVE = unchecked((int)(17)); + public const int SPI_GETGRIDGRANULARITY = unchecked((int)(18)); + public const int SPI_SETGRIDGRANULARITY = unchecked((int)(19)); + public const int SPI_SETDESKWALLPAPER = unchecked((int)(20)); + public const int SPI_SETDESKPATTERN = unchecked((int)(21)); + public const int SPI_GETKEYBOARDDELAY = unchecked((int)(22)); + public const int SPI_SETKEYBOARDDELAY = unchecked((int)(23)); + public const int SPI_ICONVERTICALSPACING = unchecked((int)(24)); + public const int SPI_GETICONTITLEWRAP = unchecked((int)(25)); + public const int SPI_SETICONTITLEWRAP = unchecked((int)(26)); + public const int SPI_GETMENUDROPALIGNMENT = unchecked((int)(27)); + public const int SPI_SETMENUDROPALIGNMENT = unchecked((int)(28)); + public const int SPI_SETDOUBLECLKWIDTH = unchecked((int)(29)); + public const int SPI_SETDOUBLECLKHEIGHT = unchecked((int)(30)); + public const int SPI_GETICONTITLELOGFONT = unchecked((int)(31)); + public const int SPI_SETDOUBLECLICKTIME = unchecked((int)(32)); + public const int SPI_SETMOUSEBUTTONSWAP = unchecked((int)(33)); + public const int SPI_SETICONTITLELOGFONT = unchecked((int)(34)); + public const int SPI_GETFASTTASKSWITCH = unchecked((int)(35)); + public const int SPI_SETFASTTASKSWITCH = unchecked((int)(36)); + public const int SPI_SETDRAGFULLWINDOWS = unchecked((int)(37)); + public const int SPI_GETDRAGFULLWINDOWS = unchecked((int)(38)); + public const int SPI_GETNONCLIENTMETRICS = unchecked((int)(41)); + public const int SPI_SETNONCLIENTMETRICS = unchecked((int)(42)); + public const int SPI_GETMINIMIZEDMETRICS = unchecked((int)(43)); + public const int SPI_SETMINIMIZEDMETRICS = unchecked((int)(44)); + public const int SPI_GETICONMETRICS = unchecked((int)(45)); + public const int SPI_SETICONMETRICS = unchecked((int)(46)); + public const int SPI_SETWORKAREA = unchecked((int)(47)); + public const int SPI_GETWORKAREA = unchecked((int)(48)); + public const int SPI_SETPENWINDOWS = unchecked((int)(49)); + public const int SPI_GETFILTERKEYS = unchecked((int)(50)); + public const int SPI_SETFILTERKEYS = unchecked((int)(51)); + public const int SPI_GETTOGGLEKEYS = unchecked((int)(52)); + public const int SPI_SETTOGGLEKEYS = unchecked((int)(53)); + public const int SPI_GETMOUSEKEYS = unchecked((int)(54)); + public const int SPI_SETMOUSEKEYS = unchecked((int)(55)); + public const int SPI_GETSHOWSOUNDS = unchecked((int)(56)); + public const int SPI_SETSHOWSOUNDS = unchecked((int)(57)); + public const int SPI_GETSTICKYKEYS = unchecked((int)(58)); + public const int SPI_SETSTICKYKEYS = unchecked((int)(59)); + public const int SPI_GETACCESSTIMEOUT = unchecked((int)(60)); + public const int SPI_SETACCESSTIMEOUT = unchecked((int)(61)); + public const int SPI_GETSERIALKEYS = unchecked((int)(62)); + public const int SPI_SETSERIALKEYS = unchecked((int)(63)); + public const int SPI_GETSOUNDSENTRY = unchecked((int)(64)); + public const int SPI_SETSOUNDSENTRY = unchecked((int)(65)); + public const int SPI_GETHIGHCONTRAST = unchecked((int)(66)); + public const int SPI_SETHIGHCONTRAST = unchecked((int)(67)); + public const int SPI_GETKEYBOARDPREF = unchecked((int)(68)); + public const int SPI_SETKEYBOARDPREF = unchecked((int)(69)); + public const int SPI_GETSCREENREADER = unchecked((int)(70)); + public const int SPI_SETSCREENREADER = unchecked((int)(71)); + public const int SPI_GETANIMATION = unchecked((int)(72)); + public const int SPI_SETANIMATION = unchecked((int)(73)); + public const int SPI_GETFONTSMOOTHING = unchecked((int)(74)); + public const int SPI_SETFONTSMOOTHING = unchecked((int)(75)); + public const int SPI_SETDRAGWIDTH = unchecked((int)(76)); + public const int SPI_SETDRAGHEIGHT = unchecked((int)(77)); + public const int SPI_SETHANDHELD = unchecked((int)(78)); + public const int SPI_GETLOWPOWERTIMEOUT = unchecked((int)(79)); + public const int SPI_GETPOWEROFFTIMEOUT = unchecked((int)(80)); + public const int SPI_SETLOWPOWERTIMEOUT = unchecked((int)(81)); + public const int SPI_SETPOWEROFFTIMEOUT = unchecked((int)(82)); + public const int SPI_GETLOWPOWERACTIVE = unchecked((int)(83)); + public const int SPI_GETPOWEROFFACTIVE = unchecked((int)(84)); + public const int SPI_SETLOWPOWERACTIVE = unchecked((int)(85)); + public const int SPI_SETPOWEROFFACTIVE = unchecked((int)(86)); + public const int SPI_SETCURSORS = unchecked((int)(87)); + public const int SPI_SETICONS = unchecked((int)(88)); + public const int SPI_GETDEFAULTINPUTLANG = unchecked((int)(89)); + public const int SPI_SETDEFAULTINPUTLANG = unchecked((int)(90)); + public const int SPI_SETLANGTOGGLE = unchecked((int)(91)); + public const int SPI_GETWINDOWSEXTENSION = unchecked((int)(92)); + public const int SPI_SETMOUSETRAILS = unchecked((int)(93)); + public const int SPI_GETMOUSETRAILS = unchecked((int)(94)); + public const int SPI_SCREENSAVERRUNNING = unchecked((int)(97)); // SystemParametersInfo flags - public const int SPIF_UPDATEINIFILE = unchecked( (int)( 0x1 ) ); - public const int SPIF_SENDWININICHANGE = unchecked( (int)( 0x2 ) ); + public const int SPIF_UPDATEINIFILE = unchecked((int)(0x1)); + public const int SPIF_SENDWININICHANGE = unchecked((int)(0x2)); - [DllImport( "user32", EntryPoint = "SystemParametersInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SystemParametersInfo( int uAction, int uParam, ref IntPtr lpvParam, int fuWinIni ); + [DllImport("user32", EntryPoint = "SystemParametersInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SystemParametersInfo(int uAction, int uParam, ref IntPtr lpvParam, int fuWinIni); // DDE window messages - public const int WM_DDE_FIRST = unchecked( (int)( 0x3E0 ) ); - public const int WM_DDE_INITIATE = unchecked( (int)( ( WM_DDE_FIRST ) ) ); - public const int WM_DDE_TERMINATE = unchecked( (int)( ( WM_DDE_FIRST + 1 ) ) ); - public const int WM_DDE_ADVISE = unchecked( (int)( ( WM_DDE_FIRST + 2 ) ) ); - public const int WM_DDE_UNADVISE = unchecked( (int)( ( WM_DDE_FIRST + 3 ) ) ); - public const int WM_DDE_ACK = unchecked( (int)( ( WM_DDE_FIRST + 4 ) ) ); - public const int WM_DDE_DATA = unchecked( (int)( ( WM_DDE_FIRST + 5 ) ) ); - public const int WM_DDE_REQUEST = unchecked( (int)( ( WM_DDE_FIRST + 6 ) ) ); - public const int WM_DDE_POKE = unchecked( (int)( ( WM_DDE_FIRST + 7 ) ) ); - public const int WM_DDE_EXECUTE = unchecked( (int)( ( WM_DDE_FIRST + 8 ) ) ); - public const int WM_DDE_LAST = unchecked( (int)( ( WM_DDE_FIRST + 8 ) ) ); + public const int WM_DDE_FIRST = unchecked((int)(0x3E0)); + public const int WM_DDE_INITIATE = unchecked((int)((WM_DDE_FIRST))); + public const int WM_DDE_TERMINATE = unchecked((int)((WM_DDE_FIRST + 1))); + public const int WM_DDE_ADVISE = unchecked((int)((WM_DDE_FIRST + 2))); + public const int WM_DDE_UNADVISE = unchecked((int)((WM_DDE_FIRST + 3))); + public const int WM_DDE_ACK = unchecked((int)((WM_DDE_FIRST + 4))); + public const int WM_DDE_DATA = unchecked((int)((WM_DDE_FIRST + 5))); + public const int WM_DDE_REQUEST = unchecked((int)((WM_DDE_FIRST + 6))); + public const int WM_DDE_POKE = unchecked((int)((WM_DDE_FIRST + 7))); + public const int WM_DDE_EXECUTE = unchecked((int)((WM_DDE_FIRST + 8))); + public const int WM_DDE_LAST = unchecked((int)((WM_DDE_FIRST + 8))); // ***************************************************************************** * // * dde.h - Dynamic Data Exchange structures and definitions * @@ -10506,7 +10506,7 @@ public struct HELPWININFO // // ----------------------------------------------------------------------------*/ - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DDEACK { public int bAppReturnCode; @@ -10522,7 +10522,7 @@ public struct DDEACK // // ----------------------------------------------------------------------------*/ - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DDEADVISE { public int Reserved; @@ -10541,7 +10541,7 @@ public struct DDEADVISE // // ----------------------------------------------------------------------------*/ - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DDEDATA { public int unused; @@ -10563,7 +10563,7 @@ public struct DDEDATA // // ----------------------------------------------------------------------------*/ - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DDEPOKE { public int unused; @@ -10583,7 +10583,7 @@ public struct DDEPOKE // not correctly define the bit positions. // ----------------------------------------------------------------------------*/ - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DDELN { public int unused; @@ -10593,7 +10593,7 @@ public struct DDELN public int cfFormat; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DDEUP { public int unused; @@ -10606,25 +10606,25 @@ public struct DDEUP } - [DllImport( "user32", EntryPoint = "DdeSetQualityOfService", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeSetQualityOfService( IntPtr hWndClient, SECURITY_QUALITY_OF_SERVICE pqosNew, SECURITY_QUALITY_OF_SERVICE pqosPrev ); + [DllImport("user32", EntryPoint = "DdeSetQualityOfService", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeSetQualityOfService(IntPtr hWndClient, SECURITY_QUALITY_OF_SERVICE pqosNew, SECURITY_QUALITY_OF_SERVICE pqosPrev); - [DllImport( "user32", EntryPoint = "ImpersonateDdeClientWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImpersonateDdeClientWindow( IntPtr hWndClient, IntPtr hWndServer ); + [DllImport("user32", EntryPoint = "ImpersonateDdeClientWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImpersonateDdeClientWindow(IntPtr hWndClient, IntPtr hWndServer); - [DllImport( "user32", EntryPoint = "PackDDElParam", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PackDDElParam( int msg, int uiLo, int uiHi ); + [DllImport("user32", EntryPoint = "PackDDElParam", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PackDDElParam(int msg, int uiLo, int uiHi); - [DllImport( "user32", EntryPoint = "UnpackDDElParam", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int UnpackDDElParam( int msg, int lParam, int puiLo, int puiHi ); + [DllImport("user32", EntryPoint = "UnpackDDElParam", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int UnpackDDElParam(int msg, int lParam, int puiLo, int puiHi); - [DllImport( "user32", EntryPoint = "FreeDDElParam", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FreeDDElParam( int msg, int lParam ); + [DllImport("user32", EntryPoint = "FreeDDElParam", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FreeDDElParam(int msg, int lParam); - [DllImport( "user32", EntryPoint = "ReuseDDElParam", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ReuseDDElParam( int lParam, int msgIn, int msgOut, int uiLo, int uiHi ); + [DllImport("user32", EntryPoint = "ReuseDDElParam", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ReuseDDElParam(int lParam, int msgIn, int msgOut, int uiLo, int uiHi); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct HSZPAIR { public IntPtr hszSvc; @@ -10635,7 +10635,7 @@ public struct HSZPAIR //// Quality Of Service //// - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SECURITY_QUALITY_OF_SERVICE { public int Length; @@ -10644,7 +10644,7 @@ public struct SECURITY_QUALITY_OF_SERVICE public int EffectiveOnly; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CONVCONTEXT { public int cb; @@ -10656,7 +10656,7 @@ public struct CONVCONTEXT public SECURITY_QUALITY_OF_SERVICE qos; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CONVINFO { public int cb; @@ -10678,267 +10678,267 @@ public struct CONVINFO } // conversation states (usState) - public const int XST_NULL = unchecked( (int)( 0 ) );// quiescent states - public const int XST_INCOMPLETE = unchecked( (int)( 1 ) ); - public const int XST_CONNECTED = unchecked( (int)( 2 ) ); - public const int XST_INIT1 = unchecked( (int)( 3 ) );// mid-initiation states - public const int XST_INIT2 = unchecked( (int)( 4 ) ); - public const int XST_REQSENT = unchecked( (int)( 5 ) );// active conversation states - public const int XST_DATARCVD = unchecked( (int)( 6 ) ); - public const int XST_POKESENT = unchecked( (int)( 7 ) ); - public const int XST_POKEACKRCVD = unchecked( (int)( 8 ) ); - public const int XST_EXECSENT = unchecked( (int)( 9 ) ); - public const int XST_EXECACKRCVD = unchecked( (int)( 10 ) ); - public const int XST_ADVSENT = unchecked( (int)( 11 ) ); - public const int XST_UNADVSENT = unchecked( (int)( 12 ) ); - public const int XST_ADVACKRCVD = unchecked( (int)( 13 ) ); - public const int XST_UNADVACKRCVD = unchecked( (int)( 14 ) ); - public const int XST_ADVDATASENT = unchecked( (int)( 15 ) ); - public const int XST_ADVDATAACKRCVD = unchecked( (int)( 16 ) ); + public const int XST_NULL = unchecked((int)(0));// quiescent states + public const int XST_INCOMPLETE = unchecked((int)(1)); + public const int XST_CONNECTED = unchecked((int)(2)); + public const int XST_INIT1 = unchecked((int)(3));// mid-initiation states + public const int XST_INIT2 = unchecked((int)(4)); + public const int XST_REQSENT = unchecked((int)(5));// active conversation states + public const int XST_DATARCVD = unchecked((int)(6)); + public const int XST_POKESENT = unchecked((int)(7)); + public const int XST_POKEACKRCVD = unchecked((int)(8)); + public const int XST_EXECSENT = unchecked((int)(9)); + public const int XST_EXECACKRCVD = unchecked((int)(10)); + public const int XST_ADVSENT = unchecked((int)(11)); + public const int XST_UNADVSENT = unchecked((int)(12)); + public const int XST_ADVACKRCVD = unchecked((int)(13)); + public const int XST_UNADVACKRCVD = unchecked((int)(14)); + public const int XST_ADVDATASENT = unchecked((int)(15)); + public const int XST_ADVDATAACKRCVD = unchecked((int)(16)); // used in LOWORD(dwData1) of XTYP_ADVREQ callbacks... - public const int CADV_LATEACK = unchecked( (int)( 0xFFFF ) ); + public const int CADV_LATEACK = unchecked((int)(0xFFFF)); // conversation status bits (fsStatus) - public const int ST_CONNECTED = unchecked( (int)( 0x1 ) ); - public const int ST_ADVISE = unchecked( (int)( 0x2 ) ); - public const int ST_ISLOCAL = unchecked( (int)( 0x4 ) ); - public const int ST_BLOCKED = unchecked( (int)( 0x8 ) ); - public const int ST_CLIENT = unchecked( (int)( 0x10 ) ); - public const int ST_TERMINATED = unchecked( (int)( 0x20 ) ); - public const int ST_INLIST = unchecked( (int)( 0x40 ) ); - public const int ST_BLOCKNEXT = unchecked( (int)( 0x80 ) ); - public const int ST_ISSELF = unchecked( (int)( 0x100 ) ); + public const int ST_CONNECTED = unchecked((int)(0x1)); + public const int ST_ADVISE = unchecked((int)(0x2)); + public const int ST_ISLOCAL = unchecked((int)(0x4)); + public const int ST_BLOCKED = unchecked((int)(0x8)); + public const int ST_CLIENT = unchecked((int)(0x10)); + public const int ST_TERMINATED = unchecked((int)(0x20)); + public const int ST_INLIST = unchecked((int)(0x40)); + public const int ST_BLOCKNEXT = unchecked((int)(0x80)); + public const int ST_ISSELF = unchecked((int)(0x100)); // DDE constants for wStatus field - public const int DDE_FACK = unchecked( (int)( 0x8000 ) ); - public const int DDE_FBUSY = unchecked( (int)( 0x4000 ) ); - public const int DDE_FDEFERUPD = unchecked( (int)( 0x4000 ) ); - public const int DDE_FACKREQ = unchecked( (int)( 0x8000 ) ); - public const int DDE_FRELEASE = unchecked( (int)( 0x2000 ) ); - public const int DDE_FREQUESTED = unchecked( (int)( 0x1000 ) ); - public const int DDE_FAPPSTATUS = unchecked( (int)( 0xFF ) ); - public const int DDE_FNOTPROCESSED = unchecked( (int)( 0x0 ) ); - - public const int DDE_FACKRESERVED = unchecked( (int)( ( ~( DDE_FACK | DDE_FBUSY | DDE_FAPPSTATUS ) ) ) ); - public const int DDE_FADVRESERVED = unchecked( (int)( ( ~( DDE_FACKREQ | DDE_FDEFERUPD ) ) ) ); - public const int DDE_FDATRESERVED = unchecked( (int)( ( ~( DDE_FACKREQ | DDE_FRELEASE | DDE_FREQUESTED ) ) ) ); - public const int DDE_FPOKRESERVED = unchecked( (int)( ( ~( DDE_FRELEASE ) ) ) ); + public const int DDE_FACK = unchecked((int)(0x8000)); + public const int DDE_FBUSY = unchecked((int)(0x4000)); + public const int DDE_FDEFERUPD = unchecked((int)(0x4000)); + public const int DDE_FACKREQ = unchecked((int)(0x8000)); + public const int DDE_FRELEASE = unchecked((int)(0x2000)); + public const int DDE_FREQUESTED = unchecked((int)(0x1000)); + public const int DDE_FAPPSTATUS = unchecked((int)(0xFF)); + public const int DDE_FNOTPROCESSED = unchecked((int)(0x0)); + + public const int DDE_FACKRESERVED = unchecked((int)((~(DDE_FACK | DDE_FBUSY | DDE_FAPPSTATUS)))); + public const int DDE_FADVRESERVED = unchecked((int)((~(DDE_FACKREQ | DDE_FDEFERUPD)))); + public const int DDE_FDATRESERVED = unchecked((int)((~(DDE_FACKREQ | DDE_FRELEASE | DDE_FREQUESTED)))); + public const int DDE_FPOKRESERVED = unchecked((int)((~(DDE_FRELEASE)))); // message filter hook types - public const int MSGF_DDEMGR = unchecked( (int)( 0x8001 ) ); + public const int MSGF_DDEMGR = unchecked((int)(0x8001)); // codepage constants - public const int CP_WINANSI = unchecked( (int)( 1004 ) );// default codepage for windows old DDE convs. - public const int CP_WINUNICODE = unchecked( (int)( 1200 ) ); + public const int CP_WINANSI = unchecked((int)(1004));// default codepage for windows old DDE convs. + public const int CP_WINUNICODE = unchecked((int)(1200)); // transaction types - public const int XTYPF_NOBLOCK = unchecked( (int)( 0x2 ) );// CBR_BLOCK will not work - public const int XTYPF_NODATA = unchecked( (int)( 0x4 ) );// DDE_FDEFERUPD - public const int XTYPF_ACKREQ = unchecked( (int)( 0x8 ) );// DDE_FACKREQ - - public const int XCLASS_MASK = unchecked( (int)( 0xFC00 ) ); - public const int XCLASS_BOOL = unchecked( (int)( 0x1000 ) ); - public const int XCLASS_DATA = unchecked( (int)( 0x2000 ) ); - public const int XCLASS_FLAGS = unchecked( (int)( 0x4000 ) ); - public const int XCLASS_NOTIFICATION = unchecked( (int)( 0x8000 ) ); - - public const int XTYP_ERROR = unchecked( (int)( ( 0x0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK ) ) ); - public const int XTYP_ADVDATA = unchecked( (int)( ( 0x10 | XCLASS_FLAGS ) ) ); - public const int XTYP_ADVREQ = unchecked( (int)( ( 0x20 | XCLASS_DATA | XTYPF_NOBLOCK ) ) ); - public const int XTYP_ADVSTART = unchecked( (int)( ( 0x30 | XCLASS_BOOL ) ) ); - public const int XTYP_ADVSTOP = unchecked( (int)( ( 0x40 | XCLASS_NOTIFICATION ) ) ); - public const int XTYP_EXECUTE = unchecked( (int)( ( 0x50 | XCLASS_FLAGS ) ) ); - public const int XTYP_CONNECT = unchecked( (int)( ( 0x60 | XCLASS_BOOL | XTYPF_NOBLOCK ) ) ); - public const int XTYP_CONNECT_CONFIRM = unchecked( (int)( ( 0x70 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK ) ) ); - public const int XTYP_XACT_COMPLETE = unchecked( (int)( ( 0x80 | XCLASS_NOTIFICATION ) ) ); - public const int XTYP_POKE = unchecked( (int)( ( 0x90 | XCLASS_FLAGS ) ) ); - public const int XTYP_REGISTER = unchecked( (int)( ( 0xA0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK ) ) ); - public const int XTYP_REQUEST = unchecked( (int)( ( 0xB0 | XCLASS_DATA ) ) ); - public const int XTYP_DISCONNECT = unchecked( (int)( ( 0xC0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK ) ) ); - public const int XTYP_UNREGISTER = unchecked( (int)( ( 0xD0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK ) ) ); - public const int XTYP_WILDCONNECT = unchecked( (int)( ( 0xE0 | XCLASS_DATA | XTYPF_NOBLOCK ) ) ); - - public const int XTYP_MASK = unchecked( (int)( 0xF0 ) ); - public const int XTYP_SHIFT = unchecked( (int)( 4 ) );// shift to turn XTYP_ into an index + public const int XTYPF_NOBLOCK = unchecked((int)(0x2));// CBR_BLOCK will not work + public const int XTYPF_NODATA = unchecked((int)(0x4));// DDE_FDEFERUPD + public const int XTYPF_ACKREQ = unchecked((int)(0x8));// DDE_FACKREQ + + public const int XCLASS_MASK = unchecked((int)(0xFC00)); + public const int XCLASS_BOOL = unchecked((int)(0x1000)); + public const int XCLASS_DATA = unchecked((int)(0x2000)); + public const int XCLASS_FLAGS = unchecked((int)(0x4000)); + public const int XCLASS_NOTIFICATION = unchecked((int)(0x8000)); + + public const int XTYP_ERROR = unchecked((int)((0x0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK))); + public const int XTYP_ADVDATA = unchecked((int)((0x10 | XCLASS_FLAGS))); + public const int XTYP_ADVREQ = unchecked((int)((0x20 | XCLASS_DATA | XTYPF_NOBLOCK))); + public const int XTYP_ADVSTART = unchecked((int)((0x30 | XCLASS_BOOL))); + public const int XTYP_ADVSTOP = unchecked((int)((0x40 | XCLASS_NOTIFICATION))); + public const int XTYP_EXECUTE = unchecked((int)((0x50 | XCLASS_FLAGS))); + public const int XTYP_CONNECT = unchecked((int)((0x60 | XCLASS_BOOL | XTYPF_NOBLOCK))); + public const int XTYP_CONNECT_CONFIRM = unchecked((int)((0x70 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK))); + public const int XTYP_XACT_COMPLETE = unchecked((int)((0x80 | XCLASS_NOTIFICATION))); + public const int XTYP_POKE = unchecked((int)((0x90 | XCLASS_FLAGS))); + public const int XTYP_REGISTER = unchecked((int)((0xA0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK))); + public const int XTYP_REQUEST = unchecked((int)((0xB0 | XCLASS_DATA))); + public const int XTYP_DISCONNECT = unchecked((int)((0xC0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK))); + public const int XTYP_UNREGISTER = unchecked((int)((0xD0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK))); + public const int XTYP_WILDCONNECT = unchecked((int)((0xE0 | XCLASS_DATA | XTYPF_NOBLOCK))); + + public const int XTYP_MASK = unchecked((int)(0xF0)); + public const int XTYP_SHIFT = unchecked((int)(4));// shift to turn XTYP_ into an index // Timeout constants - public const int TIMEOUT_ASYNC = unchecked( (int)( 0xFFFF ) ); + public const int TIMEOUT_ASYNC = unchecked((int)(0xFFFF)); // Transaction ID constants - public const int QID_SYNC = unchecked( (int)( 0xFFFF ) ); + public const int QID_SYNC = unchecked((int)(0xFFFF)); // Public strings used in DDE - public const string SZDDESYS_TOPIC = unchecked( (string)( "SYSTEM" ) ); - public const string SZDDESYS_ITEM_TOPICS = unchecked( (string)( "TOPICS" ) ); - public const string SZDDESYS_ITEM_SYSITEMS = unchecked( (string)( "SYSITEMS" ) ); - public const string SZDDESYS_ITEM_RTNMSG = unchecked( (string)( "RETURNMESSAGE" ) ); - public const string SZDDESYS_ITEM_STATUS = unchecked( (string)( "STATUS" ) ); - public const string SZDDESYS_ITEM_FORMATS = unchecked( (string)( "FORMATS" ) ); - public const string SZDDESYS_ITEM_HELP = unchecked( (string)( "HELP" ) ); - public const string SZDDE_ITEM_ITEMLIST = unchecked( (string)( "TOPICITEMLIST" ) ); + public const string SZDDESYS_TOPIC = unchecked((string)("SYSTEM")); + public const string SZDDESYS_ITEM_TOPICS = unchecked((string)("TOPICS")); + public const string SZDDESYS_ITEM_SYSITEMS = unchecked((string)("SYSITEMS")); + public const string SZDDESYS_ITEM_RTNMSG = unchecked((string)("RETURNMESSAGE")); + public const string SZDDESYS_ITEM_STATUS = unchecked((string)("STATUS")); + public const string SZDDESYS_ITEM_FORMATS = unchecked((string)("FORMATS")); + public const string SZDDESYS_ITEM_HELP = unchecked((string)("HELP")); + public const string SZDDE_ITEM_ITEMLIST = unchecked((string)("TOPICITEMLIST")); - public const int CBR_BLOCK = unchecked( (int)( 0xFFFF ) ); + public const int CBR_BLOCK = unchecked((int)(0xFFFF)); // Callback filter flags for use with standard apps. - public const int CBF_FAIL_SELFCONNECTIONS = unchecked( (int)( 0x1000 ) ); - public const int CBF_FAIL_CONNECTIONS = unchecked( (int)( 0x2000 ) ); - public const int CBF_FAIL_ADVISES = unchecked( (int)( 0x4000 ) ); - public const int CBF_FAIL_EXECUTES = unchecked( (int)( 0x8000 ) ); - public const int CBF_FAIL_POKES = unchecked( (int)( 0x10000 ) ); - public const int CBF_FAIL_REQUESTS = unchecked( (int)( 0x20000 ) ); - public const int CBF_FAIL_ALLSVRXACTIONS = unchecked( (int)( 0x3F000 ) ); - - public const int CBF_SKIP_CONNECT_CONFIRMS = unchecked( (int)( 0x40000 ) ); - public const int CBF_SKIP_REGISTRATIONS = unchecked( (int)( 0x80000 ) ); - public const int CBF_SKIP_UNREGISTRATIONS = unchecked( (int)( 0x100000 ) ); - public const int CBF_SKIP_DISCONNECTS = unchecked( (int)( 0x200000 ) ); - public const int CBF_SKIP_ALLNOTIFICATIONS = unchecked( (int)( 0x3C0000 ) ); + public const int CBF_FAIL_SELFCONNECTIONS = unchecked((int)(0x1000)); + public const int CBF_FAIL_CONNECTIONS = unchecked((int)(0x2000)); + public const int CBF_FAIL_ADVISES = unchecked((int)(0x4000)); + public const int CBF_FAIL_EXECUTES = unchecked((int)(0x8000)); + public const int CBF_FAIL_POKES = unchecked((int)(0x10000)); + public const int CBF_FAIL_REQUESTS = unchecked((int)(0x20000)); + public const int CBF_FAIL_ALLSVRXACTIONS = unchecked((int)(0x3F000)); + + public const int CBF_SKIP_CONNECT_CONFIRMS = unchecked((int)(0x40000)); + public const int CBF_SKIP_REGISTRATIONS = unchecked((int)(0x80000)); + public const int CBF_SKIP_UNREGISTRATIONS = unchecked((int)(0x100000)); + public const int CBF_SKIP_DISCONNECTS = unchecked((int)(0x200000)); + public const int CBF_SKIP_ALLNOTIFICATIONS = unchecked((int)(0x3C0000)); // Application command flags - public const int APPCMD_CLIENTONLY = unchecked( (int)( 0x10 ) ); - public const int APPCMD_FILTERINITS = unchecked( (int)( 0x20 ) ); - public const int APPCMD_MASK = unchecked( (int)( 0xFF0 ) ); + public const int APPCMD_CLIENTONLY = unchecked((int)(0x10)); + public const int APPCMD_FILTERINITS = unchecked((int)(0x20)); + public const int APPCMD_MASK = unchecked((int)(0xFF0)); // Application classification flags - public const int APPCLASS_STANDARD = unchecked( (int)( 0x0 ) ); - public const int APPCLASS_MASK = unchecked( (int)( 0xF ) ); + public const int APPCLASS_STANDARD = unchecked((int)(0x0)); + public const int APPCLASS_MASK = unchecked((int)(0xF)); - [DllImport( "user32", EntryPoint = "DdeUninitialize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeUninitialize( int idInst ); + [DllImport("user32", EntryPoint = "DdeUninitialize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeUninitialize(int idInst); // conversation enumeration functions - [DllImport( "user32", EntryPoint = "DdeConnectList", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeConnectList( int idInst, IntPtr hszService, IntPtr hszTopic, IntPtr hConvList, CONVCONTEXT pCC ); + [DllImport("user32", EntryPoint = "DdeConnectList", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeConnectList(int idInst, IntPtr hszService, IntPtr hszTopic, IntPtr hConvList, CONVCONTEXT pCC); - [DllImport( "user32", EntryPoint = "DdeQueryNextServer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeQueryNextServer( IntPtr hConvList, IntPtr hConvPrev ); + [DllImport("user32", EntryPoint = "DdeQueryNextServer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeQueryNextServer(IntPtr hConvList, IntPtr hConvPrev); - [DllImport( "user32", EntryPoint = "DdeDisconnectList", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeDisconnectList( IntPtr hConvList ); + [DllImport("user32", EntryPoint = "DdeDisconnectList", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeDisconnectList(IntPtr hConvList); // conversation control functions - [DllImport( "user32", EntryPoint = "DdeConnect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeConnect( int idInst, IntPtr hszService, IntPtr hszTopic, CONVCONTEXT pCC ); + [DllImport("user32", EntryPoint = "DdeConnect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeConnect(int idInst, IntPtr hszService, IntPtr hszTopic, CONVCONTEXT pCC); - [DllImport( "user32", EntryPoint = "DdeDisconnect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeDisconnect( IntPtr hConv ); + [DllImport("user32", EntryPoint = "DdeDisconnect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeDisconnect(IntPtr hConv); - [DllImport( "user32", EntryPoint = "DdeReconnect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeReconnect( IntPtr hConv ); + [DllImport("user32", EntryPoint = "DdeReconnect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeReconnect(IntPtr hConv); - [DllImport( "user32", EntryPoint = "DdeQueryConvInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeQueryConvInfo( IntPtr hConv, int idTransaction, CONVINFO pConvInfo ); + [DllImport("user32", EntryPoint = "DdeQueryConvInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeQueryConvInfo(IntPtr hConv, int idTransaction, CONVINFO pConvInfo); - [DllImport( "user32", EntryPoint = "DdeSetUserHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeSetUserHandle( IntPtr hConv, int id, IntPtr hUser ); + [DllImport("user32", EntryPoint = "DdeSetUserHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeSetUserHandle(IntPtr hConv, int id, IntPtr hUser); - [DllImport( "user32", EntryPoint = "DdeAbandonTransaction", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeAbandonTransaction( int idInst, IntPtr hConv, int idTransaction ); + [DllImport("user32", EntryPoint = "DdeAbandonTransaction", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeAbandonTransaction(int idInst, IntPtr hConv, int idTransaction); // app server interface functions - [DllImport( "user32", EntryPoint = "DdePostAdvise", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdePostAdvise( int idInst, IntPtr hszTopic, IntPtr hszItem ); + [DllImport("user32", EntryPoint = "DdePostAdvise", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdePostAdvise(int idInst, IntPtr hszTopic, IntPtr hszItem); - [DllImport( "user32", EntryPoint = "DdeEnableCallback", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeEnableCallback( int idInst, IntPtr hConv, int wCmd ); + [DllImport("user32", EntryPoint = "DdeEnableCallback", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeEnableCallback(int idInst, IntPtr hConv, int wCmd); - [DllImport( "user32", EntryPoint = "DdeImpersonateClient", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeImpersonateClient( IntPtr hConv ); + [DllImport("user32", EntryPoint = "DdeImpersonateClient", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeImpersonateClient(IntPtr hConv); - public const int EC_ENABLEALL = unchecked( (int)( 0 ) ); - public const int EC_ENABLEONE = unchecked( (int)( ST_BLOCKNEXT ) ); - public const int EC_DISABLE = unchecked( (int)( ST_BLOCKED ) ); - public const int EC_QUERYWAITING = unchecked( (int)( 2 ) ); + public const int EC_ENABLEALL = unchecked((int)(0)); + public const int EC_ENABLEONE = unchecked((int)(ST_BLOCKNEXT)); + public const int EC_DISABLE = unchecked((int)(ST_BLOCKED)); + public const int EC_QUERYWAITING = unchecked((int)(2)); - [DllImport( "user32", EntryPoint = "DdeNameService", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeNameService( int idInst, IntPtr hsz1, IntPtr hsz2, int afCmd ); + [DllImport("user32", EntryPoint = "DdeNameService", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeNameService(int idInst, IntPtr hsz1, IntPtr hsz2, int afCmd); - public const int DNS_REGISTER = unchecked( (int)( 0x1 ) ); - public const int DNS_UNREGISTER = unchecked( (int)( 0x2 ) ); - public const int DNS_FILTERON = unchecked( (int)( 0x4 ) ); - public const int DNS_FILTEROFF = unchecked( (int)( 0x8 ) ); + public const int DNS_REGISTER = unchecked((int)(0x1)); + public const int DNS_UNREGISTER = unchecked((int)(0x2)); + public const int DNS_FILTERON = unchecked((int)(0x4)); + public const int DNS_FILTEROFF = unchecked((int)(0x8)); // app client interface functions - [DllImport( "user32", EntryPoint = "DdeClientTransaction", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeClientTransaction( byte pData, int cbData, IntPtr hConv, IntPtr hszItem, int wFmt, int wType, int dwTimeout, int pdwResult ); + [DllImport("user32", EntryPoint = "DdeClientTransaction", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeClientTransaction(byte pData, int cbData, IntPtr hConv, IntPtr hszItem, int wFmt, int wType, int dwTimeout, int pdwResult); // data transfer functions - [DllImport( "user32", EntryPoint = "DdeCreateDataHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeCreateDataHandle( int idInst, byte pSrc, int cb, int cbOff, IntPtr hszItem, int wFmt, int afCmd ); + [DllImport("user32", EntryPoint = "DdeCreateDataHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeCreateDataHandle(int idInst, byte pSrc, int cb, int cbOff, IntPtr hszItem, int wFmt, int afCmd); - [DllImport( "user32", EntryPoint = "DdeAddData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeAddData( IntPtr hData, byte pSrc, int cb, int cbOff ); + [DllImport("user32", EntryPoint = "DdeAddData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeAddData(IntPtr hData, byte pSrc, int cb, int cbOff); - [DllImport( "user32", EntryPoint = "DdeGetData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeGetData( IntPtr hData, byte pDst, int cbMax, int cbOff ); + [DllImport("user32", EntryPoint = "DdeGetData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeGetData(IntPtr hData, byte pDst, int cbMax, int cbOff); - [DllImport( "user32", EntryPoint = "DdeAccessData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeAccessData( IntPtr hData, int pcbDataSize ); + [DllImport("user32", EntryPoint = "DdeAccessData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeAccessData(IntPtr hData, int pcbDataSize); - [DllImport( "user32", EntryPoint = "DdeUnaccessData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeUnaccessData( IntPtr hData ); + [DllImport("user32", EntryPoint = "DdeUnaccessData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeUnaccessData(IntPtr hData); - [DllImport( "user32", EntryPoint = "DdeFreeDataHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeFreeDataHandle( IntPtr hData ); + [DllImport("user32", EntryPoint = "DdeFreeDataHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeFreeDataHandle(IntPtr hData); - public const int HDATA_APPOWNED = unchecked( (int)( 0x1 ) ); + public const int HDATA_APPOWNED = unchecked((int)(0x1)); - [DllImport( "user32", EntryPoint = "DdeGetLastError", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeGetLastError( int idInst ); + [DllImport("user32", EntryPoint = "DdeGetLastError", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeGetLastError(int idInst); - public const int DMLERR_NO_ERROR = unchecked( (int)( 0 ) );// must be 0 + public const int DMLERR_NO_ERROR = unchecked((int)(0));// must be 0 - public const int DMLERR_FIRST = unchecked( (int)( 0x4000 ) ); + public const int DMLERR_FIRST = unchecked((int)(0x4000)); - public const int DMLERR_ADVACKTIMEOUT = unchecked( (int)( 0x4000 ) ); - public const int DMLERR_BUSY = unchecked( (int)( 0x4001 ) ); - public const int DMLERR_DATAACKTIMEOUT = unchecked( (int)( 0x4002 ) ); - public const int DMLERR_DLL_NOT_INITIALIZED = unchecked( (int)( 0x4003 ) ); - public const int DMLERR_DLL_USAGE = unchecked( (int)( 0x4004 ) ); - public const int DMLERR_EXECACKTIMEOUT = unchecked( (int)( 0x4005 ) ); - public const int DMLERR_INVALIDPARAMETER = unchecked( (int)( 0x4006 ) ); - public const int DMLERR_LOW_MEMORY = unchecked( (int)( 0x4007 ) ); - public const int DMLERR_MEMORY_ERROR = unchecked( (int)( 0x4008 ) ); - public const int DMLERR_NOTPROCESSED = unchecked( (int)( 0x4009 ) ); - public const int DMLERR_NO_CONV_ESTABLISHED = unchecked( (int)( 0x400A ) ); - public const int DMLERR_POKEACKTIMEOUT = unchecked( (int)( 0x400B ) ); - public const int DMLERR_POSTMSG_FAILED = unchecked( (int)( 0x400C ) ); - public const int DMLERR_REENTRANCY = unchecked( (int)( 0x400D ) ); - public const int DMLERR_SERVER_DIED = unchecked( (int)( 0x400E ) ); - public const int DMLERR_SYS_ERROR = unchecked( (int)( 0x400F ) ); - public const int DMLERR_UNADVACKTIMEOUT = unchecked( (int)( 0x4010 ) ); - public const int DMLERR_UNFOUND_QUEUE_ID = unchecked( (int)( 0x4011 ) ); + public const int DMLERR_ADVACKTIMEOUT = unchecked((int)(0x4000)); + public const int DMLERR_BUSY = unchecked((int)(0x4001)); + public const int DMLERR_DATAACKTIMEOUT = unchecked((int)(0x4002)); + public const int DMLERR_DLL_NOT_INITIALIZED = unchecked((int)(0x4003)); + public const int DMLERR_DLL_USAGE = unchecked((int)(0x4004)); + public const int DMLERR_EXECACKTIMEOUT = unchecked((int)(0x4005)); + public const int DMLERR_INVALIDPARAMETER = unchecked((int)(0x4006)); + public const int DMLERR_LOW_MEMORY = unchecked((int)(0x4007)); + public const int DMLERR_MEMORY_ERROR = unchecked((int)(0x4008)); + public const int DMLERR_NOTPROCESSED = unchecked((int)(0x4009)); + public const int DMLERR_NO_CONV_ESTABLISHED = unchecked((int)(0x400A)); + public const int DMLERR_POKEACKTIMEOUT = unchecked((int)(0x400B)); + public const int DMLERR_POSTMSG_FAILED = unchecked((int)(0x400C)); + public const int DMLERR_REENTRANCY = unchecked((int)(0x400D)); + public const int DMLERR_SERVER_DIED = unchecked((int)(0x400E)); + public const int DMLERR_SYS_ERROR = unchecked((int)(0x400F)); + public const int DMLERR_UNADVACKTIMEOUT = unchecked((int)(0x4010)); + public const int DMLERR_UNFOUND_QUEUE_ID = unchecked((int)(0x4011)); - public const int DMLERR_LAST = unchecked( (int)( 0x4011 ) ); + public const int DMLERR_LAST = unchecked((int)(0x4011)); - [DllImport( "user32", EntryPoint = "DdeCreateStringHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeCreateStringHandle( int idInst, string psz, int iCodePage ); + [DllImport("user32", EntryPoint = "DdeCreateStringHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeCreateStringHandle(int idInst, string psz, int iCodePage); - [DllImport( "user32", EntryPoint = "DdeQueryString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeQueryString( int idInst, IntPtr hsz, string psz, int cchMax, int iCodePage ); + [DllImport("user32", EntryPoint = "DdeQueryString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeQueryString(int idInst, IntPtr hsz, string psz, int cchMax, int iCodePage); - [DllImport( "user32", EntryPoint = "DdeFreeStringHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeFreeStringHandle( int idInst, IntPtr hsz ); + [DllImport("user32", EntryPoint = "DdeFreeStringHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeFreeStringHandle(int idInst, IntPtr hsz); - [DllImport( "user32", EntryPoint = "DdeKeepStringHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeKeepStringHandle( int idInst, IntPtr hsz ); + [DllImport("user32", EntryPoint = "DdeKeepStringHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeKeepStringHandle(int idInst, IntPtr hsz); - [DllImport( "user32", EntryPoint = "DdeCmpStringHandles", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeCmpStringHandles( IntPtr hsz1, IntPtr hsz2 ); + [DllImport("user32", EntryPoint = "DdeCmpStringHandles", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeCmpStringHandles(IntPtr hsz1, IntPtr hsz2); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DDEML_MSG_HOOK_DATA {// new for NT public int uiLo;// unpacked lo and hi parts of lParam @@ -10947,7 +10947,7 @@ public struct DDEML_MSG_HOOK_DATA public int Data;// data peeking by DDESPY is limited to 32 bytes. } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MONMSGSTRUCT { public int cb; @@ -10960,7 +10960,7 @@ public struct MONMSGSTRUCT public DDEML_MSG_HOOK_DATA dmhd;// new for NT } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MONCBSTRUCT { public int cb; @@ -10980,7 +10980,7 @@ public struct MONCBSTRUCT public int Data;// new for NT for data peeking } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MONHSZSTRUCT { public int cb; @@ -10991,12 +10991,12 @@ public struct MONHSZSTRUCT public byte str; } - public const int MH_CREATE = unchecked( (int)( 1 ) ); - public const int MH_KEEP = unchecked( (int)( 2 ) ); - public const int MH_DELETE = unchecked( (int)( 3 ) ); - public const int MH_CLEANUP = unchecked( (int)( 4 ) ); + public const int MH_CREATE = unchecked((int)(1)); + public const int MH_KEEP = unchecked((int)(2)); + public const int MH_DELETE = unchecked((int)(3)); + public const int MH_CLEANUP = unchecked((int)(4)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MONERRSTRUCT { public int cb; @@ -11005,7 +11005,7 @@ public struct MONERRSTRUCT public IntPtr htask; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MONLINKSTRUCT { public int cb; @@ -11022,7 +11022,7 @@ public struct MONLINKSTRUCT public IntPtr hConvClient; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MONCONVSTRUCT { public int cb; @@ -11035,20 +11035,20 @@ public struct MONCONVSTRUCT public IntPtr hConvServer;// Globally unique value != apps local hConv } - public const int MAX_MONITORS = unchecked( (int)( 4 ) ); - public const int APPCLASS_MONITOR = unchecked( (int)( 0x1 ) ); - public const int XTYP_MONITOR = unchecked( (int)( ( 0xF0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK ) ) ); + public const int MAX_MONITORS = unchecked((int)(4)); + public const int APPCLASS_MONITOR = unchecked((int)(0x1)); + public const int XTYP_MONITOR = unchecked((int)((0xF0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK))); // Callback filter flags for use with MONITOR apps - 0 implies no monitor callbacks - public const int MF_HSZ_INFO = unchecked( (int)( 0x1000000 ) ); - public const int MF_SENDMSGS = unchecked( (int)( 0x2000000 ) ); - public const int MF_POSTMSGS = unchecked( (int)( 0x4000000 ) ); - public const int MF_CALLBACKS = unchecked( (int)( 0x8000000 ) ); - public const int MF_ERRORS = unchecked( (int)( 0x10000000 ) ); - public const int MF_LINKS = unchecked( (int)( 0x20000000 ) ); - public const int MF_CONV = unchecked( (int)( 0x40000000 ) ); + public const int MF_HSZ_INFO = unchecked((int)(0x1000000)); + public const int MF_SENDMSGS = unchecked((int)(0x2000000)); + public const int MF_POSTMSGS = unchecked((int)(0x4000000)); + public const int MF_CALLBACKS = unchecked((int)(0x8000000)); + public const int MF_ERRORS = unchecked((int)(0x10000000)); + public const int MF_LINKS = unchecked((int)(0x20000000)); + public const int MF_CONV = unchecked((int)(0x40000000)); - public const int MF_MASK = unchecked( (int)( 0xFF000000 ) ); + public const int MF_MASK = unchecked((int)(0xFF000000)); // ----------------------------------------- // Win32 API error code definitions @@ -11056,1268 +11056,1268 @@ public struct MONCONVSTRUCT // This section contains the error code definitions for the Win32 API functions. // NO_ERROR - public const int NO_ERROR = unchecked( (int)( 0 ) );// dderror + public const int NO_ERROR = unchecked((int)(0));// dderror // The configuration registry database operation completed successfully. - public const int ERROR_SUCCESS = unchecked( (int)( 0 ) ); + public const int ERROR_SUCCESS = unchecked((int)(0)); // Incorrect function. - public const int ERROR_INVALID_FUNCTION = unchecked( (int)( 1 ) );// dderror + public const int ERROR_INVALID_FUNCTION = unchecked((int)(1));// dderror // The system cannot find the file specified. - public const int ERROR_FILE_NOT_FOUND = unchecked( (int)( 2 ) ); + public const int ERROR_FILE_NOT_FOUND = unchecked((int)(2)); // The system cannot find the path specified. - public const int ERROR_PATH_NOT_FOUND = unchecked( (int)( 3 ) ); + public const int ERROR_PATH_NOT_FOUND = unchecked((int)(3)); // The system cannot open the file. - public const int ERROR_TOO_MANY_OPEN_FILES = unchecked( (int)( 4 ) ); + public const int ERROR_TOO_MANY_OPEN_FILES = unchecked((int)(4)); // Access is denied. - public const int ERROR_ACCESS_DENIED = unchecked( (int)( 5 ) ); + public const int ERROR_ACCESS_DENIED = unchecked((int)(5)); // The handle is invalid. - public const int ERROR_INVALID_HANDLE = unchecked( (int)( 6 ) ); + public const int ERROR_INVALID_HANDLE = unchecked((int)(6)); // The storage control blocks were destroyed. - public const int ERROR_ARENA_TRASHED = unchecked( (int)( 7 ) ); + public const int ERROR_ARENA_TRASHED = unchecked((int)(7)); // Not enough storage is available to process this command. - public const int ERROR_NOT_ENOUGH_MEMORY = unchecked( (int)( 8 ) );// dderror + public const int ERROR_NOT_ENOUGH_MEMORY = unchecked((int)(8));// dderror // The storage control block address is invalid. - public const int ERROR_INVALID_BLOCK = unchecked( (int)( 9 ) ); + public const int ERROR_INVALID_BLOCK = unchecked((int)(9)); // The environment is incorrect. - public const int ERROR_BAD_ENVIRONMENT = unchecked( (int)( 10 ) ); + public const int ERROR_BAD_ENVIRONMENT = unchecked((int)(10)); // An attempt was made to load a program with an // incorrect format. - public const int ERROR_BAD_FORMAT = unchecked( (int)( 11 ) ); + public const int ERROR_BAD_FORMAT = unchecked((int)(11)); // The access code is invalid. - public const int ERROR_INVALID_ACCESS = unchecked( (int)( 12 ) ); + public const int ERROR_INVALID_ACCESS = unchecked((int)(12)); // The data is invalid. - public const int ERROR_INVALID_DATA = unchecked( (int)( 13 ) ); + public const int ERROR_INVALID_DATA = unchecked((int)(13)); // Not enough storage is available to complete this operation. - public const int ERROR_OUTOFMEMORY = unchecked( (int)( 14 ) ); + public const int ERROR_OUTOFMEMORY = unchecked((int)(14)); // The system cannot find the drive specified. - public const int ERROR_INVALID_DRIVE = unchecked( (int)( 15 ) ); + public const int ERROR_INVALID_DRIVE = unchecked((int)(15)); // The directory cannot be removed. - public const int ERROR_CURRENT_DIRECTORY = unchecked( (int)( 16 ) ); + public const int ERROR_CURRENT_DIRECTORY = unchecked((int)(16)); // The system cannot move the file // to a different disk drive. - public const int ERROR_NOT_SAME_DEVICE = unchecked( (int)( 17 ) ); + public const int ERROR_NOT_SAME_DEVICE = unchecked((int)(17)); // There are no more files. - public const int ERROR_NO_MORE_FILES = unchecked( (int)( 18 ) ); + public const int ERROR_NO_MORE_FILES = unchecked((int)(18)); // The media is write protected. - public const int ERROR_WRITE_PROTECT = unchecked( (int)( 19 ) ); + public const int ERROR_WRITE_PROTECT = unchecked((int)(19)); // The system cannot find the device specified. - public const int ERROR_BAD_UNIT = unchecked( (int)( 20 ) ); + public const int ERROR_BAD_UNIT = unchecked((int)(20)); // The device is not ready. - public const int ERROR_NOT_READY = unchecked( (int)( 21 ) ); + public const int ERROR_NOT_READY = unchecked((int)(21)); // The device does not recognize the command. - public const int ERROR_BAD_COMMAND = unchecked( (int)( 22 ) ); + public const int ERROR_BAD_COMMAND = unchecked((int)(22)); // Data error (cyclic redundancy check) - public const int ERROR_CRC = unchecked( (int)( 23 ) ); + public const int ERROR_CRC = unchecked((int)(23)); // The program issued a command but the // command length is incorrect. - public const int ERROR_BAD_LENGTH = unchecked( (int)( 24 ) ); + public const int ERROR_BAD_LENGTH = unchecked((int)(24)); // The drive cannot locate a specific // area or track on the disk. - public const int ERROR_SEEK = unchecked( (int)( 25 ) ); + public const int ERROR_SEEK = unchecked((int)(25)); // The specified disk or diskette cannot be accessed. - public const int ERROR_NOT_DOS_DISK = unchecked( (int)( 26 ) ); + public const int ERROR_NOT_DOS_DISK = unchecked((int)(26)); // The drive cannot find the sector requested. - public const int ERROR_SECTOR_NOT_FOUND = unchecked( (int)( 27 ) ); + public const int ERROR_SECTOR_NOT_FOUND = unchecked((int)(27)); // The printer is out of paper. - public const int ERROR_OUT_OF_PAPER = unchecked( (int)( 28 ) ); + public const int ERROR_OUT_OF_PAPER = unchecked((int)(28)); // The system cannot write to the specified device. - public const int ERROR_WRITE_FAULT = unchecked( (int)( 29 ) ); + public const int ERROR_WRITE_FAULT = unchecked((int)(29)); // The system cannot read from the specified device. - public const int ERROR_READ_FAULT = unchecked( (int)( 30 ) ); + public const int ERROR_READ_FAULT = unchecked((int)(30)); // A device attached to the system is not functioning. - public const int ERROR_GEN_FAILURE = unchecked( (int)( 31 ) ); + public const int ERROR_GEN_FAILURE = unchecked((int)(31)); // The process cannot access the file because // it is being used by another process. - public const int ERROR_SHARING_VIOLATION = unchecked( (int)( 32 ) ); + public const int ERROR_SHARING_VIOLATION = unchecked((int)(32)); // The process cannot access the file because // another process has locked a portion of the file. - public const int ERROR_LOCK_VIOLATION = unchecked( (int)( 33 ) ); + public const int ERROR_LOCK_VIOLATION = unchecked((int)(33)); // The wrong diskette is in the drive. // Insert %2 (Volume Serial Number: %3) // into drive %1. - public const int ERROR_WRONG_DISK = unchecked( (int)( 34 ) ); + public const int ERROR_WRONG_DISK = unchecked((int)(34)); // Too many files opened for sharing. - public const int ERROR_SHARING_BUFFER_EXCEEDED = unchecked( (int)( 36 ) ); + public const int ERROR_SHARING_BUFFER_EXCEEDED = unchecked((int)(36)); // Reached end of file. - public const int ERROR_HANDLE_EOF = unchecked( (int)( 38 ) ); + public const int ERROR_HANDLE_EOF = unchecked((int)(38)); // The disk is full. - public const int ERROR_HANDLE_DISK_FULL = unchecked( (int)( 39 ) ); + public const int ERROR_HANDLE_DISK_FULL = unchecked((int)(39)); // The network request is not supported. - public const int ERROR_NOT_SUPPORTED = unchecked( (int)( 50 ) ); + public const int ERROR_NOT_SUPPORTED = unchecked((int)(50)); // The remote computer is not available. - public const int ERROR_REM_NOT_LIST = unchecked( (int)( 51 ) ); + public const int ERROR_REM_NOT_LIST = unchecked((int)(51)); // A duplicate name exists on the network. - public const int ERROR_DUP_NAME = unchecked( (int)( 52 ) ); + public const int ERROR_DUP_NAME = unchecked((int)(52)); // The network path was not found. - public const int ERROR_BAD_NETPATH = unchecked( (int)( 53 ) ); + public const int ERROR_BAD_NETPATH = unchecked((int)(53)); // The network is busy. - public const int ERROR_NETWORK_BUSY = unchecked( (int)( 54 ) ); + public const int ERROR_NETWORK_BUSY = unchecked((int)(54)); // The specified network resource or device is no longer // available. - public const int ERROR_DEV_NOT_EXIST = unchecked( (int)( 55 ) );// dderror + public const int ERROR_DEV_NOT_EXIST = unchecked((int)(55));// dderror // The network BIOS command limit has been reached. - public const int ERROR_TOO_MANY_CMDS = unchecked( (int)( 56 ) ); + public const int ERROR_TOO_MANY_CMDS = unchecked((int)(56)); // A network adapter hardware error occurred. - public const int ERROR_ADAP_HDW_ERR = unchecked( (int)( 57 ) ); + public const int ERROR_ADAP_HDW_ERR = unchecked((int)(57)); // The specified server cannot perform the requested // operation. - public const int ERROR_BAD_NET_RESP = unchecked( (int)( 58 ) ); + public const int ERROR_BAD_NET_RESP = unchecked((int)(58)); // An unexpected network error occurred. - public const int ERROR_UNEXP_NET_ERR = unchecked( (int)( 59 ) ); + public const int ERROR_UNEXP_NET_ERR = unchecked((int)(59)); // The remote adapter is not compatible. - public const int ERROR_BAD_REM_ADAP = unchecked( (int)( 60 ) ); + public const int ERROR_BAD_REM_ADAP = unchecked((int)(60)); // The printer queue is full. - public const int ERROR_PRINTQ_FULL = unchecked( (int)( 61 ) ); + public const int ERROR_PRINTQ_FULL = unchecked((int)(61)); // Space to store the file waiting to be printed is // not available on the server. - public const int ERROR_NO_SPOOL_SPACE = unchecked( (int)( 62 ) ); + public const int ERROR_NO_SPOOL_SPACE = unchecked((int)(62)); // Your file waiting to be printed was deleted. - public const int ERROR_PRINT_CANCELLED = unchecked( (int)( 63 ) ); + public const int ERROR_PRINT_CANCELLED = unchecked((int)(63)); // The specified network name is no longer available. - public const int ERROR_NETNAME_DELETED = unchecked( (int)( 64 ) ); + public const int ERROR_NETNAME_DELETED = unchecked((int)(64)); // Network access is denied. - public const int ERROR_NETWORK_ACCESS_DENIED = unchecked( (int)( 65 ) ); + public const int ERROR_NETWORK_ACCESS_DENIED = unchecked((int)(65)); // The network resource type is not correct. - public const int ERROR_BAD_DEV_TYPE = unchecked( (int)( 66 ) ); + public const int ERROR_BAD_DEV_TYPE = unchecked((int)(66)); // The network name cannot be found. - public const int ERROR_BAD_NET_NAME = unchecked( (int)( 67 ) ); + public const int ERROR_BAD_NET_NAME = unchecked((int)(67)); // The name limit for the local computer network // adapter card was exceeded. - public const int ERROR_TOO_MANY_NAMES = unchecked( (int)( 68 ) ); + public const int ERROR_TOO_MANY_NAMES = unchecked((int)(68)); // The network BIOS session limit was exceeded. - public const int ERROR_TOO_MANY_SESS = unchecked( (int)( 69 ) ); + public const int ERROR_TOO_MANY_SESS = unchecked((int)(69)); // The remote server has been paused or is in the // process of being started. - public const int ERROR_SHARING_PAUSED = unchecked( (int)( 70 ) ); + public const int ERROR_SHARING_PAUSED = unchecked((int)(70)); // The network request was not accepted. - public const int ERROR_REQ_NOT_ACCEP = unchecked( (int)( 71 ) ); + public const int ERROR_REQ_NOT_ACCEP = unchecked((int)(71)); // The specified printer or disk device has been paused. - public const int ERROR_REDIR_PAUSED = unchecked( (int)( 72 ) ); + public const int ERROR_REDIR_PAUSED = unchecked((int)(72)); // The file exists. - public const int ERROR_FILE_EXISTS = unchecked( (int)( 80 ) ); + public const int ERROR_FILE_EXISTS = unchecked((int)(80)); // The directory or file cannot be created. - public const int ERROR_CANNOT_MAKE = unchecked( (int)( 82 ) ); + public const int ERROR_CANNOT_MAKE = unchecked((int)(82)); // Fail on INT 24 - public const int ERROR_FAIL_I24 = unchecked( (int)( 83 ) ); + public const int ERROR_FAIL_I24 = unchecked((int)(83)); // Storage to process this request is not available. - public const int ERROR_OUT_OF_STRUCTURES = unchecked( (int)( 84 ) ); + public const int ERROR_OUT_OF_STRUCTURES = unchecked((int)(84)); // The local device name is already in use. - public const int ERROR_ALREADY_ASSIGNED = unchecked( (int)( 85 ) ); + public const int ERROR_ALREADY_ASSIGNED = unchecked((int)(85)); // The specified network password is not correct. - public const int ERROR_INVALID_PASSWORD = unchecked( (int)( 86 ) ); + public const int ERROR_INVALID_PASSWORD = unchecked((int)(86)); // The parameter is incorrect. - public const int ERROR_INVALID_PARAMETER = unchecked( (int)( 87 ) );// dderror + public const int ERROR_INVALID_PARAMETER = unchecked((int)(87));// dderror // A write fault occurred on the network. - public const int ERROR_NET_WRITE_FAULT = unchecked( (int)( 88 ) ); + public const int ERROR_NET_WRITE_FAULT = unchecked((int)(88)); // The system cannot start another process at // this time. - public const int ERROR_NO_PROC_SLOTS = unchecked( (int)( 89 ) ); + public const int ERROR_NO_PROC_SLOTS = unchecked((int)(89)); // Cannot create another system semaphore. - public const int ERROR_TOO_MANY_SEMAPHORES = unchecked( (int)( 100 ) ); + public const int ERROR_TOO_MANY_SEMAPHORES = unchecked((int)(100)); // The exclusive semaphore is owned by another process. - public const int ERROR_EXCL_SEM_ALREADY_OWNED = unchecked( (int)( 101 ) ); + public const int ERROR_EXCL_SEM_ALREADY_OWNED = unchecked((int)(101)); // The semaphore is set and cannot be closed. - public const int ERROR_SEM_IS_SET = unchecked( (int)( 102 ) ); + public const int ERROR_SEM_IS_SET = unchecked((int)(102)); // The semaphore cannot be set again. - public const int ERROR_TOO_MANY_SEM_REQUESTS = unchecked( (int)( 103 ) ); + public const int ERROR_TOO_MANY_SEM_REQUESTS = unchecked((int)(103)); // Cannot request exclusive semaphores at interrupt time. - public const int ERROR_INVALID_AT_INTERRUPT_TIME = unchecked( (int)( 104 ) ); + public const int ERROR_INVALID_AT_INTERRUPT_TIME = unchecked((int)(104)); // The previous ownership of this semaphore has ended. - public const int ERROR_SEM_OWNER_DIED = unchecked( (int)( 105 ) ); + public const int ERROR_SEM_OWNER_DIED = unchecked((int)(105)); // Insert the diskette for drive %1. - public const int ERROR_SEM_USER_LIMIT = unchecked( (int)( 106 ) ); + public const int ERROR_SEM_USER_LIMIT = unchecked((int)(106)); // Program stopped because alternate diskette was not inserted. - public const int ERROR_DISK_CHANGE = unchecked( (int)( 107 ) ); + public const int ERROR_DISK_CHANGE = unchecked((int)(107)); // The disk is in use or locked by // another process. - public const int ERROR_DRIVE_LOCKED = unchecked( (int)( 108 ) ); + public const int ERROR_DRIVE_LOCKED = unchecked((int)(108)); // The pipe has been ended. - public const int ERROR_BROKEN_PIPE = unchecked( (int)( 109 ) ); + public const int ERROR_BROKEN_PIPE = unchecked((int)(109)); // The system cannot open the // device or file specified. - public const int ERROR_OPEN_FAILED = unchecked( (int)( 110 ) ); + public const int ERROR_OPEN_FAILED = unchecked((int)(110)); // The file name is too long. - public const int ERROR_BUFFER_OVERFLOW = unchecked( (int)( 111 ) ); + public const int ERROR_BUFFER_OVERFLOW = unchecked((int)(111)); // There is not enough space on the disk. - public const int ERROR_DISK_FULL = unchecked( (int)( 112 ) ); + public const int ERROR_DISK_FULL = unchecked((int)(112)); // No more internal file identifiers available. - public const int ERROR_NO_MORE_SEARCH_HANDLES = unchecked( (int)( 113 ) ); + public const int ERROR_NO_MORE_SEARCH_HANDLES = unchecked((int)(113)); // The target internal file identifier is incorrect. - public const int ERROR_INVALID_TARGET_HANDLE = unchecked( (int)( 114 ) ); + public const int ERROR_INVALID_TARGET_HANDLE = unchecked((int)(114)); // The IOCTL call made by the application program is // not correct. - public const int ERROR_INVALID_CATEGORY = unchecked( (int)( 117 ) ); + public const int ERROR_INVALID_CATEGORY = unchecked((int)(117)); // The verify-on-write switch parameter value is not // correct. - public const int ERROR_INVALID_VERIFY_SWITCH = unchecked( (int)( 118 ) ); + public const int ERROR_INVALID_VERIFY_SWITCH = unchecked((int)(118)); // The system does not support the command requested. - public const int ERROR_BAD_DRIVER_LEVEL = unchecked( (int)( 119 ) ); + public const int ERROR_BAD_DRIVER_LEVEL = unchecked((int)(119)); // This function is only valid in Windows NT mode. - public const int ERROR_CALL_NOT_IMPLEMENTED = unchecked( (int)( 120 ) ); + public const int ERROR_CALL_NOT_IMPLEMENTED = unchecked((int)(120)); // The semaphore timeout period has expired. - public const int ERROR_SEM_TIMEOUT = unchecked( (int)( 121 ) ); + public const int ERROR_SEM_TIMEOUT = unchecked((int)(121)); // The data area passed to a system call is too // small. - public const int ERROR_INSUFFICIENT_BUFFER = unchecked( (int)( 122 ) );// dderror + public const int ERROR_INSUFFICIENT_BUFFER = unchecked((int)(122));// dderror // The filename, directory name, or volume label syntax is incorrect. - public const int ERROR_INVALID_NAME = unchecked( (int)( 123 ) ); + public const int ERROR_INVALID_NAME = unchecked((int)(123)); // The system call level is not correct. - public const int ERROR_INVALID_LEVEL = unchecked( (int)( 124 ) ); + public const int ERROR_INVALID_LEVEL = unchecked((int)(124)); // The disk has no volume label. - public const int ERROR_NO_VOLUME_LABEL = unchecked( (int)( 125 ) ); + public const int ERROR_NO_VOLUME_LABEL = unchecked((int)(125)); // The specified module could not be found. - public const int ERROR_MOD_NOT_FOUND = unchecked( (int)( 126 ) ); + public const int ERROR_MOD_NOT_FOUND = unchecked((int)(126)); // The specified procedure could not be found. - public const int ERROR_PROC_NOT_FOUND = unchecked( (int)( 127 ) ); + public const int ERROR_PROC_NOT_FOUND = unchecked((int)(127)); // There are no child processes to wait for. - public const int ERROR_WAIT_NO_CHILDREN = unchecked( (int)( 128 ) ); + public const int ERROR_WAIT_NO_CHILDREN = unchecked((int)(128)); // The %1 application cannot be run in Windows NT mode. - public const int ERROR_CHILD_NOT_COMPLETE = unchecked( (int)( 129 ) ); + public const int ERROR_CHILD_NOT_COMPLETE = unchecked((int)(129)); // Attempt to use a file handle to an open disk partition for an // operation other than raw disk I/O. - public const int ERROR_DIRECT_ACCESS_HANDLE = unchecked( (int)( 130 ) ); + public const int ERROR_DIRECT_ACCESS_HANDLE = unchecked((int)(130)); // An attempt was made to move the file pointer before the beginning of the file. - public const int ERROR_NEGATIVE_SEEK = unchecked( (int)( 131 ) ); + public const int ERROR_NEGATIVE_SEEK = unchecked((int)(131)); // The file pointer cannot be set on the specified device or file. - public const int ERROR_SEEK_ON_DEVICE = unchecked( (int)( 132 ) ); + public const int ERROR_SEEK_ON_DEVICE = unchecked((int)(132)); // A JOIN or SUBST command // cannot be used for a drive that // contains previously joined drives. - public const int ERROR_IS_JOIN_TARGET = unchecked( (int)( 133 ) ); + public const int ERROR_IS_JOIN_TARGET = unchecked((int)(133)); // An attempt was made to use a // JOIN or SUBST command on a drive that has // already been joined. - public const int ERROR_IS_JOINED = unchecked( (int)( 134 ) ); + public const int ERROR_IS_JOINED = unchecked((int)(134)); // An attempt was made to use a // JOIN or SUBST command on a drive that has // already been substituted. - public const int ERROR_IS_SUBSTED = unchecked( (int)( 135 ) ); + public const int ERROR_IS_SUBSTED = unchecked((int)(135)); // The system tried to delete // the JOIN of a drive that is not joined. - public const int ERROR_NOT_JOINED = unchecked( (int)( 136 ) ); + public const int ERROR_NOT_JOINED = unchecked((int)(136)); // The system tried to delete the // substitution of a drive that is not substituted. - public const int ERROR_NOT_SUBSTED = unchecked( (int)( 137 ) ); + public const int ERROR_NOT_SUBSTED = unchecked((int)(137)); // The system tried to join a drive // to a directory on a joined drive. - public const int ERROR_JOIN_TO_JOIN = unchecked( (int)( 138 ) ); + public const int ERROR_JOIN_TO_JOIN = unchecked((int)(138)); // The system tried to substitute a // drive to a directory on a substituted drive. - public const int ERROR_SUBST_TO_SUBST = unchecked( (int)( 139 ) ); + public const int ERROR_SUBST_TO_SUBST = unchecked((int)(139)); // The system tried to join a drive to // a directory on a substituted drive. - public const int ERROR_JOIN_TO_SUBST = unchecked( (int)( 140 ) ); + public const int ERROR_JOIN_TO_SUBST = unchecked((int)(140)); // The system tried to SUBST a drive // to a directory on a joined drive. - public const int ERROR_SUBST_TO_JOIN = unchecked( (int)( 141 ) ); + public const int ERROR_SUBST_TO_JOIN = unchecked((int)(141)); // The system cannot perform a JOIN or SUBST at this time. - public const int ERROR_BUSY_DRIVE = unchecked( (int)( 142 ) ); + public const int ERROR_BUSY_DRIVE = unchecked((int)(142)); // The system cannot join or substitute a // drive to or for a directory on the same drive. - public const int ERROR_SAME_DRIVE = unchecked( (int)( 143 ) ); + public const int ERROR_SAME_DRIVE = unchecked((int)(143)); // The directory is not a subdirectory of the root directory. - public const int ERROR_DIR_NOT_ROOT = unchecked( (int)( 144 ) ); + public const int ERROR_DIR_NOT_ROOT = unchecked((int)(144)); // The directory is not empty. - public const int ERROR_DIR_NOT_EMPTY = unchecked( (int)( 145 ) ); + public const int ERROR_DIR_NOT_EMPTY = unchecked((int)(145)); // The path specified is being used in // a substitute. - public const int ERROR_IS_SUBST_PATH = unchecked( (int)( 146 ) ); + public const int ERROR_IS_SUBST_PATH = unchecked((int)(146)); // Not enough resources are available to // process this command. - public const int ERROR_IS_JOIN_PATH = unchecked( (int)( 147 ) ); + public const int ERROR_IS_JOIN_PATH = unchecked((int)(147)); // The path specified cannot be used at this time. - public const int ERROR_PATH_BUSY = unchecked( (int)( 148 ) ); + public const int ERROR_PATH_BUSY = unchecked((int)(148)); // An attempt was made to join // or substitute a drive for which a directory // on the drive is the target of a previous // substitute. - public const int ERROR_IS_SUBST_TARGET = unchecked( (int)( 149 ) ); + public const int ERROR_IS_SUBST_TARGET = unchecked((int)(149)); // System trace information was not specified in your // CONFIG.SYS file, or tracing is disallowed. - public const int ERROR_SYSTEM_TRACE = unchecked( (int)( 150 ) ); + public const int ERROR_SYSTEM_TRACE = unchecked((int)(150)); // The number of specified semaphore events for // DosMuxSemWait is not correct. - public const int ERROR_INVALID_EVENT_COUNT = unchecked( (int)( 151 ) ); + public const int ERROR_INVALID_EVENT_COUNT = unchecked((int)(151)); // DosMuxSemWait did not execute; too many semaphores // are already set. - public const int ERROR_TOO_MANY_MUXWAITERS = unchecked( (int)( 152 ) ); + public const int ERROR_TOO_MANY_MUXWAITERS = unchecked((int)(152)); // The DosMuxSemWait list is not correct. - public const int ERROR_INVALID_LIST_FORMAT = unchecked( (int)( 153 ) ); + public const int ERROR_INVALID_LIST_FORMAT = unchecked((int)(153)); // The volume label you entered exceeds the // 11 character limit. The first 11 characters were written // to disk. Any characters that exceeded the 11 character limit // were automatically deleted. - public const int ERROR_LABEL_TOO_LONG = unchecked( (int)( 154 ) ); + public const int ERROR_LABEL_TOO_LONG = unchecked((int)(154)); // Cannot create another thread. - public const int ERROR_TOO_MANY_TCBS = unchecked( (int)( 155 ) ); + public const int ERROR_TOO_MANY_TCBS = unchecked((int)(155)); // The recipient process has refused the signal. - public const int ERROR_SIGNAL_REFUSED = unchecked( (int)( 156 ) ); + public const int ERROR_SIGNAL_REFUSED = unchecked((int)(156)); // The segment is already discarded and cannot be locked. - public const int ERROR_DISCARDED = unchecked( (int)( 157 ) ); + public const int ERROR_DISCARDED = unchecked((int)(157)); // The segment is already unlocked. - public const int ERROR_NOT_LOCKED = unchecked( (int)( 158 ) ); + public const int ERROR_NOT_LOCKED = unchecked((int)(158)); // The address for the thread ID is not correct. - public const int ERROR_BAD_THREADID_ADDR = unchecked( (int)( 159 ) ); + public const int ERROR_BAD_THREADID_ADDR = unchecked((int)(159)); // The argument string passed to DosExecPgm is not correct. - public const int ERROR_BAD_ARGUMENTS = unchecked( (int)( 160 ) ); + public const int ERROR_BAD_ARGUMENTS = unchecked((int)(160)); // The specified path is invalid. - public const int ERROR_BAD_PATHNAME = unchecked( (int)( 161 ) ); + public const int ERROR_BAD_PATHNAME = unchecked((int)(161)); // A signal is already pending. - public const int ERROR_SIGNAL_PENDING = unchecked( (int)( 162 ) ); + public const int ERROR_SIGNAL_PENDING = unchecked((int)(162)); // No more threads can be created in the system. - public const int ERROR_MAX_THRDS_REACHED = unchecked( (int)( 164 ) ); + public const int ERROR_MAX_THRDS_REACHED = unchecked((int)(164)); // Unable to lock a region of a file. - public const int ERROR_LOCK_FAILED = unchecked( (int)( 167 ) ); + public const int ERROR_LOCK_FAILED = unchecked((int)(167)); // The requested resource is in use. - public const int ERROR_BUSY = unchecked( (int)( 170 ) ); + public const int ERROR_BUSY = unchecked((int)(170)); // A lock request was not outstanding for the supplied cancel region. - public const int ERROR_CANCEL_VIOLATION = unchecked( (int)( 173 ) ); + public const int ERROR_CANCEL_VIOLATION = unchecked((int)(173)); // The file system does not support atomic changes to the lock type. - public const int ERROR_ATOMIC_LOCKS_NOT_SUPPORTED = unchecked( (int)( 174 ) ); + public const int ERROR_ATOMIC_LOCKS_NOT_SUPPORTED = unchecked((int)(174)); // The system detected a segment number that was not correct. - public const int ERROR_INVALID_SEGMENT_NUMBER = unchecked( (int)( 180 ) ); + public const int ERROR_INVALID_SEGMENT_NUMBER = unchecked((int)(180)); // The operating system cannot run %1. - public const int ERROR_INVALID_ORDINAL = unchecked( (int)( 182 ) ); + public const int ERROR_INVALID_ORDINAL = unchecked((int)(182)); // Cannot create a file when that file already exists. - public const int ERROR_ALREADY_EXISTS = unchecked( (int)( 183 ) ); + public const int ERROR_ALREADY_EXISTS = unchecked((int)(183)); // The flag passed is not correct. - public const int ERROR_INVALID_FLAG_NUMBER = unchecked( (int)( 186 ) ); + public const int ERROR_INVALID_FLAG_NUMBER = unchecked((int)(186)); // The specified system semaphore name was not found. - public const int ERROR_SEM_NOT_FOUND = unchecked( (int)( 187 ) ); + public const int ERROR_SEM_NOT_FOUND = unchecked((int)(187)); // The operating system cannot run %1. - public const int ERROR_INVALID_STARTING_CODESEG = unchecked( (int)( 188 ) ); + public const int ERROR_INVALID_STARTING_CODESEG = unchecked((int)(188)); // The operating system cannot run %1. - public const int ERROR_INVALID_STACKSEG = unchecked( (int)( 189 ) ); + public const int ERROR_INVALID_STACKSEG = unchecked((int)(189)); // The operating system cannot run %1. - public const int ERROR_INVALID_MODULETYPE = unchecked( (int)( 190 ) ); + public const int ERROR_INVALID_MODULETYPE = unchecked((int)(190)); // Cannot run %1 in Windows NT mode. - public const int ERROR_INVALID_EXE_SIGNATURE = unchecked( (int)( 191 ) ); + public const int ERROR_INVALID_EXE_SIGNATURE = unchecked((int)(191)); // The operating system cannot run %1. - public const int ERROR_EXE_MARKED_INVALID = unchecked( (int)( 192 ) ); + public const int ERROR_EXE_MARKED_INVALID = unchecked((int)(192)); // %1 is not a valid Windows NT application. - public const int ERROR_BAD_EXE_FORMAT = unchecked( (int)( 193 ) ); + public const int ERROR_BAD_EXE_FORMAT = unchecked((int)(193)); // The operating system cannot run %1. - public const int ERROR_ITERATED_DATA_EXCEEDS_64K = unchecked( (int)( 194 ) ); + public const int ERROR_ITERATED_DATA_EXCEEDS_64K = unchecked((int)(194)); // The operating system cannot run %1. - public const int ERROR_INVALID_MINALLOCSIZE = unchecked( (int)( 195 ) ); + public const int ERROR_INVALID_MINALLOCSIZE = unchecked((int)(195)); // The operating system cannot run this // application program. - public const int ERROR_DYNLINK_FROM_INVALID_RING = unchecked( (int)( 196 ) ); + public const int ERROR_DYNLINK_FROM_INVALID_RING = unchecked((int)(196)); // The operating system is not presently // configured to run this application. - public const int ERROR_IOPL_NOT_ENABLED = unchecked( (int)( 197 ) ); + public const int ERROR_IOPL_NOT_ENABLED = unchecked((int)(197)); // The operating system cannot run %1. - public const int ERROR_INVALID_SEGDPL = unchecked( (int)( 198 ) ); + public const int ERROR_INVALID_SEGDPL = unchecked((int)(198)); // The operating system cannot run this // application program. - public const int ERROR_AUTODATASEG_EXCEEDS_64K = unchecked( (int)( 199 ) ); + public const int ERROR_AUTODATASEG_EXCEEDS_64K = unchecked((int)(199)); // The code segment cannot be greater than or equal to 64KB. - public const int ERROR_RING2SEG_MUST_BE_MOVABLE = unchecked( (int)( 200 ) ); + public const int ERROR_RING2SEG_MUST_BE_MOVABLE = unchecked((int)(200)); // The operating system cannot run %1. - public const int ERROR_RELOC_CHAIN_XEEDS_SEGLIM = unchecked( (int)( 201 ) ); + public const int ERROR_RELOC_CHAIN_XEEDS_SEGLIM = unchecked((int)(201)); // The operating system cannot run %1. - public const int ERROR_INFLOOP_IN_RELOC_CHAIN = unchecked( (int)( 202 ) ); + public const int ERROR_INFLOOP_IN_RELOC_CHAIN = unchecked((int)(202)); // The system could not find the environment // option that was entered. - public const int ERROR_ENVVAR_NOT_FOUND = unchecked( (int)( 203 ) ); + public const int ERROR_ENVVAR_NOT_FOUND = unchecked((int)(203)); // No process in the command subtree has a // signal handler. - public const int ERROR_NO_SIGNAL_SENT = unchecked( (int)( 205 ) ); + public const int ERROR_NO_SIGNAL_SENT = unchecked((int)(205)); // The filename or extension is too long. - public const int ERROR_FILENAME_EXCED_RANGE = unchecked( (int)( 206 ) ); + public const int ERROR_FILENAME_EXCED_RANGE = unchecked((int)(206)); // The ring 2 stack is in use. - public const int ERROR_RING2_STACK_IN_USE = unchecked( (int)( 207 ) ); + public const int ERROR_RING2_STACK_IN_USE = unchecked((int)(207)); // The Global filename characters, or ?, are entered // incorrectly or too many Global filename characters are specified. - public const int ERROR_META_EXPANSION_TOO_LONG = unchecked( (int)( 208 ) ); + public const int ERROR_META_EXPANSION_TOO_LONG = unchecked((int)(208)); // The signal being posted is not correct. - public const int ERROR_INVALID_SIGNAL_NUMBER = unchecked( (int)( 209 ) ); + public const int ERROR_INVALID_SIGNAL_NUMBER = unchecked((int)(209)); // The signal handler cannot be set. - public const int ERROR_THREAD_1_INACTIVE = unchecked( (int)( 210 ) ); + public const int ERROR_THREAD_1_INACTIVE = unchecked((int)(210)); // The segment is locked and cannot be reallocated. - public const int ERROR_LOCKED = unchecked( (int)( 212 ) ); + public const int ERROR_LOCKED = unchecked((int)(212)); // Too many dynamic link modules are attached to this // program or dynamic link module. - public const int ERROR_TOO_MANY_MODULES = unchecked( (int)( 214 ) ); + public const int ERROR_TOO_MANY_MODULES = unchecked((int)(214)); // Can't nest calls to LoadModule. - public const int ERROR_NESTING_NOT_ALLOWED = unchecked( (int)( 215 ) ); + public const int ERROR_NESTING_NOT_ALLOWED = unchecked((int)(215)); // The pipe state is invalid. - public const int ERROR_BAD_PIPE = unchecked( (int)( 230 ) ); + public const int ERROR_BAD_PIPE = unchecked((int)(230)); // All pipe instances are busy. - public const int ERROR_PIPE_BUSY = unchecked( (int)( 231 ) ); + public const int ERROR_PIPE_BUSY = unchecked((int)(231)); // The pipe is being closed. - public const int ERROR_NO_DATA = unchecked( (int)( 232 ) ); + public const int ERROR_NO_DATA = unchecked((int)(232)); // No process is on the other end of the pipe. - public const int ERROR_PIPE_NOT_CONNECTED = unchecked( (int)( 233 ) ); + public const int ERROR_PIPE_NOT_CONNECTED = unchecked((int)(233)); // More data is available. - public const int ERROR_MORE_DATA = unchecked( (int)( 234 ) );// dderror + public const int ERROR_MORE_DATA = unchecked((int)(234));// dderror // The session was cancelled. - public const int ERROR_VC_DISCONNECTED = unchecked( (int)( 240 ) ); + public const int ERROR_VC_DISCONNECTED = unchecked((int)(240)); // The specified extended attribute name was invalid. - public const int ERROR_INVALID_EA_NAME = unchecked( (int)( 254 ) ); + public const int ERROR_INVALID_EA_NAME = unchecked((int)(254)); // The extended attributes are inconsistent. - public const int ERROR_EA_LIST_INCONSISTENT = unchecked( (int)( 255 ) ); + public const int ERROR_EA_LIST_INCONSISTENT = unchecked((int)(255)); // No more data is available. - public const int ERROR_NO_MORE_ITEMS = unchecked( (int)( 259 ) ); + public const int ERROR_NO_MORE_ITEMS = unchecked((int)(259)); // The Copy API cannot be used. - public const int ERROR_CANNOT_COPY = unchecked( (int)( 266 ) ); + public const int ERROR_CANNOT_COPY = unchecked((int)(266)); // The directory name is invalid. - public const int ERROR_DIRECTORY = unchecked( (int)( 267 ) ); + public const int ERROR_DIRECTORY = unchecked((int)(267)); // The extended attributes did not fit in the buffer. - public const int ERROR_EAS_DIDNT_FIT = unchecked( (int)( 275 ) ); + public const int ERROR_EAS_DIDNT_FIT = unchecked((int)(275)); // The extended attribute file on the mounted file system is corrupt. - public const int ERROR_EA_FILE_CORRUPT = unchecked( (int)( 276 ) ); + public const int ERROR_EA_FILE_CORRUPT = unchecked((int)(276)); // The extended attribute table file is full. - public const int ERROR_EA_TABLE_FULL = unchecked( (int)( 277 ) ); + public const int ERROR_EA_TABLE_FULL = unchecked((int)(277)); // The specified extended attribute handle is invalid. - public const int ERROR_INVALID_EA_HANDLE = unchecked( (int)( 278 ) ); + public const int ERROR_INVALID_EA_HANDLE = unchecked((int)(278)); // The mounted file system does not support extended attributes. - public const int ERROR_EAS_NOT_SUPPORTED = unchecked( (int)( 282 ) ); + public const int ERROR_EAS_NOT_SUPPORTED = unchecked((int)(282)); // Attempt to release mutex not owned by caller. - public const int ERROR_NOT_OWNER = unchecked( (int)( 288 ) ); + public const int ERROR_NOT_OWNER = unchecked((int)(288)); // Too many posts were made to a semaphore. - public const int ERROR_TOO_MANY_POSTS = unchecked( (int)( 298 ) ); + public const int ERROR_TOO_MANY_POSTS = unchecked((int)(298)); // The system cannot find message for message number 0x%1 // in message file for %2. - public const int ERROR_MR_MID_NOT_FOUND = unchecked( (int)( 317 ) ); + public const int ERROR_MR_MID_NOT_FOUND = unchecked((int)(317)); // Attempt to access invalid address. - public const int ERROR_INVALID_ADDRESS = unchecked( (int)( 487 ) ); + public const int ERROR_INVALID_ADDRESS = unchecked((int)(487)); // Arithmetic result exceeded 32 bits. - public const int ERROR_ARITHMETIC_OVERFLOW = unchecked( (int)( 534 ) ); + public const int ERROR_ARITHMETIC_OVERFLOW = unchecked((int)(534)); // There is a process on other end of the pipe. - public const int ERROR_PIPE_CONNECTED = unchecked( (int)( 535 ) ); + public const int ERROR_PIPE_CONNECTED = unchecked((int)(535)); // Waiting for a process to open the other end of the pipe. - public const int ERROR_PIPE_LISTENING = unchecked( (int)( 536 ) ); + public const int ERROR_PIPE_LISTENING = unchecked((int)(536)); // Access to the extended attribute was denied. - public const int ERROR_EA_ACCESS_DENIED = unchecked( (int)( 994 ) ); + public const int ERROR_EA_ACCESS_DENIED = unchecked((int)(994)); // The I/O operation has been aborted because of either a thread exit // or an application request. - public const int ERROR_OPERATION_ABORTED = unchecked( (int)( 995 ) ); + public const int ERROR_OPERATION_ABORTED = unchecked((int)(995)); // Overlapped I/O event is not in a signalled state. - public const int ERROR_IO_INCOMPLETE = unchecked( (int)( 996 ) ); + public const int ERROR_IO_INCOMPLETE = unchecked((int)(996)); // Overlapped I/O operation is in progress. - public const int ERROR_IO_PENDING = unchecked( (int)( 997 ) );// dderror + public const int ERROR_IO_PENDING = unchecked((int)(997));// dderror // Invalid access to memory location. - public const int ERROR_NOACCESS = unchecked( (int)( 998 ) ); + public const int ERROR_NOACCESS = unchecked((int)(998)); // Error performing inpage operation. - public const int ERROR_SWAPERROR = unchecked( (int)( 999 ) ); + public const int ERROR_SWAPERROR = unchecked((int)(999)); // Recursion too deep, stack overflowed. - public const int ERROR_STACK_OVERFLOW = unchecked( (int)( 1001 ) ); + public const int ERROR_STACK_OVERFLOW = unchecked((int)(1001)); // The window cannot act on the sent message. - public const int ERROR_INVALID_MESSAGE = unchecked( (int)( 1002 ) ); + public const int ERROR_INVALID_MESSAGE = unchecked((int)(1002)); // Cannot complete this function. - public const int ERROR_CAN_NOT_COMPLETE = unchecked( (int)( 1003 ) ); + public const int ERROR_CAN_NOT_COMPLETE = unchecked((int)(1003)); // Invalid flags. - public const int ERROR_INVALID_FLAGS = unchecked( (int)( 1004 ) ); + public const int ERROR_INVALID_FLAGS = unchecked((int)(1004)); // The volume does not contain a recognized file system. // Please make sure that all required file system drivers are loaded and that the // volume is not corrupt. - public const int ERROR_UNRECOGNIZED_VOLUME = unchecked( (int)( 1005 ) ); + public const int ERROR_UNRECOGNIZED_VOLUME = unchecked((int)(1005)); // The volume for a file has been externally altered such that the // opened file is no longer valid. - public const int ERROR_FILE_INVALID = unchecked( (int)( 1006 ) ); + public const int ERROR_FILE_INVALID = unchecked((int)(1006)); // The requested operation cannot be performed in full-screen mode. - public const int ERROR_FULLSCREEN_MODE = unchecked( (int)( 1007 ) ); + public const int ERROR_FULLSCREEN_MODE = unchecked((int)(1007)); // An attempt was made to reference a token that does not exist. - public const int ERROR_NO_TOKEN = unchecked( (int)( 1008 ) ); + public const int ERROR_NO_TOKEN = unchecked((int)(1008)); // The configuration registry database is corrupt. - public const int ERROR_BADDB = unchecked( (int)( 1009 ) ); + public const int ERROR_BADDB = unchecked((int)(1009)); // The configuration registry key is invalid. - public const int ERROR_BADKEY = unchecked( (int)( 1010 ) ); + public const int ERROR_BADKEY = unchecked((int)(1010)); // The configuration registry key could not be opened. - public const int ERROR_CANTOPEN = unchecked( (int)( 1011 ) ); + public const int ERROR_CANTOPEN = unchecked((int)(1011)); // The configuration registry key could not be read. - public const int ERROR_CANTREAD = unchecked( (int)( 1012 ) ); + public const int ERROR_CANTREAD = unchecked((int)(1012)); // The configuration registry key could not be written. - public const int ERROR_CANTWRITE = unchecked( (int)( 1013 ) ); + public const int ERROR_CANTWRITE = unchecked((int)(1013)); // One of the files in the Registry database had to be recovered // by use of a log or alternate copy. The recovery was successful. - public const int ERROR_REGISTRY_RECOVERED = unchecked( (int)( 1014 ) ); + public const int ERROR_REGISTRY_RECOVERED = unchecked((int)(1014)); // The Registry is corrupt. The structure of one of the files that contains // Registry data is corrupt, or the system's image of the file in memory // is corrupt, or the file could not be recovered because the alternate // copy or log was absent or corrupt. - public const int ERROR_REGISTRY_CORRUPT = unchecked( (int)( 1015 ) ); + public const int ERROR_REGISTRY_CORRUPT = unchecked((int)(1015)); // An I/O operation initiated by the Registry failed unrecoverably. // The Registry could not read in, or write out, or flush, one of the files // that contain the system's image of the Registry. - public const int ERROR_REGISTRY_IO_FAILED = unchecked( (int)( 1016 ) ); + public const int ERROR_REGISTRY_IO_FAILED = unchecked((int)(1016)); // The system has attempted to load or restore a file into the Registry, but the // specified file is not in a Registry file format. - public const int ERROR_NOT_REGISTRY_FILE = unchecked( (int)( 1017 ) ); + public const int ERROR_NOT_REGISTRY_FILE = unchecked((int)(1017)); // Illegal operation attempted on a Registry key which has been marked for deletion. - public const int ERROR_KEY_DELETED = unchecked( (int)( 1018 ) ); + public const int ERROR_KEY_DELETED = unchecked((int)(1018)); // System could not allocate the required space in a Registry log. - public const int ERROR_NO_LOG_SPACE = unchecked( (int)( 1019 ) ); + public const int ERROR_NO_LOG_SPACE = unchecked((int)(1019)); // Cannot create a symbolic link in a Registry key that already // has subkeys or values. - public const int ERROR_KEY_HAS_CHILDREN = unchecked( (int)( 1020 ) ); + public const int ERROR_KEY_HAS_CHILDREN = unchecked((int)(1020)); // Cannot create a stable subkey under a volatile parent key. - public const int ERROR_CHILD_MUST_BE_VOLATILE = unchecked( (int)( 1021 ) ); + public const int ERROR_CHILD_MUST_BE_VOLATILE = unchecked((int)(1021)); // A notify change request is being completed and the information // is not being returned in the caller's buffer. The caller now // needs to enumerate the files to find the changes. - public const int ERROR_NOTIFY_ENUM_DIR = unchecked( (int)( 1022 ) ); + public const int ERROR_NOTIFY_ENUM_DIR = unchecked((int)(1022)); // A stop control has been sent to a service which other running services // are dependent on. - public const int ERROR_DEPENDENT_SERVICES_RUNNING = unchecked( (int)( 1051 ) ); + public const int ERROR_DEPENDENT_SERVICES_RUNNING = unchecked((int)(1051)); // The requested control is not valid for this service - public const int ERROR_INVALID_SERVICE_CONTROL = unchecked( (int)( 1052 ) ); + public const int ERROR_INVALID_SERVICE_CONTROL = unchecked((int)(1052)); // The service did not respond to the start or control request in a timely // fashion. - public const int ERROR_SERVICE_REQUEST_TIMEOUT = unchecked( (int)( 1053 ) ); + public const int ERROR_SERVICE_REQUEST_TIMEOUT = unchecked((int)(1053)); // A thread could not be created for the service. - public const int ERROR_SERVICE_NO_THREAD = unchecked( (int)( 1054 ) ); + public const int ERROR_SERVICE_NO_THREAD = unchecked((int)(1054)); // The service database is locked. - public const int ERROR_SERVICE_DATABASE_LOCKED = unchecked( (int)( 1055 ) ); + public const int ERROR_SERVICE_DATABASE_LOCKED = unchecked((int)(1055)); // An instance of the service is already running. - public const int ERROR_SERVICE_ALREADY_RUNNING = unchecked( (int)( 1056 ) ); + public const int ERROR_SERVICE_ALREADY_RUNNING = unchecked((int)(1056)); // The account name is invalid or does not exist. - public const int ERROR_INVALID_SERVICE_ACCOUNT = unchecked( (int)( 1057 ) ); + public const int ERROR_INVALID_SERVICE_ACCOUNT = unchecked((int)(1057)); // The specified service is disabled and cannot be started. - public const int ERROR_SERVICE_DISABLED = unchecked( (int)( 1058 ) ); + public const int ERROR_SERVICE_DISABLED = unchecked((int)(1058)); // Circular service dependency was specified. - public const int ERROR_CIRCULAR_DEPENDENCY = unchecked( (int)( 1059 ) ); + public const int ERROR_CIRCULAR_DEPENDENCY = unchecked((int)(1059)); // The specified service does not exist as an installed service. - public const int ERROR_SERVICE_DOES_NOT_EXIST = unchecked( (int)( 1060 ) ); + public const int ERROR_SERVICE_DOES_NOT_EXIST = unchecked((int)(1060)); // The service cannot accept control messages at this time. - public const int ERROR_SERVICE_CANNOT_ACCEPT_CTRL = unchecked( (int)( 1061 ) ); + public const int ERROR_SERVICE_CANNOT_ACCEPT_CTRL = unchecked((int)(1061)); // The service has not been started. - public const int ERROR_SERVICE_NOT_ACTIVE = unchecked( (int)( 1062 ) ); + public const int ERROR_SERVICE_NOT_ACTIVE = unchecked((int)(1062)); // The service process could not connect to the service controller. - public const int ERROR_FAILED_SERVICE_CONTROLLER_CONNECT = unchecked( (int)( 1063 ) ); + public const int ERROR_FAILED_SERVICE_CONTROLLER_CONNECT = unchecked((int)(1063)); // An exception occurred in the service when handling the control request. - public const int ERROR_EXCEPTION_IN_SERVICE = unchecked( (int)( 1064 ) ); + public const int ERROR_EXCEPTION_IN_SERVICE = unchecked((int)(1064)); // The database specified does not exist. - public const int ERROR_DATABASE_DOES_NOT_EXIST = unchecked( (int)( 1065 ) ); + public const int ERROR_DATABASE_DOES_NOT_EXIST = unchecked((int)(1065)); // The service has returned a service-specific error code. - public const int ERROR_SERVICE_SPECIFIC_ERROR = unchecked( (int)( 1066 ) ); + public const int ERROR_SERVICE_SPECIFIC_ERROR = unchecked((int)(1066)); // The process terminated unexpectedly. - public const int ERROR_PROCESS_ABORTED = unchecked( (int)( 1067 ) ); + public const int ERROR_PROCESS_ABORTED = unchecked((int)(1067)); // The dependency service or group failed to start. - public const int ERROR_SERVICE_DEPENDENCY_FAIL = unchecked( (int)( 1068 ) ); + public const int ERROR_SERVICE_DEPENDENCY_FAIL = unchecked((int)(1068)); // The service did not start due to a logon failure. - public const int ERROR_SERVICE_LOGON_FAILED = unchecked( (int)( 1069 ) ); + public const int ERROR_SERVICE_LOGON_FAILED = unchecked((int)(1069)); // After starting, the service hung in a start-pending state. - public const int ERROR_SERVICE_START_HANG = unchecked( (int)( 1070 ) ); + public const int ERROR_SERVICE_START_HANG = unchecked((int)(1070)); // The specified service database lock is invalid. - public const int ERROR_INVALID_SERVICE_LOCK = unchecked( (int)( 1071 ) ); + public const int ERROR_INVALID_SERVICE_LOCK = unchecked((int)(1071)); // The specified service has been marked for deletion. - public const int ERROR_SERVICE_MARKED_FOR_DELETE = unchecked( (int)( 1072 ) ); + public const int ERROR_SERVICE_MARKED_FOR_DELETE = unchecked((int)(1072)); // The specified service already exists. - public const int ERROR_SERVICE_EXISTS = unchecked( (int)( 1073 ) ); + public const int ERROR_SERVICE_EXISTS = unchecked((int)(1073)); // The system is currently running with the last-known-good configuration. - public const int ERROR_ALREADY_RUNNING_LKG = unchecked( (int)( 1074 ) ); + public const int ERROR_ALREADY_RUNNING_LKG = unchecked((int)(1074)); // The dependency service does not exist or has been marked for // deletion. - public const int ERROR_SERVICE_DEPENDENCY_DELETED = unchecked( (int)( 1075 ) ); + public const int ERROR_SERVICE_DEPENDENCY_DELETED = unchecked((int)(1075)); // The current boot has already been accepted for use as the // last-known-good control set. - public const int ERROR_BOOT_ALREADY_ACCEPTED = unchecked( (int)( 1076 ) ); + public const int ERROR_BOOT_ALREADY_ACCEPTED = unchecked((int)(1076)); // No attempts to start the service have been made since the last boot. - public const int ERROR_SERVICE_NEVER_STARTED = unchecked( (int)( 1077 ) ); + public const int ERROR_SERVICE_NEVER_STARTED = unchecked((int)(1077)); // The name is already in use as either a service name or a service display // name. - public const int ERROR_DUPLICATE_SERVICE_NAME = unchecked( (int)( 1078 ) ); + public const int ERROR_DUPLICATE_SERVICE_NAME = unchecked((int)(1078)); // The physical end of the tape has been reached. - public const int ERROR_END_OF_MEDIA = unchecked( (int)( 1100 ) ); + public const int ERROR_END_OF_MEDIA = unchecked((int)(1100)); // A tape access reached a filemark. - public const int ERROR_FILEMARK_DETECTED = unchecked( (int)( 1101 ) ); + public const int ERROR_FILEMARK_DETECTED = unchecked((int)(1101)); // Beginning of tape or partition was encountered. - public const int ERROR_BEGINNING_OF_MEDIA = unchecked( (int)( 1102 ) ); + public const int ERROR_BEGINNING_OF_MEDIA = unchecked((int)(1102)); // A tape access reached the end of a set of files. - public const int ERROR_SETMARK_DETECTED = unchecked( (int)( 1103 ) ); + public const int ERROR_SETMARK_DETECTED = unchecked((int)(1103)); // No more data is on the tape. - public const int ERROR_NO_DATA_DETECTED = unchecked( (int)( 1104 ) ); + public const int ERROR_NO_DATA_DETECTED = unchecked((int)(1104)); // Tape could not be partitioned. - public const int ERROR_PARTITION_FAILURE = unchecked( (int)( 1105 ) ); + public const int ERROR_PARTITION_FAILURE = unchecked((int)(1105)); // When accessing a new tape of a multivolume partition, the current // blocksize is incorrect. - public const int ERROR_INVALID_BLOCK_LENGTH = unchecked( (int)( 1106 ) ); + public const int ERROR_INVALID_BLOCK_LENGTH = unchecked((int)(1106)); // Tape partition information could not be found when loading a tape. - public const int ERROR_DEVICE_NOT_PARTITIONED = unchecked( (int)( 1107 ) ); + public const int ERROR_DEVICE_NOT_PARTITIONED = unchecked((int)(1107)); // Unable to lock the media eject mechanism. - public const int ERROR_UNABLE_TO_LOCK_MEDIA = unchecked( (int)( 1108 ) ); + public const int ERROR_UNABLE_TO_LOCK_MEDIA = unchecked((int)(1108)); // Unable to unload the media. - public const int ERROR_UNABLE_TO_UNLOAD_MEDIA = unchecked( (int)( 1109 ) ); + public const int ERROR_UNABLE_TO_UNLOAD_MEDIA = unchecked((int)(1109)); // Media in drive may have changed. - public const int ERROR_MEDIA_CHANGED = unchecked( (int)( 1110 ) ); + public const int ERROR_MEDIA_CHANGED = unchecked((int)(1110)); // The I/O bus was reset. - public const int ERROR_BUS_RESET = unchecked( (int)( 1111 ) ); + public const int ERROR_BUS_RESET = unchecked((int)(1111)); // No media in drive. - public const int ERROR_NO_MEDIA_IN_DRIVE = unchecked( (int)( 1112 ) ); + public const int ERROR_NO_MEDIA_IN_DRIVE = unchecked((int)(1112)); // No mapping for the Unicode character exists in the target multi-byte code page. - public const int ERROR_NO_UNICODE_TRANSLATION = unchecked( (int)( 1113 ) ); + public const int ERROR_NO_UNICODE_TRANSLATION = unchecked((int)(1113)); // A dynamic link library (DLL) initialization routine failed. - public const int ERROR_DLL_INIT_FAILED = unchecked( (int)( 1114 ) ); + public const int ERROR_DLL_INIT_FAILED = unchecked((int)(1114)); // A system shutdown is in progress. - public const int ERROR_SHUTDOWN_IN_PROGRESS = unchecked( (int)( 1115 ) ); + public const int ERROR_SHUTDOWN_IN_PROGRESS = unchecked((int)(1115)); // Unable to abort the system shutdown because no shutdown was in progress. - public const int ERROR_NO_SHUTDOWN_IN_PROGRESS = unchecked( (int)( 1116 ) ); + public const int ERROR_NO_SHUTDOWN_IN_PROGRESS = unchecked((int)(1116)); // The request could not be performed because of an I/O device error. - public const int ERROR_IO_DEVICE = unchecked( (int)( 1117 ) ); + public const int ERROR_IO_DEVICE = unchecked((int)(1117)); // No serial device was successfully initialized. The serial driver will unload. - public const int ERROR_SERIAL_NO_DEVICE = unchecked( (int)( 1118 ) ); + public const int ERROR_SERIAL_NO_DEVICE = unchecked((int)(1118)); // Unable to open a device that was sharing an interrupt request (IRQ) // with other devices. At least one other device that uses that IRQ // was already opened. - public const int ERROR_IRQ_BUSY = unchecked( (int)( 1119 ) ); + public const int ERROR_IRQ_BUSY = unchecked((int)(1119)); // A serial I/O operation was completed by another write to the serial port. // (The IOCTL_SERIAL_XOFF_COUNTER reached zero.) - public const int ERROR_MORE_WRITES = unchecked( (int)( 1120 ) ); + public const int ERROR_MORE_WRITES = unchecked((int)(1120)); // A serial I/O operation completed because the time-out period expired. // (The IOCTL_SERIAL_XOFF_COUNTER did not reach zero.) - public const int ERROR_COUNTER_TIMEOUT = unchecked( (int)( 1121 ) ); + public const int ERROR_COUNTER_TIMEOUT = unchecked((int)(1121)); // No ID address mark was found on the floppy disk. - public const int ERROR_FLOPPY_ID_MARK_NOT_FOUND = unchecked( (int)( 1122 ) ); + public const int ERROR_FLOPPY_ID_MARK_NOT_FOUND = unchecked((int)(1122)); // Mismatch between the floppy disk sector ID field and the floppy disk // controller track address. - public const int ERROR_FLOPPY_WRONG_CYLINDER = unchecked( (int)( 1123 ) ); + public const int ERROR_FLOPPY_WRONG_CYLINDER = unchecked((int)(1123)); // The floppy disk controller reported an error that is not recognized // by the floppy disk driver. - public const int ERROR_FLOPPY_UNKNOWN_ERROR = unchecked( (int)( 1124 ) ); + public const int ERROR_FLOPPY_UNKNOWN_ERROR = unchecked((int)(1124)); // The floppy disk controller returned inconsistent results in its registers. - public const int ERROR_FLOPPY_BAD_REGISTERS = unchecked( (int)( 1125 ) ); + public const int ERROR_FLOPPY_BAD_REGISTERS = unchecked((int)(1125)); // While accessing the hard disk, a recalibrate operation failed, even after retries. - public const int ERROR_DISK_RECALIBRATE_FAILED = unchecked( (int)( 1126 ) ); + public const int ERROR_DISK_RECALIBRATE_FAILED = unchecked((int)(1126)); // While accessing the hard disk, a disk operation failed even after retries. - public const int ERROR_DISK_OPERATION_FAILED = unchecked( (int)( 1127 ) ); + public const int ERROR_DISK_OPERATION_FAILED = unchecked((int)(1127)); // While accessing the hard disk, a disk controller reset was needed, but // even that failed. - public const int ERROR_DISK_RESET_FAILED = unchecked( (int)( 1128 ) ); + public const int ERROR_DISK_RESET_FAILED = unchecked((int)(1128)); // Physical end of tape encountered. - public const int ERROR_EOM_OVERFLOW = unchecked( (int)( 1129 ) ); + public const int ERROR_EOM_OVERFLOW = unchecked((int)(1129)); // Not enough server storage is available to process this command. - public const int ERROR_NOT_ENOUGH_SERVER_MEMORY = unchecked( (int)( 1130 ) ); + public const int ERROR_NOT_ENOUGH_SERVER_MEMORY = unchecked((int)(1130)); // A potential deadlock condition has been detected. - public const int ERROR_POSSIBLE_DEADLOCK = unchecked( (int)( 1131 ) ); + public const int ERROR_POSSIBLE_DEADLOCK = unchecked((int)(1131)); // The base address or the file offset specified does not have the proper // alignment. - public const int ERROR_MAPPED_ALIGNMENT = unchecked( (int)( 1132 ) ); + public const int ERROR_MAPPED_ALIGNMENT = unchecked((int)(1132)); // NEW for Win32 - public const int ERROR_INVALID_PIXEL_FORMAT = unchecked( (int)( 2000 ) ); - public const int ERROR_BAD_DRIVER = unchecked( (int)( 2001 ) ); - public const int ERROR_INVALID_WINDOW_STYLE = unchecked( (int)( 2002 ) ); - public const int ERROR_METAFILE_NOT_SUPPORTED = unchecked( (int)( 2003 ) ); - public const int ERROR_TRANSFORM_NOT_SUPPORTED = unchecked( (int)( 2004 ) ); - public const int ERROR_CLIPPING_NOT_SUPPORTED = unchecked( (int)( 2005 ) ); - public const int ERROR_UNKNOWN_PRINT_MONITOR = unchecked( (int)( 3000 ) ); - public const int ERROR_PRINTER_DRIVER_IN_USE = unchecked( (int)( 3001 ) ); - public const int ERROR_SPOOL_FILE_NOT_FOUND = unchecked( (int)( 3002 ) ); - public const int ERROR_SPL_NO_STARTDOC = unchecked( (int)( 3003 ) ); - public const int ERROR_SPL_NO_ADDJOB = unchecked( (int)( 3004 ) ); - public const int ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED = unchecked( (int)( 3005 ) ); - public const int ERROR_PRINT_MONITOR_ALREADY_INSTALLED = unchecked( (int)( 3006 ) ); - public const int ERROR_WINS_INTERNAL = unchecked( (int)( 4000 ) ); - public const int ERROR_CAN_NOT_DEL_LOCAL_WINS = unchecked( (int)( 4001 ) ); - public const int ERROR_STATIC_INIT = unchecked( (int)( 4002 ) ); - public const int ERROR_INC_BACKUP = unchecked( (int)( 4003 ) ); - public const int ERROR_FULL_BACKUP = unchecked( (int)( 4004 ) ); - public const int ERROR_REC_NON_EXISTENT = unchecked( (int)( 4005 ) ); - public const int ERROR_RPL_NOT_ALLOWED = unchecked( (int)( 4006 ) ); - public const int SEVERITY_SUCCESS = unchecked( (int)( 0 ) ); - public const int SEVERITY_ERROR = unchecked( (int)( 1 ) ); - public const int FACILITY_NT_BIT = unchecked( (int)( 0x10000000 ) ); - public const int NOERROR = unchecked( (int)( 0 ) ); - public const int E_UNEXPECTED = unchecked( (int)( 0x8000FFFF ) ); - public const int E_NOTIMPL = unchecked( (int)( 0x80004001 ) ); - public const int E_OUTOFMEMORY = unchecked( (int)( 0x8007000E ) ); - public const int E_INVALIDARG = unchecked( (int)( 0x80070057 ) ); - public const int E_NOINTERFACE = unchecked( (int)( 0x80004002 ) ); - public const int E_POINTER = unchecked( (int)( 0x80004003 ) ); - public const int E_HANDLE = unchecked( (int)( 0x80070006 ) ); - public const int E_ABORT = unchecked( (int)( 0x80004004 ) ); - public const int E_FAIL = unchecked( (int)( 0x80004005 ) ); - public const int E_ACCESSDENIED = unchecked( (int)( 0x80070005 ) ); - public const int CO_E_INIT_TLS = unchecked( (int)( 0x80004006 ) ); - public const int CO_E_INIT_SHARED_ALLOCATOR = unchecked( (int)( 0x80004007 ) ); - public const int CO_E_INIT_MEMORY_ALLOCATOR = unchecked( (int)( 0x80004008 ) ); - public const int CO_E_INIT_CLASS_CACHE = unchecked( (int)( 0x80004009 ) ); - public const int CO_E_INIT_RPC_CHANNEL = unchecked( (int)( 0x8000400A ) ); - public const int CO_E_INIT_TLS_SET_CHANNEL_CONTROL = unchecked( (int)( 0x8000400B ) ); - public const int CO_E_INIT_TLS_CHANNEL_CONTROL = unchecked( (int)( 0x8000400C ) ); - public const int CO_E_INIT_UNACCEPTED_USER_ALLOCATOR = unchecked( (int)( 0x8000400D ) ); - public const int CO_E_INIT_SCM_MUTEX_EXISTS = unchecked( (int)( 0x8000400E ) ); - 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_EXEC_FAILURE = unchecked( (int)( 0x80004011 ) ); - public const int CO_E_INIT_ONLY_SINGLE_THREADED = unchecked( (int)( 0x80004012 ) ); - public const int S_OK = unchecked( (int)( 0x0 ) ); - public const int S_FALSE = unchecked( (int)( 0x1 ) ); - public const int OLE_E_FIRST = unchecked( (int)( 0x80040000 ) ); - public const int OLE_E_LAST = unchecked( (int)( 0x800400FF ) ); - public const int OLE_S_FIRST = unchecked( (int)( 0x40000 ) ); - public const int OLE_S_LAST = unchecked( (int)( 0x400FF ) ); - public const int OLE_E_OLEVERB = unchecked( (int)( 0x80040000 ) ); - public const int OLE_E_ADVF = unchecked( (int)( 0x80040001 ) ); - public const int OLE_E_ENUM_NOMORE = unchecked( (int)( 0x80040002 ) ); - public const int OLE_E_ADVISENOTSUPPORTED = unchecked( (int)( 0x80040003 ) ); - public const int OLE_E_NOCONNECTION = unchecked( (int)( 0x80040004 ) ); - public const int OLE_E_NOTRUNNING = unchecked( (int)( 0x80040005 ) ); - public const int OLE_E_NOCACHE = unchecked( (int)( 0x80040006 ) ); - public const int OLE_E_BLANK = unchecked( (int)( 0x80040007 ) ); - public const int OLE_E_CLASSDIFF = unchecked( (int)( 0x80040008 ) ); - public const int OLE_E_CANT_GETMONIKER = unchecked( (int)( 0x80040009 ) ); - public const int OLE_E_CANT_BINDTOSOURCE = unchecked( (int)( 0x8004000A ) ); - public const int OLE_E_STATIC = unchecked( (int)( 0x8004000B ) ); - public const int OLE_E_PROMPTSAVECANCELLED = unchecked( (int)( 0x8004000C ) ); - public const int OLE_E_INVALIDRECT = unchecked( (int)( 0x8004000D ) ); - public const int OLE_E_WRONGCOMPOBJ = unchecked( (int)( 0x8004000E ) ); - public const int OLE_E_INVALIDHWND = unchecked( (int)( 0x8004000F ) ); - public const int OLE_E_NOT_INPLACEACTIVE = unchecked( (int)( 0x80040010 ) ); - public const int OLE_E_CANTCONVERT = unchecked( (int)( 0x80040011 ) ); - public const int OLE_E_NOSTORAGE = unchecked( (int)( 0x80040012 ) ); - public const int DV_E_FORMATETC = unchecked( (int)( 0x80040064 ) ); - public const int DV_E_DVTARGETDEVICE = unchecked( (int)( 0x80040065 ) ); - public const int DV_E_STGMEDIUM = unchecked( (int)( 0x80040066 ) ); - public const int DV_E_STATDATA = unchecked( (int)( 0x80040067 ) ); - public const int DV_E_LINDEX = unchecked( (int)( 0x80040068 ) ); - public const int DV_E_TYMED = unchecked( (int)( 0x80040069 ) ); - public const int DV_E_CLIPFORMAT = unchecked( (int)( 0x8004006A ) ); - public const int DV_E_DVASPECT = unchecked( (int)( 0x8004006B ) ); - public const int DV_E_DVTARGETDEVICE_SIZE = unchecked( (int)( 0x8004006C ) ); - public const int DV_E_NOIVIEWOBJECT = unchecked( (int)( 0x8004006D ) ); - public const int DRAGDROP_E_FIRST = unchecked( (int)( 0x80040100 ) ); - public const int DRAGDROP_E_LAST = unchecked( (int)( 0x8004010F ) ); - public const int DRAGDROP_S_FIRST = unchecked( (int)( 0x40100 ) ); - public const int DRAGDROP_S_LAST = unchecked( (int)( 0x4010F ) ); - public const int DRAGDROP_E_NOTREGISTERED = unchecked( (int)( 0x80040100 ) ); - public const int DRAGDROP_E_ALREADYREGISTERED = unchecked( (int)( 0x80040101 ) ); - public const int DRAGDROP_E_INVALIDHWND = unchecked( (int)( 0x80040102 ) ); - public const int CLASSFACTORY_E_FIRST = unchecked( (int)( 0x80040110 ) ); - public const int CLASSFACTORY_E_LAST = unchecked( (int)( 0x8004011F ) ); - public const int CLASSFACTORY_S_FIRST = unchecked( (int)( 0x40110 ) ); - public const int CLASSFACTORY_S_LAST = unchecked( (int)( 0x4011F ) ); - public const int CLASS_E_NOAGGREGATION = unchecked( (int)( 0x80040110 ) ); - public const int CLASS_E_CLASSNOTAVAILABLE = unchecked( (int)( 0x80040111 ) ); - public const int MARSHAL_E_FIRST = unchecked( (int)( 0x80040120 ) ); - public const int MARSHAL_E_LAST = unchecked( (int)( 0x8004012F ) ); - public const int MARSHAL_S_FIRST = unchecked( (int)( 0x40120 ) ); - public const int MARSHAL_S_LAST = unchecked( (int)( 0x4012F ) ); - public const int DATA_E_FIRST = unchecked( (int)( 0x80040130 ) ); - public const int DATA_E_LAST = unchecked( (int)( 0x8004013F ) ); - public const int DATA_S_FIRST = unchecked( (int)( 0x40130 ) ); - public const int DATA_S_LAST = unchecked( (int)( 0x4013F ) ); - public const int VIEW_E_FIRST = unchecked( (int)( 0x80040140 ) ); - public const int VIEW_E_LAST = unchecked( (int)( 0x8004014F ) ); - public const int VIEW_S_FIRST = unchecked( (int)( 0x40140 ) ); - public const int VIEW_S_LAST = unchecked( (int)( 0x4014F ) ); - public const int VIEW_E_DRAW = unchecked( (int)( 0x80040140 ) ); - public const int REGDB_E_FIRST = unchecked( (int)( 0x80040150 ) ); - public const int REGDB_E_LAST = unchecked( (int)( 0x8004015F ) ); - public const int REGDB_S_FIRST = unchecked( (int)( 0x40150 ) ); - public const int REGDB_S_LAST = unchecked( (int)( 0x4015F ) ); - public const int REGDB_E_READREGDB = unchecked( (int)( 0x80040150 ) ); - public const int REGDB_E_WRITEREGDB = unchecked( (int)( 0x80040151 ) ); - public const int REGDB_E_KEYMISSING = unchecked( (int)( 0x80040152 ) ); - public const int REGDB_E_INVALIDVALUE = unchecked( (int)( 0x80040153 ) ); - public const int REGDB_E_CLASSNOTREG = unchecked( (int)( 0x80040154 ) ); - public const int REGDB_E_IIDNOTREG = unchecked( (int)( 0x80040155 ) ); - public const int CACHE_E_FIRST = unchecked( (int)( 0x80040170 ) ); - public const int CACHE_E_LAST = unchecked( (int)( 0x8004017F ) ); - public const int CACHE_S_FIRST = unchecked( (int)( 0x40170 ) ); - public const int CACHE_S_LAST = unchecked( (int)( 0x4017F ) ); - public const int CACHE_E_NOCACHE_UPDATED = unchecked( (int)( 0x80040170 ) ); - public const int OLEOBJ_E_FIRST = unchecked( (int)( 0x80040180 ) ); - public const int OLEOBJ_E_LAST = unchecked( (int)( 0x8004018F ) ); - public const int OLEOBJ_S_FIRST = unchecked( (int)( 0x40180 ) ); - public const int OLEOBJ_S_LAST = unchecked( (int)( 0x4018F ) ); - public const int OLEOBJ_E_NOVERBS = unchecked( (int)( 0x80040180 ) ); - public const int OLEOBJ_E_INVALIDVERB = unchecked( (int)( 0x80040181 ) ); - public const int CLIENTSITE_E_FIRST = unchecked( (int)( 0x80040190 ) ); - public const int CLIENTSITE_E_LAST = unchecked( (int)( 0x8004019F ) ); - public const int CLIENTSITE_S_FIRST = unchecked( (int)( 0x40190 ) ); - public const int CLIENTSITE_S_LAST = unchecked( (int)( 0x4019F ) ); - public const int INPLACE_E_NOTUNDOABLE = unchecked( (int)( 0x800401A0 ) ); - public const int INPLACE_E_NOTOOLSPACE = unchecked( (int)( 0x800401A1 ) ); - public const int INPLACE_E_FIRST = unchecked( (int)( 0x800401A0 ) ); - public const int INPLACE_E_LAST = unchecked( (int)( 0x800401AF ) ); - public const int INPLACE_S_FIRST = unchecked( (int)( 0x401A0 ) ); - public const int INPLACE_S_LAST = unchecked( (int)( 0x401AF ) ); - public const int ENUM_E_FIRST = unchecked( (int)( 0x800401B0 ) ); - public const int ENUM_E_LAST = unchecked( (int)( 0x800401BF ) ); - public const int ENUM_S_FIRST = unchecked( (int)( 0x401B0 ) ); - public const int ENUM_S_LAST = unchecked( (int)( 0x401BF ) ); - public const int CONVERT10_E_FIRST = unchecked( (int)( 0x800401C0 ) ); - public const int CONVERT10_E_LAST = unchecked( (int)( 0x800401CF ) ); - public const int CONVERT10_S_FIRST = unchecked( (int)( 0x401C0 ) ); - public const int CONVERT10_S_LAST = unchecked( (int)( 0x401CF ) ); - 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_OLESTREAM_FMT = unchecked( (int)( 0x800401C2 ) ); - public const int CONVERT10_E_OLESTREAM_BITMAP_TO_DIB = unchecked( (int)( 0x800401C3 ) ); - 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_E_STG_DIB_TO_BITMAP = unchecked( (int)( 0x800401C6 ) ); - public const int CLIPBRD_E_FIRST = unchecked( (int)( 0x800401D0 ) ); - public const int CLIPBRD_E_LAST = unchecked( (int)( 0x800401DF ) ); - public const int CLIPBRD_S_FIRST = unchecked( (int)( 0x401D0 ) ); - public const int CLIPBRD_S_LAST = unchecked( (int)( 0x401DF ) ); - public const int CLIPBRD_E_CANT_OPEN = unchecked( (int)( 0x800401D0 ) ); - public const int CLIPBRD_E_CANT_EMPTY = unchecked( (int)( 0x800401D1 ) ); - public const int CLIPBRD_E_CANT_SET = unchecked( (int)( 0x800401D2 ) ); - public const int CLIPBRD_E_BAD_DATA = unchecked( (int)( 0x800401D3 ) ); - public const int CLIPBRD_E_CANT_CLOSE = unchecked( (int)( 0x800401D4 ) ); - public const int MK_E_FIRST = unchecked( (int)( 0x800401E0 ) ); - public const int MK_E_LAST = unchecked( (int)( 0x800401EF ) ); - public const int MK_S_FIRST = unchecked( (int)( 0x401E0 ) ); - public const int MK_S_LAST = unchecked( (int)( 0x401EF ) ); - public const int MK_E_CONNECTMANUALLY = unchecked( (int)( 0x800401E0 ) ); - public const int MK_E_EXCEEDEDDEADLINE = unchecked( (int)( 0x800401E1 ) ); - public const int MK_E_NEEDGENERIC = unchecked( (int)( 0x800401E2 ) ); - public const int MK_E_UNAVAILABLE = unchecked( (int)( 0x800401E3 ) ); - public const int MK_E_SYNTAX = unchecked( (int)( 0x800401E4 ) ); - public const int MK_E_NOOBJECT = unchecked( (int)( 0x800401E5 ) ); - public const int MK_E_INVALIDEXTENSION = unchecked( (int)( 0x800401E6 ) ); - public const int MK_E_INTERMEDIATEINTERFACENOTSUPPORTED = unchecked( (int)( 0x800401E7 ) ); - public const int MK_E_NOTBINDABLE = unchecked( (int)( 0x800401E8 ) ); - public const int MK_E_NOTBOUND = unchecked( (int)( 0x800401E9 ) ); - public const int MK_E_CANTOPENFILE = unchecked( (int)( 0x800401EA ) ); - public const int MK_E_MUSTBOTHERUSER = unchecked( (int)( 0x800401EB ) ); - public const int MK_E_NOINVERSE = unchecked( (int)( 0x800401EC ) ); - public const int MK_E_NOSTORAGE = unchecked( (int)( 0x800401ED ) ); - public const int MK_E_NOPREFIX = unchecked( (int)( 0x800401EE ) ); - public const int MK_E_ENUMERATION_FAILED = unchecked( (int)( 0x800401EF ) ); - public const int CO_E_FIRST = unchecked( (int)( 0x800401F0 ) ); - public const int CO_E_LAST = unchecked( (int)( 0x800401FF ) ); - public const int CO_S_FIRST = unchecked( (int)( 0x401F0 ) ); - public const int CO_S_LAST = unchecked( (int)( 0x401FF ) ); - public const int CO_E_NOTINITIALIZED = unchecked( (int)( 0x800401F0 ) ); - public const int CO_E_ALREADYINITIALIZED = unchecked( (int)( 0x800401F1 ) ); - public const int CO_E_CANTDETERMINECLASS = unchecked( (int)( 0x800401F2 ) ); - public const int CO_E_CLASSSTRING = unchecked( (int)( 0x800401F3 ) ); - public const int CO_E_IIDSTRING = unchecked( (int)( 0x800401F4 ) ); - public const int CO_E_APPNOTFOUND = unchecked( (int)( 0x800401F5 ) ); - public const int CO_E_APPSINGLEUSE = unchecked( (int)( 0x800401F6 ) ); - public const int CO_E_ERRORINAPP = unchecked( (int)( 0x800401F7 ) ); - public const int CO_E_DLLNOTFOUND = unchecked( (int)( 0x800401F8 ) ); - public const int CO_E_ERRORINDLL = unchecked( (int)( 0x800401F9 ) ); - public const int CO_E_WRONGOSFORAPP = unchecked( (int)( 0x800401FA ) ); - public const int CO_E_OBJNOTREG = unchecked( (int)( 0x800401FB ) ); - public const int CO_E_OBJISREG = unchecked( (int)( 0x800401FC ) ); - public const int CO_E_OBJNOTCONNECTED = unchecked( (int)( 0x800401FD ) ); - public const int CO_E_APPDIDNTREG = unchecked( (int)( 0x800401FE ) ); - public const int CO_E_RELEASED = unchecked( (int)( 0x800401FF ) ); - public const int OLE_S_USEREG = unchecked( (int)( 0x40000 ) ); - public const int OLE_S_STATIC = unchecked( (int)( 0x40001 ) ); - public const int OLE_S_MAC_CLIPFORMAT = unchecked( (int)( 0x40002 ) ); - public const int DRAGDROP_S_DROP = unchecked( (int)( 0x40100 ) ); - public const int DRAGDROP_S_CANCEL = unchecked( (int)( 0x40101 ) ); - public const int DRAGDROP_S_USEDEFAULTCURSORS = unchecked( (int)( 0x40102 ) ); - public const int DATA_S_SAMEFORMATETC = unchecked( (int)( 0x40130 ) ); - public const int VIEW_S_ALREADY_FROZEN = unchecked( (int)( 0x40140 ) ); - public const int CACHE_S_FORMATETC_NOTSUPPORTED = unchecked( (int)( 0x40170 ) ); - public const int CACHE_S_SAMECACHE = unchecked( (int)( 0x40171 ) ); - public const int CACHE_S_SOMECACHES_NOTUPDATED = unchecked( (int)( 0x40172 ) ); - public const int OLEOBJ_S_INVALIDVERB = unchecked( (int)( 0x40180 ) ); - public const int OLEOBJ_S_CANNOT_DOVERB_NOW = unchecked( (int)( 0x40181 ) ); - public const int OLEOBJ_S_INVALIDHWND = unchecked( (int)( 0x40182 ) ); - public const int INPLACE_S_TRUNCATED = unchecked( (int)( 0x401A0 ) ); - public const int CONVERT10_S_NO_PRESENTATION = unchecked( (int)( 0x401C0 ) ); - public const int MK_S_REDUCED_TO_SELF = unchecked( (int)( 0x401E2 ) ); - public const int MK_S_ME = unchecked( (int)( 0x401E4 ) ); - public const int MK_S_HIM = unchecked( (int)( 0x401E5 ) ); - public const int MK_S_US = unchecked( (int)( 0x401E6 ) ); - public const int MK_S_MONIKERALREADYREGISTERED = unchecked( (int)( 0x401E7 ) ); - public const int CO_E_CLASS_CREATE_FAILED = unchecked( (int)( 0x80080001 ) ); - 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_BAD_PATH = unchecked( (int)( 0x80080004 ) ); - public const int CO_E_SERVER_EXEC_FAILURE = unchecked( (int)( 0x80080005 ) ); - public const int CO_E_OBJSRV_RPC_FAILURE = unchecked( (int)( 0x80080006 ) ); - public const int MK_E_NO_NORMALIZED = unchecked( (int)( 0x80080007 ) ); - public const int CO_E_SERVER_STOPPING = unchecked( (int)( 0x80080008 ) ); - public const int MEM_E_INVALID_ROOT = unchecked( (int)( 0x80080009 ) ); - public const int MEM_E_INVALID_LINK = unchecked( (int)( 0x80080010 ) ); - public const int MEM_E_INVALID_SIZE = unchecked( (int)( 0x80080011 ) ); - public const int DISP_E_UNKNOWNINTERFACE = unchecked( (int)( 0x80020001 ) ); - public const int DISP_E_MEMBERNOTFOUND = unchecked( (int)( 0x80020003 ) ); - public const int DISP_E_PARAMNOTFOUND = unchecked( (int)( 0x80020004 ) ); - public const int DISP_E_TYPEMISMATCH = unchecked( (int)( 0x80020005 ) ); - public const int DISP_E_UNKNOWNNAME = unchecked( (int)( 0x80020006 ) ); - public const int DISP_E_NONAMEDARGS = unchecked( (int)( 0x80020007 ) ); - public const int DISP_E_BADVARTYPE = unchecked( (int)( 0x80020008 ) ); - public const int DISP_E_EXCEPTION = unchecked( (int)( 0x80020009 ) ); - public const int DISP_E_OVERFLOW = unchecked( (int)( 0x8002000A ) ); - public const int DISP_E_BADINDEX = unchecked( (int)( 0x8002000B ) ); - public const int DISP_E_UNKNOWNLCID = unchecked( (int)( 0x8002000C ) ); - public const int DISP_E_ARRAYISLOCKED = unchecked( (int)( 0x8002000D ) ); - public const int DISP_E_BADPARAMCOUNT = unchecked( (int)( 0x8002000E ) ); - public const int DISP_E_PARAMNOTOPTIONAL = unchecked( (int)( 0x8002000F ) ); - public const int DISP_E_BADCALLEE = unchecked( (int)( 0x80020010 ) ); - public const int DISP_E_NOTACOLLECTION = unchecked( (int)( 0x80020011 ) ); - public const int TYPE_E_BUFFERTOOSMALL = unchecked( (int)( 0x80028016 ) ); - public const int TYPE_E_INVDATAREAD = unchecked( (int)( 0x80028018 ) ); - public const int TYPE_E_UNSUPFORMAT = unchecked( (int)( 0x80028019 ) ); - public const int TYPE_E_REGISTRYACCESS = unchecked( (int)( 0x8002801C ) ); - public const int TYPE_E_LIBNOTREGISTERED = unchecked( (int)( 0x8002801D ) ); - public const int TYPE_E_UNDEFINEDTYPE = unchecked( (int)( 0x80028027 ) ); - public const int TYPE_E_QUALIFIEDNAMEDISALLOWED = unchecked( (int)( 0x80028028 ) ); - public const int TYPE_E_INVALIDSTATE = unchecked( (int)( 0x80028029 ) ); - public const int TYPE_E_WRONGTYPEKIND = unchecked( (int)( 0x8002802A ) ); - public const int TYPE_E_ELEMENTNOTFOUND = unchecked( (int)( 0x8002802B ) ); - public const int TYPE_E_AMBIGUOUSNAME = unchecked( (int)( 0x8002802C ) ); - public const int TYPE_E_NAMECONFLICT = unchecked( (int)( 0x8002802D ) ); - public const int TYPE_E_UNKNOWNLCID = unchecked( (int)( 0x8002802E ) ); - public const int TYPE_E_DLLFUNCTIONNOTFOUND = unchecked( (int)( 0x8002802F ) ); - public const int TYPE_E_BADMODULEKIND = unchecked( (int)( 0x800288BD ) ); - public const int TYPE_E_SIZETOOBIG = unchecked( (int)( 0x800288C5 ) ); - public const int TYPE_E_DUPLICATEID = unchecked( (int)( 0x800288C6 ) ); - public const int TYPE_E_INVALIDID = unchecked( (int)( 0x800288CF ) ); - public const int TYPE_E_TYPEMISMATCH = unchecked( (int)( 0x80028CA0 ) ); - public const int TYPE_E_OUTOFBOUNDS = unchecked( (int)( 0x80028CA1 ) ); - public const int TYPE_E_IOERROR = unchecked( (int)( 0x80028CA2 ) ); - public const int TYPE_E_CANTCREATETMPFILE = unchecked( (int)( 0x80028CA3 ) ); - public const int TYPE_E_CANTLOADLIBRARY = unchecked( (int)( 0x80029C4A ) ); - public const int TYPE_E_INCONSISTENTPROPFUNCS = unchecked( (int)( 0x80029C83 ) ); - public const int TYPE_E_CIRCULARTYPE = unchecked( (int)( 0x80029C84 ) ); - public const int STG_E_INVALIDFUNCTION = unchecked( (int)( 0x80030001 ) ); - public const int STG_E_FILENOTFOUND = unchecked( (int)( 0x80030002 ) ); - public const int STG_E_PATHNOTFOUND = unchecked( (int)( 0x80030003 ) ); - public const int STG_E_TOOMANYOPENFILES = unchecked( (int)( 0x80030004 ) ); - public const int STG_E_ACCESSDENIED = unchecked( (int)( 0x80030005 ) ); - public const int STG_E_INVALIDHANDLE = unchecked( (int)( 0x80030006 ) ); - public const int STG_E_INSUFFICIENTMEMORY = unchecked( (int)( 0x80030008 ) ); - public const int STG_E_INVALIDPOINTER = unchecked( (int)( 0x80030009 ) ); - public const int STG_E_NOMOREFILES = unchecked( (int)( 0x80030012 ) ); - public const int STG_E_DISKISWRITEPROTECTED = unchecked( (int)( 0x80030013 ) ); - public const int STG_E_SEEKERROR = unchecked( (int)( 0x80030019 ) ); - public const int STG_E_WRITEFAULT = unchecked( (int)( 0x8003001D ) ); - public const int STG_E_READFAULT = unchecked( (int)( 0x8003001E ) ); - public const int STG_E_SHAREVIOLATION = unchecked( (int)( 0x80030020 ) ); - public const int STG_E_LOCKVIOLATION = unchecked( (int)( 0x80030021 ) ); - public const int STG_E_FILEALREADYEXISTS = unchecked( (int)( 0x80030050 ) ); - public const int STG_E_INVALIDPARAMETER = unchecked( (int)( 0x80030057 ) ); - public const int STG_E_MEDIUMFULL = unchecked( (int)( 0x80030070 ) ); - public const int STG_E_ABNORMALAPIEXIT = unchecked( (int)( 0x800300FA ) ); - public const int STG_E_INVALIDHEADER = unchecked( (int)( 0x800300FB ) ); - public const int STG_E_INVALIDNAME = unchecked( (int)( 0x800300FC ) ); - public const int STG_E_UNKNOWN = unchecked( (int)( 0x800300FD ) ); - public const int STG_E_UNIMPLEMENTEDFUNCTION = unchecked( (int)( 0x800300FE ) ); - public const int STG_E_INVALIDFLAG = unchecked( (int)( 0x800300FF ) ); - public const int STG_E_INUSE = unchecked( (int)( 0x80030100 ) ); - public const int STG_E_NOTCURRENT = unchecked( (int)( 0x80030101 ) ); - public const int STG_E_REVERTED = unchecked( (int)( 0x80030102 ) ); - public const int STG_E_CANTSAVE = unchecked( (int)( 0x80030103 ) ); - public const int STG_E_OLDFORMAT = unchecked( (int)( 0x80030104 ) ); - public const int STG_E_OLDDLL = unchecked( (int)( 0x80030105 ) ); - public const int STG_E_SHAREREQUIRED = unchecked( (int)( 0x80030106 ) ); - public const int STG_E_NOTFILEBASEDSTORAGE = unchecked( (int)( 0x80030107 ) ); - public const int STG_E_EXTANTMARSHALLINGS = unchecked( (int)( 0x80030108 ) ); - public const int STG_S_CONVERTED = unchecked( (int)( 0x30200 ) ); - public const int RPC_E_CALL_REJECTED = unchecked( (int)( 0x80010001 ) ); - public const int RPC_E_CALL_CANCELED = unchecked( (int)( 0x80010002 ) ); - public const int RPC_E_CANTPOST_INSENDCALL = unchecked( (int)( 0x80010003 ) ); - 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_CONNECTION_TERMINATED = unchecked( (int)( 0x80010006 ) ); - public const int RPC_E_SERVER_DIED = unchecked( (int)( 0x80010007 ) ); - public const int RPC_E_CLIENT_DIED = unchecked( (int)( 0x80010008 ) ); - public const int RPC_E_INVALID_DATAPACKET = unchecked( (int)( 0x80010009 ) ); - public const int RPC_E_CANTTRANSMIT_CALL = unchecked( (int)( 0x8001000A ) ); - 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_SERVER_CANTMARSHAL_DATA = unchecked( (int)( 0x8001000D ) ); - public const int RPC_E_SERVER_CANTUNMARSHAL_DATA = unchecked( (int)( 0x8001000E ) ); - public const int RPC_E_INVALID_DATA = unchecked( (int)( 0x8001000F ) ); - public const int RPC_E_INVALID_PARAMETER = unchecked( (int)( 0x80010010 ) ); - public const int RPC_E_CANTCALLOUT_AGAIN = unchecked( (int)( 0x80010011 ) ); - 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_OUT_OF_RESOURCES = unchecked( (int)( 0x80010101 ) ); - public const int RPC_E_ATTEMPTED_MULTITHREAD = unchecked( (int)( 0x80010102 ) ); - public const int RPC_E_NOT_REGISTERED = unchecked( (int)( 0x80010103 ) ); - public const int RPC_E_FAULT = unchecked( (int)( 0x80010104 ) ); - public const int RPC_E_SERVERFAULT = unchecked( (int)( 0x80010105 ) ); - public const int RPC_E_CHANGED_MODE = unchecked( (int)( 0x80010106 ) ); - public const int RPC_E_INVALIDMETHOD = unchecked( (int)( 0x80010107 ) ); - public const int RPC_E_DISCONNECTED = unchecked( (int)( 0x80010108 ) ); - public const int RPC_E_RETRY = unchecked( (int)( 0x80010109 ) ); - public const int RPC_E_SERVERCALL_RETRYLATER = unchecked( (int)( 0x8001010A ) ); - public const int RPC_E_SERVERCALL_REJECTED = unchecked( (int)( 0x8001010B ) ); - public const int RPC_E_INVALID_CALLDATA = unchecked( (int)( 0x8001010C ) ); - public const int RPC_E_CANTCALLOUT_ININPUTSYNCCALL = unchecked( (int)( 0x8001010D ) ); - public const int RPC_E_WRONG_THREAD = unchecked( (int)( 0x8001010E ) ); - public const int RPC_E_THREAD_NOT_INIT = unchecked( (int)( 0x8001010F ) ); - public const int RPC_E_UNEXPECTED = unchecked( (int)( 0x8001FFFF ) ); + public const int ERROR_INVALID_PIXEL_FORMAT = unchecked((int)(2000)); + public const int ERROR_BAD_DRIVER = unchecked((int)(2001)); + public const int ERROR_INVALID_WINDOW_STYLE = unchecked((int)(2002)); + public const int ERROR_METAFILE_NOT_SUPPORTED = unchecked((int)(2003)); + public const int ERROR_TRANSFORM_NOT_SUPPORTED = unchecked((int)(2004)); + public const int ERROR_CLIPPING_NOT_SUPPORTED = unchecked((int)(2005)); + public const int ERROR_UNKNOWN_PRINT_MONITOR = unchecked((int)(3000)); + public const int ERROR_PRINTER_DRIVER_IN_USE = unchecked((int)(3001)); + public const int ERROR_SPOOL_FILE_NOT_FOUND = unchecked((int)(3002)); + public const int ERROR_SPL_NO_STARTDOC = unchecked((int)(3003)); + public const int ERROR_SPL_NO_ADDJOB = unchecked((int)(3004)); + public const int ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED = unchecked((int)(3005)); + public const int ERROR_PRINT_MONITOR_ALREADY_INSTALLED = unchecked((int)(3006)); + public const int ERROR_WINS_INTERNAL = unchecked((int)(4000)); + public const int ERROR_CAN_NOT_DEL_LOCAL_WINS = unchecked((int)(4001)); + public const int ERROR_STATIC_INIT = unchecked((int)(4002)); + public const int ERROR_INC_BACKUP = unchecked((int)(4003)); + public const int ERROR_FULL_BACKUP = unchecked((int)(4004)); + public const int ERROR_REC_NON_EXISTENT = unchecked((int)(4005)); + public const int ERROR_RPL_NOT_ALLOWED = unchecked((int)(4006)); + public const int SEVERITY_SUCCESS = unchecked((int)(0)); + public const int SEVERITY_ERROR = unchecked((int)(1)); + public const int FACILITY_NT_BIT = unchecked((int)(0x10000000)); + public const int NOERROR = unchecked((int)(0)); + public const int E_UNEXPECTED = unchecked((int)(0x8000FFFF)); + public const int E_NOTIMPL = unchecked((int)(0x80004001)); + public const int E_OUTOFMEMORY = unchecked((int)(0x8007000E)); + public const int E_INVALIDARG = unchecked((int)(0x80070057)); + public const int E_NOINTERFACE = unchecked((int)(0x80004002)); + public const int E_POINTER = unchecked((int)(0x80004003)); + public const int E_HANDLE = unchecked((int)(0x80070006)); + public const int E_ABORT = unchecked((int)(0x80004004)); + public const int E_FAIL = unchecked((int)(0x80004005)); + public const int E_ACCESSDENIED = unchecked((int)(0x80070005)); + public const int CO_E_INIT_TLS = unchecked((int)(0x80004006)); + public const int CO_E_INIT_SHARED_ALLOCATOR = unchecked((int)(0x80004007)); + public const int CO_E_INIT_MEMORY_ALLOCATOR = unchecked((int)(0x80004008)); + public const int CO_E_INIT_CLASS_CACHE = unchecked((int)(0x80004009)); + public const int CO_E_INIT_RPC_CHANNEL = unchecked((int)(0x8000400A)); + public const int CO_E_INIT_TLS_SET_CHANNEL_CONTROL = unchecked((int)(0x8000400B)); + public const int CO_E_INIT_TLS_CHANNEL_CONTROL = unchecked((int)(0x8000400C)); + public const int CO_E_INIT_UNACCEPTED_USER_ALLOCATOR = unchecked((int)(0x8000400D)); + public const int CO_E_INIT_SCM_MUTEX_EXISTS = unchecked((int)(0x8000400E)); + 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_EXEC_FAILURE = unchecked((int)(0x80004011)); + public const int CO_E_INIT_ONLY_SINGLE_THREADED = unchecked((int)(0x80004012)); + public const int S_OK = unchecked((int)(0x0)); + public const int S_FALSE = unchecked((int)(0x1)); + public const int OLE_E_FIRST = unchecked((int)(0x80040000)); + public const int OLE_E_LAST = unchecked((int)(0x800400FF)); + public const int OLE_S_FIRST = unchecked((int)(0x40000)); + public const int OLE_S_LAST = unchecked((int)(0x400FF)); + public const int OLE_E_OLEVERB = unchecked((int)(0x80040000)); + public const int OLE_E_ADVF = unchecked((int)(0x80040001)); + public const int OLE_E_ENUM_NOMORE = unchecked((int)(0x80040002)); + public const int OLE_E_ADVISENOTSUPPORTED = unchecked((int)(0x80040003)); + public const int OLE_E_NOCONNECTION = unchecked((int)(0x80040004)); + public const int OLE_E_NOTRUNNING = unchecked((int)(0x80040005)); + public const int OLE_E_NOCACHE = unchecked((int)(0x80040006)); + public const int OLE_E_BLANK = unchecked((int)(0x80040007)); + public const int OLE_E_CLASSDIFF = unchecked((int)(0x80040008)); + public const int OLE_E_CANT_GETMONIKER = unchecked((int)(0x80040009)); + public const int OLE_E_CANT_BINDTOSOURCE = unchecked((int)(0x8004000A)); + public const int OLE_E_STATIC = unchecked((int)(0x8004000B)); + public const int OLE_E_PROMPTSAVECANCELLED = unchecked((int)(0x8004000C)); + public const int OLE_E_INVALIDRECT = unchecked((int)(0x8004000D)); + public const int OLE_E_WRONGCOMPOBJ = unchecked((int)(0x8004000E)); + public const int OLE_E_INVALIDHWND = unchecked((int)(0x8004000F)); + public const int OLE_E_NOT_INPLACEACTIVE = unchecked((int)(0x80040010)); + public const int OLE_E_CANTCONVERT = unchecked((int)(0x80040011)); + public const int OLE_E_NOSTORAGE = unchecked((int)(0x80040012)); + public const int DV_E_FORMATETC = unchecked((int)(0x80040064)); + public const int DV_E_DVTARGETDEVICE = unchecked((int)(0x80040065)); + public const int DV_E_STGMEDIUM = unchecked((int)(0x80040066)); + public const int DV_E_STATDATA = unchecked((int)(0x80040067)); + public const int DV_E_LINDEX = unchecked((int)(0x80040068)); + public const int DV_E_TYMED = unchecked((int)(0x80040069)); + public const int DV_E_CLIPFORMAT = unchecked((int)(0x8004006A)); + public const int DV_E_DVASPECT = unchecked((int)(0x8004006B)); + public const int DV_E_DVTARGETDEVICE_SIZE = unchecked((int)(0x8004006C)); + public const int DV_E_NOIVIEWOBJECT = unchecked((int)(0x8004006D)); + public const int DRAGDROP_E_FIRST = unchecked((int)(0x80040100)); + public const int DRAGDROP_E_LAST = unchecked((int)(0x8004010F)); + public const int DRAGDROP_S_FIRST = unchecked((int)(0x40100)); + public const int DRAGDROP_S_LAST = unchecked((int)(0x4010F)); + public const int DRAGDROP_E_NOTREGISTERED = unchecked((int)(0x80040100)); + public const int DRAGDROP_E_ALREADYREGISTERED = unchecked((int)(0x80040101)); + public const int DRAGDROP_E_INVALIDHWND = unchecked((int)(0x80040102)); + public const int CLASSFACTORY_E_FIRST = unchecked((int)(0x80040110)); + public const int CLASSFACTORY_E_LAST = unchecked((int)(0x8004011F)); + public const int CLASSFACTORY_S_FIRST = unchecked((int)(0x40110)); + public const int CLASSFACTORY_S_LAST = unchecked((int)(0x4011F)); + public const int CLASS_E_NOAGGREGATION = unchecked((int)(0x80040110)); + public const int CLASS_E_CLASSNOTAVAILABLE = unchecked((int)(0x80040111)); + public const int MARSHAL_E_FIRST = unchecked((int)(0x80040120)); + public const int MARSHAL_E_LAST = unchecked((int)(0x8004012F)); + public const int MARSHAL_S_FIRST = unchecked((int)(0x40120)); + public const int MARSHAL_S_LAST = unchecked((int)(0x4012F)); + public const int DATA_E_FIRST = unchecked((int)(0x80040130)); + public const int DATA_E_LAST = unchecked((int)(0x8004013F)); + public const int DATA_S_FIRST = unchecked((int)(0x40130)); + public const int DATA_S_LAST = unchecked((int)(0x4013F)); + public const int VIEW_E_FIRST = unchecked((int)(0x80040140)); + public const int VIEW_E_LAST = unchecked((int)(0x8004014F)); + public const int VIEW_S_FIRST = unchecked((int)(0x40140)); + public const int VIEW_S_LAST = unchecked((int)(0x4014F)); + public const int VIEW_E_DRAW = unchecked((int)(0x80040140)); + public const int REGDB_E_FIRST = unchecked((int)(0x80040150)); + public const int REGDB_E_LAST = unchecked((int)(0x8004015F)); + public const int REGDB_S_FIRST = unchecked((int)(0x40150)); + public const int REGDB_S_LAST = unchecked((int)(0x4015F)); + public const int REGDB_E_READREGDB = unchecked((int)(0x80040150)); + public const int REGDB_E_WRITEREGDB = unchecked((int)(0x80040151)); + public const int REGDB_E_KEYMISSING = unchecked((int)(0x80040152)); + public const int REGDB_E_INVALIDVALUE = unchecked((int)(0x80040153)); + public const int REGDB_E_CLASSNOTREG = unchecked((int)(0x80040154)); + public const int REGDB_E_IIDNOTREG = unchecked((int)(0x80040155)); + public const int CACHE_E_FIRST = unchecked((int)(0x80040170)); + public const int CACHE_E_LAST = unchecked((int)(0x8004017F)); + public const int CACHE_S_FIRST = unchecked((int)(0x40170)); + public const int CACHE_S_LAST = unchecked((int)(0x4017F)); + public const int CACHE_E_NOCACHE_UPDATED = unchecked((int)(0x80040170)); + public const int OLEOBJ_E_FIRST = unchecked((int)(0x80040180)); + public const int OLEOBJ_E_LAST = unchecked((int)(0x8004018F)); + public const int OLEOBJ_S_FIRST = unchecked((int)(0x40180)); + public const int OLEOBJ_S_LAST = unchecked((int)(0x4018F)); + public const int OLEOBJ_E_NOVERBS = unchecked((int)(0x80040180)); + public const int OLEOBJ_E_INVALIDVERB = unchecked((int)(0x80040181)); + public const int CLIENTSITE_E_FIRST = unchecked((int)(0x80040190)); + public const int CLIENTSITE_E_LAST = unchecked((int)(0x8004019F)); + public const int CLIENTSITE_S_FIRST = unchecked((int)(0x40190)); + public const int CLIENTSITE_S_LAST = unchecked((int)(0x4019F)); + public const int INPLACE_E_NOTUNDOABLE = unchecked((int)(0x800401A0)); + public const int INPLACE_E_NOTOOLSPACE = unchecked((int)(0x800401A1)); + public const int INPLACE_E_FIRST = unchecked((int)(0x800401A0)); + public const int INPLACE_E_LAST = unchecked((int)(0x800401AF)); + public const int INPLACE_S_FIRST = unchecked((int)(0x401A0)); + public const int INPLACE_S_LAST = unchecked((int)(0x401AF)); + public const int ENUM_E_FIRST = unchecked((int)(0x800401B0)); + public const int ENUM_E_LAST = unchecked((int)(0x800401BF)); + public const int ENUM_S_FIRST = unchecked((int)(0x401B0)); + public const int ENUM_S_LAST = unchecked((int)(0x401BF)); + public const int CONVERT10_E_FIRST = unchecked((int)(0x800401C0)); + public const int CONVERT10_E_LAST = unchecked((int)(0x800401CF)); + public const int CONVERT10_S_FIRST = unchecked((int)(0x401C0)); + public const int CONVERT10_S_LAST = unchecked((int)(0x401CF)); + 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_OLESTREAM_FMT = unchecked((int)(0x800401C2)); + public const int CONVERT10_E_OLESTREAM_BITMAP_TO_DIB = unchecked((int)(0x800401C3)); + 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_E_STG_DIB_TO_BITMAP = unchecked((int)(0x800401C6)); + public const int CLIPBRD_E_FIRST = unchecked((int)(0x800401D0)); + public const int CLIPBRD_E_LAST = unchecked((int)(0x800401DF)); + public const int CLIPBRD_S_FIRST = unchecked((int)(0x401D0)); + public const int CLIPBRD_S_LAST = unchecked((int)(0x401DF)); + public const int CLIPBRD_E_CANT_OPEN = unchecked((int)(0x800401D0)); + public const int CLIPBRD_E_CANT_EMPTY = unchecked((int)(0x800401D1)); + public const int CLIPBRD_E_CANT_SET = unchecked((int)(0x800401D2)); + public const int CLIPBRD_E_BAD_DATA = unchecked((int)(0x800401D3)); + public const int CLIPBRD_E_CANT_CLOSE = unchecked((int)(0x800401D4)); + public const int MK_E_FIRST = unchecked((int)(0x800401E0)); + public const int MK_E_LAST = unchecked((int)(0x800401EF)); + public const int MK_S_FIRST = unchecked((int)(0x401E0)); + public const int MK_S_LAST = unchecked((int)(0x401EF)); + public const int MK_E_CONNECTMANUALLY = unchecked((int)(0x800401E0)); + public const int MK_E_EXCEEDEDDEADLINE = unchecked((int)(0x800401E1)); + public const int MK_E_NEEDGENERIC = unchecked((int)(0x800401E2)); + public const int MK_E_UNAVAILABLE = unchecked((int)(0x800401E3)); + public const int MK_E_SYNTAX = unchecked((int)(0x800401E4)); + public const int MK_E_NOOBJECT = unchecked((int)(0x800401E5)); + public const int MK_E_INVALIDEXTENSION = unchecked((int)(0x800401E6)); + public const int MK_E_INTERMEDIATEINTERFACENOTSUPPORTED = unchecked((int)(0x800401E7)); + public const int MK_E_NOTBINDABLE = unchecked((int)(0x800401E8)); + public const int MK_E_NOTBOUND = unchecked((int)(0x800401E9)); + public const int MK_E_CANTOPENFILE = unchecked((int)(0x800401EA)); + public const int MK_E_MUSTBOTHERUSER = unchecked((int)(0x800401EB)); + public const int MK_E_NOINVERSE = unchecked((int)(0x800401EC)); + public const int MK_E_NOSTORAGE = unchecked((int)(0x800401ED)); + public const int MK_E_NOPREFIX = unchecked((int)(0x800401EE)); + public const int MK_E_ENUMERATION_FAILED = unchecked((int)(0x800401EF)); + public const int CO_E_FIRST = unchecked((int)(0x800401F0)); + public const int CO_E_LAST = unchecked((int)(0x800401FF)); + public const int CO_S_FIRST = unchecked((int)(0x401F0)); + public const int CO_S_LAST = unchecked((int)(0x401FF)); + public const int CO_E_NOTINITIALIZED = unchecked((int)(0x800401F0)); + public const int CO_E_ALREADYINITIALIZED = unchecked((int)(0x800401F1)); + public const int CO_E_CANTDETERMINECLASS = unchecked((int)(0x800401F2)); + public const int CO_E_CLASSSTRING = unchecked((int)(0x800401F3)); + public const int CO_E_IIDSTRING = unchecked((int)(0x800401F4)); + public const int CO_E_APPNOTFOUND = unchecked((int)(0x800401F5)); + public const int CO_E_APPSINGLEUSE = unchecked((int)(0x800401F6)); + public const int CO_E_ERRORINAPP = unchecked((int)(0x800401F7)); + public const int CO_E_DLLNOTFOUND = unchecked((int)(0x800401F8)); + public const int CO_E_ERRORINDLL = unchecked((int)(0x800401F9)); + public const int CO_E_WRONGOSFORAPP = unchecked((int)(0x800401FA)); + public const int CO_E_OBJNOTREG = unchecked((int)(0x800401FB)); + public const int CO_E_OBJISREG = unchecked((int)(0x800401FC)); + public const int CO_E_OBJNOTCONNECTED = unchecked((int)(0x800401FD)); + public const int CO_E_APPDIDNTREG = unchecked((int)(0x800401FE)); + public const int CO_E_RELEASED = unchecked((int)(0x800401FF)); + public const int OLE_S_USEREG = unchecked((int)(0x40000)); + public const int OLE_S_STATIC = unchecked((int)(0x40001)); + public const int OLE_S_MAC_CLIPFORMAT = unchecked((int)(0x40002)); + public const int DRAGDROP_S_DROP = unchecked((int)(0x40100)); + public const int DRAGDROP_S_CANCEL = unchecked((int)(0x40101)); + public const int DRAGDROP_S_USEDEFAULTCURSORS = unchecked((int)(0x40102)); + public const int DATA_S_SAMEFORMATETC = unchecked((int)(0x40130)); + public const int VIEW_S_ALREADY_FROZEN = unchecked((int)(0x40140)); + public const int CACHE_S_FORMATETC_NOTSUPPORTED = unchecked((int)(0x40170)); + public const int CACHE_S_SAMECACHE = unchecked((int)(0x40171)); + public const int CACHE_S_SOMECACHES_NOTUPDATED = unchecked((int)(0x40172)); + public const int OLEOBJ_S_INVALIDVERB = unchecked((int)(0x40180)); + public const int OLEOBJ_S_CANNOT_DOVERB_NOW = unchecked((int)(0x40181)); + public const int OLEOBJ_S_INVALIDHWND = unchecked((int)(0x40182)); + public const int INPLACE_S_TRUNCATED = unchecked((int)(0x401A0)); + public const int CONVERT10_S_NO_PRESENTATION = unchecked((int)(0x401C0)); + public const int MK_S_REDUCED_TO_SELF = unchecked((int)(0x401E2)); + public const int MK_S_ME = unchecked((int)(0x401E4)); + public const int MK_S_HIM = unchecked((int)(0x401E5)); + public const int MK_S_US = unchecked((int)(0x401E6)); + public const int MK_S_MONIKERALREADYREGISTERED = unchecked((int)(0x401E7)); + public const int CO_E_CLASS_CREATE_FAILED = unchecked((int)(0x80080001)); + 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_BAD_PATH = unchecked((int)(0x80080004)); + public const int CO_E_SERVER_EXEC_FAILURE = unchecked((int)(0x80080005)); + public const int CO_E_OBJSRV_RPC_FAILURE = unchecked((int)(0x80080006)); + public const int MK_E_NO_NORMALIZED = unchecked((int)(0x80080007)); + public const int CO_E_SERVER_STOPPING = unchecked((int)(0x80080008)); + public const int MEM_E_INVALID_ROOT = unchecked((int)(0x80080009)); + public const int MEM_E_INVALID_LINK = unchecked((int)(0x80080010)); + public const int MEM_E_INVALID_SIZE = unchecked((int)(0x80080011)); + public const int DISP_E_UNKNOWNINTERFACE = unchecked((int)(0x80020001)); + public const int DISP_E_MEMBERNOTFOUND = unchecked((int)(0x80020003)); + public const int DISP_E_PARAMNOTFOUND = unchecked((int)(0x80020004)); + public const int DISP_E_TYPEMISMATCH = unchecked((int)(0x80020005)); + public const int DISP_E_UNKNOWNNAME = unchecked((int)(0x80020006)); + public const int DISP_E_NONAMEDARGS = unchecked((int)(0x80020007)); + public const int DISP_E_BADVARTYPE = unchecked((int)(0x80020008)); + public const int DISP_E_EXCEPTION = unchecked((int)(0x80020009)); + public const int DISP_E_OVERFLOW = unchecked((int)(0x8002000A)); + public const int DISP_E_BADINDEX = unchecked((int)(0x8002000B)); + public const int DISP_E_UNKNOWNLCID = unchecked((int)(0x8002000C)); + public const int DISP_E_ARRAYISLOCKED = unchecked((int)(0x8002000D)); + public const int DISP_E_BADPARAMCOUNT = unchecked((int)(0x8002000E)); + public const int DISP_E_PARAMNOTOPTIONAL = unchecked((int)(0x8002000F)); + public const int DISP_E_BADCALLEE = unchecked((int)(0x80020010)); + public const int DISP_E_NOTACOLLECTION = unchecked((int)(0x80020011)); + public const int TYPE_E_BUFFERTOOSMALL = unchecked((int)(0x80028016)); + public const int TYPE_E_INVDATAREAD = unchecked((int)(0x80028018)); + public const int TYPE_E_UNSUPFORMAT = unchecked((int)(0x80028019)); + public const int TYPE_E_REGISTRYACCESS = unchecked((int)(0x8002801C)); + public const int TYPE_E_LIBNOTREGISTERED = unchecked((int)(0x8002801D)); + public const int TYPE_E_UNDEFINEDTYPE = unchecked((int)(0x80028027)); + public const int TYPE_E_QUALIFIEDNAMEDISALLOWED = unchecked((int)(0x80028028)); + public const int TYPE_E_INVALIDSTATE = unchecked((int)(0x80028029)); + public const int TYPE_E_WRONGTYPEKIND = unchecked((int)(0x8002802A)); + public const int TYPE_E_ELEMENTNOTFOUND = unchecked((int)(0x8002802B)); + public const int TYPE_E_AMBIGUOUSNAME = unchecked((int)(0x8002802C)); + public const int TYPE_E_NAMECONFLICT = unchecked((int)(0x8002802D)); + public const int TYPE_E_UNKNOWNLCID = unchecked((int)(0x8002802E)); + public const int TYPE_E_DLLFUNCTIONNOTFOUND = unchecked((int)(0x8002802F)); + public const int TYPE_E_BADMODULEKIND = unchecked((int)(0x800288BD)); + public const int TYPE_E_SIZETOOBIG = unchecked((int)(0x800288C5)); + public const int TYPE_E_DUPLICATEID = unchecked((int)(0x800288C6)); + public const int TYPE_E_INVALIDID = unchecked((int)(0x800288CF)); + public const int TYPE_E_TYPEMISMATCH = unchecked((int)(0x80028CA0)); + public const int TYPE_E_OUTOFBOUNDS = unchecked((int)(0x80028CA1)); + public const int TYPE_E_IOERROR = unchecked((int)(0x80028CA2)); + public const int TYPE_E_CANTCREATETMPFILE = unchecked((int)(0x80028CA3)); + public const int TYPE_E_CANTLOADLIBRARY = unchecked((int)(0x80029C4A)); + public const int TYPE_E_INCONSISTENTPROPFUNCS = unchecked((int)(0x80029C83)); + public const int TYPE_E_CIRCULARTYPE = unchecked((int)(0x80029C84)); + public const int STG_E_INVALIDFUNCTION = unchecked((int)(0x80030001)); + public const int STG_E_FILENOTFOUND = unchecked((int)(0x80030002)); + public const int STG_E_PATHNOTFOUND = unchecked((int)(0x80030003)); + public const int STG_E_TOOMANYOPENFILES = unchecked((int)(0x80030004)); + public const int STG_E_ACCESSDENIED = unchecked((int)(0x80030005)); + public const int STG_E_INVALIDHANDLE = unchecked((int)(0x80030006)); + public const int STG_E_INSUFFICIENTMEMORY = unchecked((int)(0x80030008)); + public const int STG_E_INVALIDPOINTER = unchecked((int)(0x80030009)); + public const int STG_E_NOMOREFILES = unchecked((int)(0x80030012)); + public const int STG_E_DISKISWRITEPROTECTED = unchecked((int)(0x80030013)); + public const int STG_E_SEEKERROR = unchecked((int)(0x80030019)); + public const int STG_E_WRITEFAULT = unchecked((int)(0x8003001D)); + public const int STG_E_READFAULT = unchecked((int)(0x8003001E)); + public const int STG_E_SHAREVIOLATION = unchecked((int)(0x80030020)); + public const int STG_E_LOCKVIOLATION = unchecked((int)(0x80030021)); + public const int STG_E_FILEALREADYEXISTS = unchecked((int)(0x80030050)); + public const int STG_E_INVALIDPARAMETER = unchecked((int)(0x80030057)); + public const int STG_E_MEDIUMFULL = unchecked((int)(0x80030070)); + public const int STG_E_ABNORMALAPIEXIT = unchecked((int)(0x800300FA)); + public const int STG_E_INVALIDHEADER = unchecked((int)(0x800300FB)); + public const int STG_E_INVALIDNAME = unchecked((int)(0x800300FC)); + public const int STG_E_UNKNOWN = unchecked((int)(0x800300FD)); + public const int STG_E_UNIMPLEMENTEDFUNCTION = unchecked((int)(0x800300FE)); + public const int STG_E_INVALIDFLAG = unchecked((int)(0x800300FF)); + public const int STG_E_INUSE = unchecked((int)(0x80030100)); + public const int STG_E_NOTCURRENT = unchecked((int)(0x80030101)); + public const int STG_E_REVERTED = unchecked((int)(0x80030102)); + public const int STG_E_CANTSAVE = unchecked((int)(0x80030103)); + public const int STG_E_OLDFORMAT = unchecked((int)(0x80030104)); + public const int STG_E_OLDDLL = unchecked((int)(0x80030105)); + public const int STG_E_SHAREREQUIRED = unchecked((int)(0x80030106)); + public const int STG_E_NOTFILEBASEDSTORAGE = unchecked((int)(0x80030107)); + public const int STG_E_EXTANTMARSHALLINGS = unchecked((int)(0x80030108)); + public const int STG_S_CONVERTED = unchecked((int)(0x30200)); + public const int RPC_E_CALL_REJECTED = unchecked((int)(0x80010001)); + public const int RPC_E_CALL_CANCELED = unchecked((int)(0x80010002)); + public const int RPC_E_CANTPOST_INSENDCALL = unchecked((int)(0x80010003)); + 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_CONNECTION_TERMINATED = unchecked((int)(0x80010006)); + public const int RPC_E_SERVER_DIED = unchecked((int)(0x80010007)); + public const int RPC_E_CLIENT_DIED = unchecked((int)(0x80010008)); + public const int RPC_E_INVALID_DATAPACKET = unchecked((int)(0x80010009)); + public const int RPC_E_CANTTRANSMIT_CALL = unchecked((int)(0x8001000A)); + 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_SERVER_CANTMARSHAL_DATA = unchecked((int)(0x8001000D)); + public const int RPC_E_SERVER_CANTUNMARSHAL_DATA = unchecked((int)(0x8001000E)); + public const int RPC_E_INVALID_DATA = unchecked((int)(0x8001000F)); + public const int RPC_E_INVALID_PARAMETER = unchecked((int)(0x80010010)); + public const int RPC_E_CANTCALLOUT_AGAIN = unchecked((int)(0x80010011)); + 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_OUT_OF_RESOURCES = unchecked((int)(0x80010101)); + public const int RPC_E_ATTEMPTED_MULTITHREAD = unchecked((int)(0x80010102)); + public const int RPC_E_NOT_REGISTERED = unchecked((int)(0x80010103)); + public const int RPC_E_FAULT = unchecked((int)(0x80010104)); + public const int RPC_E_SERVERFAULT = unchecked((int)(0x80010105)); + public const int RPC_E_CHANGED_MODE = unchecked((int)(0x80010106)); + public const int RPC_E_INVALIDMETHOD = unchecked((int)(0x80010107)); + public const int RPC_E_DISCONNECTED = unchecked((int)(0x80010108)); + public const int RPC_E_RETRY = unchecked((int)(0x80010109)); + public const int RPC_E_SERVERCALL_RETRYLATER = unchecked((int)(0x8001010A)); + public const int RPC_E_SERVERCALL_REJECTED = unchecked((int)(0x8001010B)); + public const int RPC_E_INVALID_CALLDATA = unchecked((int)(0x8001010C)); + public const int RPC_E_CANTCALLOUT_ININPUTSYNCCALL = unchecked((int)(0x8001010D)); + public const int RPC_E_WRONG_THREAD = unchecked((int)(0x8001010E)); + public const int RPC_E_THREAD_NOT_INIT = unchecked((int)(0x8001010F)); + public const int RPC_E_UNEXPECTED = unchecked((int)(0x8001FFFF)); // ///////////////////////// @@ -12327,87 +12327,87 @@ public struct MONCONVSTRUCT // ///////////////////////// // The specified username is invalid. - public const int ERROR_BAD_USERNAME = unchecked( (int)( 2202 ) ); + public const int ERROR_BAD_USERNAME = unchecked((int)(2202)); // This network connection does not exist. - public const int ERROR_NOT_CONNECTED = unchecked( (int)( 2250 ) ); + public const int ERROR_NOT_CONNECTED = unchecked((int)(2250)); // This network connection has files open or requests pending. - public const int ERROR_OPEN_FILES = unchecked( (int)( 2401 ) ); + public const int ERROR_OPEN_FILES = unchecked((int)(2401)); // The device is in use by an active process and cannot be disconnected. - public const int ERROR_DEVICE_IN_USE = unchecked( (int)( 2404 ) ); + public const int ERROR_DEVICE_IN_USE = unchecked((int)(2404)); // The specified device name is invalid. - public const int ERROR_BAD_DEVICE = unchecked( (int)( 1200 ) ); + public const int ERROR_BAD_DEVICE = unchecked((int)(1200)); // The device is not currently connected but it is a remembered connection. - public const int ERROR_CONNECTION_UNAVAIL = unchecked( (int)( 1201 ) ); + public const int ERROR_CONNECTION_UNAVAIL = unchecked((int)(1201)); // An attempt was made to remember a device that had previously been remembered. - public const int ERROR_DEVICE_ALREADY_REMEMBERED = unchecked( (int)( 1202 ) ); + public const int ERROR_DEVICE_ALREADY_REMEMBERED = unchecked((int)(1202)); // No network provider accepted the given network path. - public const int ERROR_NO_NET_OR_BAD_PATH = unchecked( (int)( 1203 ) ); + public const int ERROR_NO_NET_OR_BAD_PATH = unchecked((int)(1203)); // The specified network provider name is invalid. - public const int ERROR_BAD_PROVIDER = unchecked( (int)( 1204 ) ); + public const int ERROR_BAD_PROVIDER = unchecked((int)(1204)); // Unable to open the network connection profile. - public const int ERROR_CANNOT_OPEN_PROFILE = unchecked( (int)( 1205 ) ); + public const int ERROR_CANNOT_OPEN_PROFILE = unchecked((int)(1205)); // The network connection profile is corrupt. - public const int ERROR_BAD_PROFILE = unchecked( (int)( 1206 ) ); + public const int ERROR_BAD_PROFILE = unchecked((int)(1206)); // Cannot enumerate a non-container. - public const int ERROR_NOT_CONTAINER = unchecked( (int)( 1207 ) ); + public const int ERROR_NOT_CONTAINER = unchecked((int)(1207)); // An extended error has occurred. - public const int ERROR_EXTENDED_ERROR = unchecked( (int)( 1208 ) ); + public const int ERROR_EXTENDED_ERROR = unchecked((int)(1208)); // The format of the specified group name is invalid. - public const int ERROR_INVALID_GROUPNAME = unchecked( (int)( 1209 ) ); + public const int ERROR_INVALID_GROUPNAME = unchecked((int)(1209)); // The format of the specified computer name is invalid. - public const int ERROR_INVALID_COMPUTERNAME = unchecked( (int)( 1210 ) ); + public const int ERROR_INVALID_COMPUTERNAME = unchecked((int)(1210)); // The format of the specified event name is invalid. - public const int ERROR_INVALID_EVENTNAME = unchecked( (int)( 1211 ) ); + public const int ERROR_INVALID_EVENTNAME = unchecked((int)(1211)); // The format of the specified domain name is invalid. - public const int ERROR_INVALID_DOMAINNAME = unchecked( (int)( 1212 ) ); + public const int ERROR_INVALID_DOMAINNAME = unchecked((int)(1212)); // The format of the specified service name is invalid. - public const int ERROR_INVALID_SERVICENAME = unchecked( (int)( 1213 ) ); + public const int ERROR_INVALID_SERVICENAME = unchecked((int)(1213)); // The format of the specified network name is invalid. - public const int ERROR_INVALID_NETNAME = unchecked( (int)( 1214 ) ); + public const int ERROR_INVALID_NETNAME = unchecked((int)(1214)); // The format of the specified share name is invalid. - public const int ERROR_INVALID_SHARENAME = unchecked( (int)( 1215 ) ); + public const int ERROR_INVALID_SHARENAME = unchecked((int)(1215)); // The format of the specified password is invalid. - public const int ERROR_INVALID_PASSWORDNAME = unchecked( (int)( 1216 ) ); + public const int ERROR_INVALID_PASSWORDNAME = unchecked((int)(1216)); // The format of the specified message name is invalid. - public const int ERROR_INVALID_MESSAGENAME = unchecked( (int)( 1217 ) ); + public const int ERROR_INVALID_MESSAGENAME = unchecked((int)(1217)); // The format of the specified message destination is invalid. - public const int ERROR_INVALID_MESSAGEDEST = unchecked( (int)( 1218 ) ); + public const int ERROR_INVALID_MESSAGEDEST = unchecked((int)(1218)); // The credentials supplied conflict with an existing set of credentials. - public const int ERROR_SESSION_CREDENTIAL_CONFLICT = unchecked( (int)( 1219 ) ); + public const int ERROR_SESSION_CREDENTIAL_CONFLICT = unchecked((int)(1219)); // An attempt was made to establish a session to a Lan Manager server, but there // are already too many sessions established to that server. - public const int ERROR_REMOTE_SESSION_LIMIT_EXCEEDED = unchecked( (int)( 1220 ) ); + public const int ERROR_REMOTE_SESSION_LIMIT_EXCEEDED = unchecked((int)(1220)); // The workgroup or domain name is already in use by another computer on the // network. - public const int ERROR_DUP_DOMAINNAME = unchecked( (int)( 1221 ) ); + public const int ERROR_DUP_DOMAINNAME = unchecked((int)(1221)); // The network is not present or not started. - public const int ERROR_NO_NETWORK = unchecked( (int)( 1222 ) ); + public const int ERROR_NO_NETWORK = unchecked((int)(1222)); // ///////////////////////// @@ -12417,317 +12417,317 @@ public struct MONCONVSTRUCT // ///////////////////////// // Not all privileges referenced are assigned to the caller. - public const int ERROR_NOT_ALL_ASSIGNED = unchecked( (int)( 1300 ) ); + public const int ERROR_NOT_ALL_ASSIGNED = unchecked((int)(1300)); // Some mapping between account names and security IDs was not done. - public const int ERROR_SOME_NOT_MAPPED = unchecked( (int)( 1301 ) ); + public const int ERROR_SOME_NOT_MAPPED = unchecked((int)(1301)); // No system quota limits are specifically set for this account. - public const int ERROR_NO_QUOTAS_FOR_ACCOUNT = unchecked( (int)( 1302 ) ); + public const int ERROR_NO_QUOTAS_FOR_ACCOUNT = unchecked((int)(1302)); // No encryption key is available. A well-known encryption key was returned. - public const int ERROR_LOCAL_USER_SESSION_KEY = unchecked( (int)( 1303 ) ); + public const int ERROR_LOCAL_USER_SESSION_KEY = unchecked((int)(1303)); // The NT password is too complex to be converted to a LAN Manager // password. The LAN Manager password returned is a NULL string. - public const int ERROR_NULL_LM_PASSWORD = unchecked( (int)( 1304 ) ); + public const int ERROR_NULL_LM_PASSWORD = unchecked((int)(1304)); // The revision level is unknown. - public const int ERROR_UNKNOWN_REVISION = unchecked( (int)( 1305 ) ); + public const int ERROR_UNKNOWN_REVISION = unchecked((int)(1305)); // Indicates two revision levels are incompatible. - public const int ERROR_REVISION_MISMATCH = unchecked( (int)( 1306 ) ); + public const int ERROR_REVISION_MISMATCH = unchecked((int)(1306)); // This security ID may not be assigned as the owner of this object. - public const int ERROR_INVALID_OWNER = unchecked( (int)( 1307 ) ); + public const int ERROR_INVALID_OWNER = unchecked((int)(1307)); // This security ID may not be assigned as the primary group of an object. - public const int ERROR_INVALID_PRIMARY_GROUP = unchecked( (int)( 1308 ) ); + public const int ERROR_INVALID_PRIMARY_GROUP = unchecked((int)(1308)); // An attempt has been made to operate on an impersonation token // by a thread that is not currently impersonating a client. - public const int ERROR_NO_IMPERSONATION_TOKEN = unchecked( (int)( 1309 ) ); + public const int ERROR_NO_IMPERSONATION_TOKEN = unchecked((int)(1309)); // The group may not be disabled. - public const int ERROR_CANT_DISABLE_MANDATORY = unchecked( (int)( 1310 ) ); + public const int ERROR_CANT_DISABLE_MANDATORY = unchecked((int)(1310)); // There are currently no logon servers available to service the logon // request. - public const int ERROR_NO_LOGON_SERVERS = unchecked( (int)( 1311 ) ); + public const int ERROR_NO_LOGON_SERVERS = unchecked((int)(1311)); // A specified logon session does not exist. It may already have // been terminated. - public const int ERROR_NO_SUCH_LOGON_SESSION = unchecked( (int)( 1312 ) ); + public const int ERROR_NO_SUCH_LOGON_SESSION = unchecked((int)(1312)); // A specified privilege does not exist. - public const int ERROR_NO_SUCH_PRIVILEGE = unchecked( (int)( 1313 ) ); + public const int ERROR_NO_SUCH_PRIVILEGE = unchecked((int)(1313)); // A required privilege is not held by the client. - public const int ERROR_PRIVILEGE_NOT_HELD = unchecked( (int)( 1314 ) ); + public const int ERROR_PRIVILEGE_NOT_HELD = unchecked((int)(1314)); // The name provided is not a properly formed account name. - public const int ERROR_INVALID_ACCOUNT_NAME = unchecked( (int)( 1315 ) ); + public const int ERROR_INVALID_ACCOUNT_NAME = unchecked((int)(1315)); // The specified user already exists. - public const int ERROR_USER_EXISTS = unchecked( (int)( 1316 ) ); + public const int ERROR_USER_EXISTS = unchecked((int)(1316)); // The specified user does not exist. - public const int ERROR_NO_SUCH_USER = unchecked( (int)( 1317 ) ); + public const int ERROR_NO_SUCH_USER = unchecked((int)(1317)); // The specified group already exists. - public const int ERROR_GROUP_EXISTS = unchecked( (int)( 1318 ) ); + public const int ERROR_GROUP_EXISTS = unchecked((int)(1318)); // The specified group does not exist. - public const int ERROR_NO_SUCH_GROUP = unchecked( (int)( 1319 ) ); + public const int ERROR_NO_SUCH_GROUP = unchecked((int)(1319)); // Either the specified user account is already a member of the specified // group, or the specified group cannot be deleted because it contains // a member. - public const int ERROR_MEMBER_IN_GROUP = unchecked( (int)( 1320 ) ); + public const int ERROR_MEMBER_IN_GROUP = unchecked((int)(1320)); // The specified user account is not a member of the specified group account. - public const int ERROR_MEMBER_NOT_IN_GROUP = unchecked( (int)( 1321 ) ); + public const int ERROR_MEMBER_NOT_IN_GROUP = unchecked((int)(1321)); // The last remaining administration account cannot be disabled // or deleted. - public const int ERROR_LAST_ADMIN = unchecked( (int)( 1322 ) ); + public const int ERROR_LAST_ADMIN = unchecked((int)(1322)); // Unable to update the password. The value provided as the current // password is incorrect. - public const int ERROR_WRONG_PASSWORD = unchecked( (int)( 1323 ) ); + public const int ERROR_WRONG_PASSWORD = unchecked((int)(1323)); // Unable to update the password. The value provided for the new password // contains values that are not allowed in passwords. - public const int ERROR_ILL_FORMED_PASSWORD = unchecked( (int)( 1324 ) ); + public const int ERROR_ILL_FORMED_PASSWORD = unchecked((int)(1324)); // Unable to update the password because a password update rule has been // violated. - public const int ERROR_PASSWORD_RESTRICTION = unchecked( (int)( 1325 ) ); + public const int ERROR_PASSWORD_RESTRICTION = unchecked((int)(1325)); // Logon failure: unknown user name or bad password. - public const int ERROR_LOGON_FAILURE = unchecked( (int)( 1326 ) ); + public const int ERROR_LOGON_FAILURE = unchecked((int)(1326)); // Logon failure: user account restriction. - public const int ERROR_ACCOUNT_RESTRICTION = unchecked( (int)( 1327 ) ); + public const int ERROR_ACCOUNT_RESTRICTION = unchecked((int)(1327)); // Logon failure: account logon time restriction violation. - public const int ERROR_INVALID_LOGON_HOURS = unchecked( (int)( 1328 ) ); + public const int ERROR_INVALID_LOGON_HOURS = unchecked((int)(1328)); // Logon failure: user not allowed to log on to this computer. - public const int ERROR_INVALID_WORKSTATION = unchecked( (int)( 1329 ) ); + public const int ERROR_INVALID_WORKSTATION = unchecked((int)(1329)); // Logon failure: the specified account password has expired. - public const int ERROR_PASSWORD_EXPIRED = unchecked( (int)( 1330 ) ); + public const int ERROR_PASSWORD_EXPIRED = unchecked((int)(1330)); // Logon failure: account currently disabled. - public const int ERROR_ACCOUNT_DISABLED = unchecked( (int)( 1331 ) ); + public const int ERROR_ACCOUNT_DISABLED = unchecked((int)(1331)); // No mapping between account names and security IDs was done. - public const int ERROR_NONE_MAPPED = unchecked( (int)( 1332 ) ); + public const int ERROR_NONE_MAPPED = unchecked((int)(1332)); // Too many local user identifiers (LUIDs) were requested at one time. - public const int ERROR_TOO_MANY_LUIDS_REQUESTED = unchecked( (int)( 1333 ) ); + public const int ERROR_TOO_MANY_LUIDS_REQUESTED = unchecked((int)(1333)); // No more local user identifiers (LUIDs) are available. - public const int ERROR_LUIDS_EXHAUSTED = unchecked( (int)( 1334 ) ); + public const int ERROR_LUIDS_EXHAUSTED = unchecked((int)(1334)); // The subauthority part of a security ID is invalid for this particular use. - public const int ERROR_INVALID_SUB_AUTHORITY = unchecked( (int)( 1335 ) ); + public const int ERROR_INVALID_SUB_AUTHORITY = unchecked((int)(1335)); // The access control list (ACL) structure is invalid. - public const int ERROR_INVALID_ACL = unchecked( (int)( 1336 ) ); + public const int ERROR_INVALID_ACL = unchecked((int)(1336)); // The security ID structure is invalid. - public const int ERROR_INVALID_SID = unchecked( (int)( 1337 ) ); + public const int ERROR_INVALID_SID = unchecked((int)(1337)); // The security descriptor structure is invalid. - public const int ERROR_INVALID_SECURITY_DESCR = unchecked( (int)( 1338 ) ); + public const int ERROR_INVALID_SECURITY_DESCR = unchecked((int)(1338)); // The inherited access control list (ACL) or access control entry (ACE) // could not be built. - public const int ERROR_BAD_INHERITANCE_ACL = unchecked( (int)( 1340 ) ); + public const int ERROR_BAD_INHERITANCE_ACL = unchecked((int)(1340)); // The server is currently disabled. - public const int ERROR_SERVER_DISABLED = unchecked( (int)( 1341 ) ); + public const int ERROR_SERVER_DISABLED = unchecked((int)(1341)); // The server is currently enabled. - public const int ERROR_SERVER_NOT_DISABLED = unchecked( (int)( 1342 ) ); + public const int ERROR_SERVER_NOT_DISABLED = unchecked((int)(1342)); // The value provided was an invalid value for an identifier authority. - public const int ERROR_INVALID_ID_AUTHORITY = unchecked( (int)( 1343 ) ); + public const int ERROR_INVALID_ID_AUTHORITY = unchecked((int)(1343)); // No more memory is available for security information updates. - public const int ERROR_ALLOTTED_SPACE_EXCEEDED = unchecked( (int)( 1344 ) ); + public const int ERROR_ALLOTTED_SPACE_EXCEEDED = unchecked((int)(1344)); // The specified attributes are invalid, or incompatible with the // attributes for the group as a whole. - public const int ERROR_INVALID_GROUP_ATTRIBUTES = unchecked( (int)( 1345 ) ); + public const int ERROR_INVALID_GROUP_ATTRIBUTES = unchecked((int)(1345)); // Either a required impersonation level was not provided, or the // provided impersonation level is invalid. - public const int ERROR_BAD_IMPERSONATION_LEVEL = unchecked( (int)( 1346 ) ); + public const int ERROR_BAD_IMPERSONATION_LEVEL = unchecked((int)(1346)); // Cannot open an anonymous level security token. - public const int ERROR_CANT_OPEN_ANONYMOUS = unchecked( (int)( 1347 ) ); + public const int ERROR_CANT_OPEN_ANONYMOUS = unchecked((int)(1347)); // The validation information class requested was invalid. - public const int ERROR_BAD_VALIDATION_CLASS = unchecked( (int)( 1348 ) ); + public const int ERROR_BAD_VALIDATION_CLASS = unchecked((int)(1348)); // The type of the token is inappropriate for its attempted use. - public const int ERROR_BAD_TOKEN_TYPE = unchecked( (int)( 1349 ) ); + public const int ERROR_BAD_TOKEN_TYPE = unchecked((int)(1349)); // Unable to perform a security operation on an object // which has no associated security. - public const int ERROR_NO_SECURITY_ON_OBJECT = unchecked( (int)( 1350 ) ); + public const int ERROR_NO_SECURITY_ON_OBJECT = unchecked((int)(1350)); // Indicates a Windows NT Advanced Server could not be contacted or that // objects within the domain are protected such that necessary // information could not be retrieved. - public const int ERROR_CANT_ACCESS_DOMAIN_INFO = unchecked( (int)( 1351 ) ); + public const int ERROR_CANT_ACCESS_DOMAIN_INFO = unchecked((int)(1351)); // The security account manager (SAM) or local security // authority (LSA) server was in the wrong state to perform // the security operation. - public const int ERROR_INVALID_SERVER_STATE = unchecked( (int)( 1352 ) ); + public const int ERROR_INVALID_SERVER_STATE = unchecked((int)(1352)); // The domain was in the wrong state to perform the security operation. - public const int ERROR_INVALID_DOMAIN_STATE = unchecked( (int)( 1353 ) ); + public const int ERROR_INVALID_DOMAIN_STATE = unchecked((int)(1353)); // This operation is only allowed for the Primary Domain Controller of the domain. - public const int ERROR_INVALID_DOMAIN_ROLE = unchecked( (int)( 1354 ) ); + public const int ERROR_INVALID_DOMAIN_ROLE = unchecked((int)(1354)); // The specified domain did not exist. - public const int ERROR_NO_SUCH_DOMAIN = unchecked( (int)( 1355 ) ); + public const int ERROR_NO_SUCH_DOMAIN = unchecked((int)(1355)); // The specified domain already exists. - public const int ERROR_DOMAIN_EXISTS = unchecked( (int)( 1356 ) ); + public const int ERROR_DOMAIN_EXISTS = unchecked((int)(1356)); // An attempt was made to exceed the limit on the number of domains per server. - public const int ERROR_DOMAIN_LIMIT_EXCEEDED = unchecked( (int)( 1357 ) ); + public const int ERROR_DOMAIN_LIMIT_EXCEEDED = unchecked((int)(1357)); // Unable to complete the requested operation because of either a // catastrophic media failure or a data structure corruption on the disk. - public const int ERROR_INTERNAL_DB_CORRUPTION = unchecked( (int)( 1358 ) ); + public const int ERROR_INTERNAL_DB_CORRUPTION = unchecked((int)(1358)); // The security account database contains an internal inconsistency. - public const int ERROR_INTERNAL_ERROR = unchecked( (int)( 1359 ) ); + public const int ERROR_INTERNAL_ERROR = unchecked((int)(1359)); // Generic access types were contained in an access mask which should // already be mapped to non-generic types. - public const int ERROR_GENERIC_NOT_MAPPED = unchecked( (int)( 1360 ) ); + public const int ERROR_GENERIC_NOT_MAPPED = unchecked((int)(1360)); // A security descriptor is not in the right format (absolute or self-relative). - public const int ERROR_BAD_DESCRIPTOR_FORMAT = unchecked( (int)( 1361 ) ); + public const int ERROR_BAD_DESCRIPTOR_FORMAT = unchecked((int)(1361)); // The requested action is restricted for use by logon processes // only. The calling process has not registered as a logon process. - public const int ERROR_NOT_LOGON_PROCESS = unchecked( (int)( 1362 ) ); + public const int ERROR_NOT_LOGON_PROCESS = unchecked((int)(1362)); // Cannot start a new logon session with an ID that is already in use. - public const int ERROR_LOGON_SESSION_EXISTS = unchecked( (int)( 1363 ) ); + public const int ERROR_LOGON_SESSION_EXISTS = unchecked((int)(1363)); // A specified authentication package is unknown. - public const int ERROR_NO_SUCH_PACKAGE = unchecked( (int)( 1364 ) ); + public const int ERROR_NO_SUCH_PACKAGE = unchecked((int)(1364)); // The logon session is not in a state that is consistent with the // requested operation. - public const int ERROR_BAD_LOGON_SESSION_STATE = unchecked( (int)( 1365 ) ); + public const int ERROR_BAD_LOGON_SESSION_STATE = unchecked((int)(1365)); // The logon session ID is already in use. - public const int ERROR_LOGON_SESSION_COLLISION = unchecked( (int)( 1366 ) ); + public const int ERROR_LOGON_SESSION_COLLISION = unchecked((int)(1366)); // A logon request contained an invalid logon type value. - public const int ERROR_INVALID_LOGON_TYPE = unchecked( (int)( 1367 ) ); + public const int ERROR_INVALID_LOGON_TYPE = unchecked((int)(1367)); // Unable to impersonate via a named pipe until data has been read // from that pipe. - public const int ERROR_CANNOT_IMPERSONATE = unchecked( (int)( 1368 ) ); + public const int ERROR_CANNOT_IMPERSONATE = unchecked((int)(1368)); // The transaction state of a Registry subtree is incompatible with the // requested operation. - public const int ERROR_RXACT_INVALID_STATE = unchecked( (int)( 1369 ) ); + public const int ERROR_RXACT_INVALID_STATE = unchecked((int)(1369)); // An internal security database corruption has been encountered. - public const int ERROR_RXACT_COMMIT_FAILURE = unchecked( (int)( 1370 ) ); + public const int ERROR_RXACT_COMMIT_FAILURE = unchecked((int)(1370)); // Cannot perform this operation on built-in accounts. - public const int ERROR_SPECIAL_ACCOUNT = unchecked( (int)( 1371 ) ); + public const int ERROR_SPECIAL_ACCOUNT = unchecked((int)(1371)); // Cannot perform this operation on this built-in special group. - public const int ERROR_SPECIAL_GROUP = unchecked( (int)( 1372 ) ); + public const int ERROR_SPECIAL_GROUP = unchecked((int)(1372)); // Cannot perform this operation on this built-in special user. - public const int ERROR_SPECIAL_USER = unchecked( (int)( 1373 ) ); + public const int ERROR_SPECIAL_USER = unchecked((int)(1373)); // The user cannot be removed from a group because the group // is currently the user's primary group. - public const int ERROR_MEMBERS_PRIMARY_GROUP = unchecked( (int)( 1374 ) ); + public const int ERROR_MEMBERS_PRIMARY_GROUP = unchecked((int)(1374)); // The token is already in use as a primary token. - public const int ERROR_TOKEN_ALREADY_IN_USE = unchecked( (int)( 1375 ) ); + public const int ERROR_TOKEN_ALREADY_IN_USE = unchecked((int)(1375)); // The specified local group does not exist. - public const int ERROR_NO_SUCH_ALIAS = unchecked( (int)( 1376 ) ); + public const int ERROR_NO_SUCH_ALIAS = unchecked((int)(1376)); // The specified account name is not a member of the local group. - public const int ERROR_MEMBER_NOT_IN_ALIAS = unchecked( (int)( 1377 ) ); + public const int ERROR_MEMBER_NOT_IN_ALIAS = unchecked((int)(1377)); // The specified account name is already a member of the local group. - public const int ERROR_MEMBER_IN_ALIAS = unchecked( (int)( 1378 ) ); + public const int ERROR_MEMBER_IN_ALIAS = unchecked((int)(1378)); // The specified local group already exists. - public const int ERROR_ALIAS_EXISTS = unchecked( (int)( 1379 ) ); + public const int ERROR_ALIAS_EXISTS = unchecked((int)(1379)); // Logon failure: the user has not been granted the requested // logon type at this computer. - public const int ERROR_LOGON_NOT_GRANTED = unchecked( (int)( 1380 ) ); + public const int ERROR_LOGON_NOT_GRANTED = unchecked((int)(1380)); // The maximum number of secrets that may be stored in a single system has been // exceeded. - public const int ERROR_TOO_MANY_SECRETS = unchecked( (int)( 1381 ) ); + public const int ERROR_TOO_MANY_SECRETS = unchecked((int)(1381)); // The length of a secret exceeds the maximum length allowed. - public const int ERROR_SECRET_TOO_LONG = unchecked( (int)( 1382 ) ); + public const int ERROR_SECRET_TOO_LONG = unchecked((int)(1382)); // The local security authority database contains an internal inconsistency. - public const int ERROR_INTERNAL_DB_ERROR = unchecked( (int)( 1383 ) ); + public const int ERROR_INTERNAL_DB_ERROR = unchecked((int)(1383)); // During a logon attempt, the user's security context accumulated too many // security IDs. - public const int ERROR_TOO_MANY_CONTEXT_IDS = unchecked( (int)( 1384 ) ); + public const int ERROR_TOO_MANY_CONTEXT_IDS = unchecked((int)(1384)); // Logon failure: the user has not been granted the requested logon type // at this computer. - public const int ERROR_LOGON_TYPE_NOT_GRANTED = unchecked( (int)( 1385 ) ); + public const int ERROR_LOGON_TYPE_NOT_GRANTED = unchecked((int)(1385)); // A cross-encrypted password is necessary to change a user password. - public const int ERROR_NT_CROSS_ENCRYPTION_REQUIRED = unchecked( (int)( 1386 ) ); + public const int ERROR_NT_CROSS_ENCRYPTION_REQUIRED = unchecked((int)(1386)); // A new member could not be added to a local group because the member does // not exist. - public const int ERROR_NO_SUCH_MEMBER = unchecked( (int)( 1387 ) ); + public const int ERROR_NO_SUCH_MEMBER = unchecked((int)(1387)); // A new member could not be added to a local group because the member has the // wrong account type. - public const int ERROR_INVALID_MEMBER = unchecked( (int)( 1388 ) ); + public const int ERROR_INVALID_MEMBER = unchecked((int)(1388)); // Too many security IDs have been specified. - public const int ERROR_TOO_MANY_SIDS = unchecked( (int)( 1389 ) ); + public const int ERROR_TOO_MANY_SIDS = unchecked((int)(1389)); // A cross-encrypted password is necessary to change this user password. - public const int ERROR_LM_CROSS_ENCRYPTION_REQUIRED = unchecked( (int)( 1390 ) ); + public const int ERROR_LM_CROSS_ENCRYPTION_REQUIRED = unchecked((int)(1390)); // Indicates an ACL contains no inheritable components - public const int ERROR_NO_INHERITANCE = unchecked( (int)( 1391 ) ); + public const int ERROR_NO_INHERITANCE = unchecked((int)(1391)); // The file or directory is corrupt and non-readable. - public const int ERROR_FILE_CORRUPT = unchecked( (int)( 1392 ) ); + public const int ERROR_FILE_CORRUPT = unchecked((int)(1392)); // The disk structure is corrupt and non-readable. - public const int ERROR_DISK_CORRUPT = unchecked( (int)( 1393 ) ); + public const int ERROR_DISK_CORRUPT = unchecked((int)(1393)); // There is no user session key for the specified logon session. - public const int ERROR_NO_USER_SESSION_KEY = unchecked( (int)( 1394 ) ); + public const int ERROR_NO_USER_SESSION_KEY = unchecked((int)(1394)); // End of security error codes @@ -12739,157 +12739,157 @@ public struct MONCONVSTRUCT // ///////////////////////// // Invalid window handle. - public const int ERROR_INVALID_WINDOW_HANDLE = unchecked( (int)( 1400 ) ); + public const int ERROR_INVALID_WINDOW_HANDLE = unchecked((int)(1400)); // Invalid menu handle. - public const int ERROR_INVALID_MENU_HANDLE = unchecked( (int)( 1401 ) ); + public const int ERROR_INVALID_MENU_HANDLE = unchecked((int)(1401)); // Invalid cursor handle. - public const int ERROR_INVALID_CURSOR_HANDLE = unchecked( (int)( 1402 ) ); + public const int ERROR_INVALID_CURSOR_HANDLE = unchecked((int)(1402)); // Invalid accelerator table handle. - public const int ERROR_INVALID_ACCEL_HANDLE = unchecked( (int)( 1403 ) ); + public const int ERROR_INVALID_ACCEL_HANDLE = unchecked((int)(1403)); // Invalid hook handle. - public const int ERROR_INVALID_HOOK_HANDLE = unchecked( (int)( 1404 ) ); + public const int ERROR_INVALID_HOOK_HANDLE = unchecked((int)(1404)); // Invalid handle to a multiple-window position structure. - public const int ERROR_INVALID_DWP_HANDLE = unchecked( (int)( 1405 ) ); + public const int ERROR_INVALID_DWP_HANDLE = unchecked((int)(1405)); // Cannot create a top-level child window. - public const int ERROR_TLW_WITH_WSCHILD = unchecked( (int)( 1406 ) ); + public const int ERROR_TLW_WITH_WSCHILD = unchecked((int)(1406)); // Cannot find window class. - public const int ERROR_CANNOT_FIND_WND_CLASS = unchecked( (int)( 1407 ) ); + public const int ERROR_CANNOT_FIND_WND_CLASS = unchecked((int)(1407)); // Invalid window, belongs to other thread. - public const int ERROR_WINDOW_OF_OTHER_THREAD = unchecked( (int)( 1408 ) ); + public const int ERROR_WINDOW_OF_OTHER_THREAD = unchecked((int)(1408)); // Hot key is already registered. - public const int ERROR_HOTKEY_ALREADY_REGISTERED = unchecked( (int)( 1409 ) ); + public const int ERROR_HOTKEY_ALREADY_REGISTERED = unchecked((int)(1409)); // Class already exists. - public const int ERROR_CLASS_ALREADY_EXISTS = unchecked( (int)( 1410 ) ); + public const int ERROR_CLASS_ALREADY_EXISTS = unchecked((int)(1410)); // Class does not exist. - public const int ERROR_CLASS_DOES_NOT_EXIST = unchecked( (int)( 1411 ) ); + public const int ERROR_CLASS_DOES_NOT_EXIST = unchecked((int)(1411)); // Class still has open windows. - public const int ERROR_CLASS_HAS_WINDOWS = unchecked( (int)( 1412 ) ); + public const int ERROR_CLASS_HAS_WINDOWS = unchecked((int)(1412)); // Invalid index. - public const int ERROR_INVALID_INDEX = unchecked( (int)( 1413 ) ); + public const int ERROR_INVALID_INDEX = unchecked((int)(1413)); // Invalid icon handle. - public const int ERROR_INVALID_ICON_HANDLE = unchecked( (int)( 1414 ) ); + public const int ERROR_INVALID_ICON_HANDLE = unchecked((int)(1414)); // Using private DIALOG window words. - public const int ERROR_PRIVATE_DIALOG_INDEX = unchecked( (int)( 1415 ) ); + public const int ERROR_PRIVATE_DIALOG_INDEX = unchecked((int)(1415)); // The listbox identifier was not found. - public const int ERROR_LISTBOX_ID_NOT_FOUND = unchecked( (int)( 1416 ) ); + public const int ERROR_LISTBOX_ID_NOT_FOUND = unchecked((int)(1416)); // No wildcards were found. - public const int ERROR_NO_WILDCARD_CHARACTERS = unchecked( (int)( 1417 ) ); + public const int ERROR_NO_WILDCARD_CHARACTERS = unchecked((int)(1417)); // Thread does not have a clipboard open. - public const int ERROR_CLIPBOARD_NOT_OPEN = unchecked( (int)( 1418 ) ); + public const int ERROR_CLIPBOARD_NOT_OPEN = unchecked((int)(1418)); // Hot key is not registered. - public const int ERROR_HOTKEY_NOT_REGISTERED = unchecked( (int)( 1419 ) ); + public const int ERROR_HOTKEY_NOT_REGISTERED = unchecked((int)(1419)); // The window is not a valid dialog window. - public const int ERROR_WINDOW_NOT_DIALOG = unchecked( (int)( 1420 ) ); + public const int ERROR_WINDOW_NOT_DIALOG = unchecked((int)(1420)); // Control ID not found. - public const int ERROR_CONTROL_ID_NOT_FOUND = unchecked( (int)( 1421 ) ); + public const int ERROR_CONTROL_ID_NOT_FOUND = unchecked((int)(1421)); // Invalid message for a combo box because it does not have an edit control. - public const int ERROR_INVALID_COMBOBOX_MESSAGE = unchecked( (int)( 1422 ) ); + public const int ERROR_INVALID_COMBOBOX_MESSAGE = unchecked((int)(1422)); // The window is not a combo box. - public const int ERROR_WINDOW_NOT_COMBOBOX = unchecked( (int)( 1423 ) ); + public const int ERROR_WINDOW_NOT_COMBOBOX = unchecked((int)(1423)); // Height must be less than 256. - public const int ERROR_INVALID_EDIT_HEIGHT = unchecked( (int)( 1424 ) ); + public const int ERROR_INVALID_EDIT_HEIGHT = unchecked((int)(1424)); // Invalid device context (DC) handle. - public const int ERROR_DC_NOT_FOUND = unchecked( (int)( 1425 ) ); + public const int ERROR_DC_NOT_FOUND = unchecked((int)(1425)); // Invalid hook procedure type. - public const int ERROR_INVALID_HOOK_FILTER = unchecked( (int)( 1426 ) ); + public const int ERROR_INVALID_HOOK_FILTER = unchecked((int)(1426)); // Invalid hook procedure. - public const int ERROR_INVALID_FILTER_PROC = unchecked( (int)( 1427 ) ); + public const int ERROR_INVALID_FILTER_PROC = unchecked((int)(1427)); // Cannot set non-local hook without a module handle. - public const int ERROR_HOOK_NEEDS_HMOD = unchecked( (int)( 1428 ) ); + public const int ERROR_HOOK_NEEDS_HMOD = unchecked((int)(1428)); // This hook procedure can only be set Globally. // - public const int ERROR_PUBLIC_ONLY_HOOK = unchecked( (int)( 1429 ) ); + public const int ERROR_PUBLIC_ONLY_HOOK = unchecked((int)(1429)); // The journal hook procedure is already installed. - public const int ERROR_JOURNAL_HOOK_SET = unchecked( (int)( 1430 ) ); + public const int ERROR_JOURNAL_HOOK_SET = unchecked((int)(1430)); // The hook procedure is not installed. - public const int ERROR_HOOK_NOT_INSTALLED = unchecked( (int)( 1431 ) ); + public const int ERROR_HOOK_NOT_INSTALLED = unchecked((int)(1431)); // Invalid message for single-selection listbox. - public const int ERROR_INVALID_LB_MESSAGE = unchecked( (int)( 1432 ) ); + public const int ERROR_INVALID_LB_MESSAGE = unchecked((int)(1432)); // LB_SETCOUNT sent to non-lazy listbox. - public const int ERROR_SETCOUNT_ON_BAD_LB = unchecked( (int)( 1433 ) ); + public const int ERROR_SETCOUNT_ON_BAD_LB = unchecked((int)(1433)); // This list box does not support tab stops. - public const int ERROR_LB_WITHOUT_TABSTOPS = unchecked( (int)( 1434 ) ); + public const int ERROR_LB_WITHOUT_TABSTOPS = unchecked((int)(1434)); // Cannot destroy object created by another thread. - public const int ERROR_DESTROY_OBJECT_OF_OTHER_THREAD = unchecked( (int)( 1435 ) ); + public const int ERROR_DESTROY_OBJECT_OF_OTHER_THREAD = unchecked((int)(1435)); // Child windows cannot have menus. - public const int ERROR_CHILD_WINDOW_MENU = unchecked( (int)( 1436 ) ); + public const int ERROR_CHILD_WINDOW_MENU = unchecked((int)(1436)); // The window does not have a system menu. - public const int ERROR_NO_SYSTEM_MENU = unchecked( (int)( 1437 ) ); + public const int ERROR_NO_SYSTEM_MENU = unchecked((int)(1437)); // Invalid message box style. - public const int ERROR_INVALID_MSGBOX_STYLE = unchecked( (int)( 1438 ) ); + public const int ERROR_INVALID_MSGBOX_STYLE = unchecked((int)(1438)); // Invalid system-wide (SPI_) parameter. - public const int ERROR_INVALID_SPI_VALUE = unchecked( (int)( 1439 ) ); + public const int ERROR_INVALID_SPI_VALUE = unchecked((int)(1439)); // Screen already locked. - public const int ERROR_SCREEN_ALREADY_LOCKED = unchecked( (int)( 1440 ) ); + public const int ERROR_SCREEN_ALREADY_LOCKED = unchecked((int)(1440)); // All handles to windows in a multiple-window position structure must // have the same parent. - public const int ERROR_HWNDS_HAVE_DIFF_PARENT = unchecked( (int)( 1441 ) ); + public const int ERROR_HWNDS_HAVE_DIFF_PARENT = unchecked((int)(1441)); // The window is not a child window. - public const int ERROR_NOT_CHILD_WINDOW = unchecked( (int)( 1442 ) ); + public const int ERROR_NOT_CHILD_WINDOW = unchecked((int)(1442)); // Invalid GW_ command. - public const int ERROR_INVALID_GW_COMMAND = unchecked( (int)( 1443 ) ); + public const int ERROR_INVALID_GW_COMMAND = unchecked((int)(1443)); // Invalid thread identifier. - public const int ERROR_INVALID_THREAD_ID = unchecked( (int)( 1444 ) ); + public const int ERROR_INVALID_THREAD_ID = unchecked((int)(1444)); // Cannot process a message from a window that is not a multiple document // interface (MDI) window. - public const int ERROR_NON_MDICHILD_WINDOW = unchecked( (int)( 1445 ) ); + public const int ERROR_NON_MDICHILD_WINDOW = unchecked((int)(1445)); // Popup menu already active. - public const int ERROR_POPUP_ALREADY_ACTIVE = unchecked( (int)( 1446 ) ); + public const int ERROR_POPUP_ALREADY_ACTIVE = unchecked((int)(1446)); // The window does not have scroll bars. - public const int ERROR_NO_SCROLLBARS = unchecked( (int)( 1447 ) ); + public const int ERROR_NO_SCROLLBARS = unchecked((int)(1447)); // Scroll bar range cannot be greater than 0x7FFF. - public const int ERROR_INVALID_SCROLLBAR_RANGE = unchecked( (int)( 1448 ) ); + public const int ERROR_INVALID_SCROLLBAR_RANGE = unchecked((int)(1448)); // Cannot show or remove the window in the way specified. - public const int ERROR_INVALID_SHOWWIN_COMMAND = unchecked( (int)( 1449 ) ); + public const int ERROR_INVALID_SHOWWIN_COMMAND = unchecked((int)(1449)); // End of WinUser error codes @@ -12901,16 +12901,16 @@ public struct MONCONVSTRUCT // ///////////////////////// // The event log file is corrupt. - public const int ERROR_EVENTLOG_FILE_CORRUPT = unchecked( (int)( 1500 ) ); + public const int ERROR_EVENTLOG_FILE_CORRUPT = unchecked((int)(1500)); // No event log file could be opened, so the event logging service did not start. - public const int ERROR_EVENTLOG_CANT_START = unchecked( (int)( 1501 ) ); + public const int ERROR_EVENTLOG_CANT_START = unchecked((int)(1501)); // The event log file is full. - public const int ERROR_LOG_FILE_FULL = unchecked( (int)( 1502 ) ); + public const int ERROR_LOG_FILE_FULL = unchecked((int)(1502)); // The event log file has changed between reads. - public const int ERROR_EVENTLOG_FILE_CHANGED = unchecked( (int)( 1503 ) ); + public const int ERROR_EVENTLOG_FILE_CHANGED = unchecked((int)(1503)); // End of eventlog error codes @@ -12922,382 +12922,382 @@ public struct MONCONVSTRUCT // ///////////////////////// // The string binding is invalid. - public const int RPC_S_INVALID_STRING_BINDING = unchecked( (int)( 1700 ) ); + public const int RPC_S_INVALID_STRING_BINDING = unchecked((int)(1700)); // The binding handle is not the correct type. - public const int RPC_S_WRONG_KIND_OF_BINDING = unchecked( (int)( 1701 ) ); + public const int RPC_S_WRONG_KIND_OF_BINDING = unchecked((int)(1701)); // The binding handle is invalid. - public const int RPC_S_INVALID_BINDING = unchecked( (int)( 1702 ) ); + public const int RPC_S_INVALID_BINDING = unchecked((int)(1702)); // The RPC protocol sequence is not supported. - public const int RPC_S_PROTSEQ_NOT_SUPPORTED = unchecked( (int)( 1703 ) ); + public const int RPC_S_PROTSEQ_NOT_SUPPORTED = unchecked((int)(1703)); // The RPC protocol sequence is invalid. - public const int RPC_S_INVALID_RPC_PROTSEQ = unchecked( (int)( 1704 ) ); + public const int RPC_S_INVALID_RPC_PROTSEQ = unchecked((int)(1704)); // The string universal unique identifier (UUID) is invalid. - public const int RPC_S_INVALID_STRING_UUID = unchecked( (int)( 1705 ) ); + public const int RPC_S_INVALID_STRING_UUID = unchecked((int)(1705)); // The endpoint format is invalid. - public const int RPC_S_INVALID_ENDPOINT_FORMAT = unchecked( (int)( 1706 ) ); + public const int RPC_S_INVALID_ENDPOINT_FORMAT = unchecked((int)(1706)); // The network address is invalid. - public const int RPC_S_INVALID_NET_ADDR = unchecked( (int)( 1707 ) ); + public const int RPC_S_INVALID_NET_ADDR = unchecked((int)(1707)); // No endpoint was found. - public const int RPC_S_NO_ENDPOINT_FOUND = unchecked( (int)( 1708 ) ); + public const int RPC_S_NO_ENDPOINT_FOUND = unchecked((int)(1708)); // The timeout value is invalid. - public const int RPC_S_INVALID_TIMEOUT = unchecked( (int)( 1709 ) ); + public const int RPC_S_INVALID_TIMEOUT = unchecked((int)(1709)); // The object universal unique identifier (UUID) was not found. - public const int RPC_S_OBJECT_NOT_FOUND = unchecked( (int)( 1710 ) ); + public const int RPC_S_OBJECT_NOT_FOUND = unchecked((int)(1710)); // The object universal unique identifier (UUID) has already been registered. - public const int RPC_S_ALREADY_REGISTERED = unchecked( (int)( 1711 ) ); + public const int RPC_S_ALREADY_REGISTERED = unchecked((int)(1711)); // The type universal unique identifier (UUID) has already been registered. - public const int RPC_S_TYPE_ALREADY_REGISTERED = unchecked( (int)( 1712 ) ); + public const int RPC_S_TYPE_ALREADY_REGISTERED = unchecked((int)(1712)); // The RPC server is already listening. - public const int RPC_S_ALREADY_LISTENING = unchecked( (int)( 1713 ) ); + public const int RPC_S_ALREADY_LISTENING = unchecked((int)(1713)); // No protocol sequences have been registered. - public const int RPC_S_NO_PROTSEQS_REGISTERED = unchecked( (int)( 1714 ) ); + public const int RPC_S_NO_PROTSEQS_REGISTERED = unchecked((int)(1714)); // The RPC server is not listening. - public const int RPC_S_NOT_LISTENING = unchecked( (int)( 1715 ) ); + public const int RPC_S_NOT_LISTENING = unchecked((int)(1715)); // The manager type is unknown. - public const int RPC_S_UNKNOWN_MGR_TYPE = unchecked( (int)( 1716 ) ); + public const int RPC_S_UNKNOWN_MGR_TYPE = unchecked((int)(1716)); // The interface is unknown. - public const int RPC_S_UNKNOWN_IF = unchecked( (int)( 1717 ) ); + public const int RPC_S_UNKNOWN_IF = unchecked((int)(1717)); // There are no bindings. - public const int RPC_S_NO_BINDINGS = unchecked( (int)( 1718 ) ); + public const int RPC_S_NO_BINDINGS = unchecked((int)(1718)); // There are no protocol sequences. - public const int RPC_S_NO_PROTSEQS = unchecked( (int)( 1719 ) ); + public const int RPC_S_NO_PROTSEQS = unchecked((int)(1719)); // The endpoint cannot be created. - public const int RPC_S_CANT_CREATE_ENDPOINT = unchecked( (int)( 1720 ) ); + public const int RPC_S_CANT_CREATE_ENDPOINT = unchecked((int)(1720)); // Not enough resources are available to complete this operation. - public const int RPC_S_OUT_OF_RESOURCES = unchecked( (int)( 1721 ) ); + public const int RPC_S_OUT_OF_RESOURCES = unchecked((int)(1721)); // The RPC server is unavailable. - public const int RPC_S_SERVER_UNAVAILABLE = unchecked( (int)( 1722 ) ); + public const int RPC_S_SERVER_UNAVAILABLE = unchecked((int)(1722)); // The RPC server is too busy to complete this operation. - public const int RPC_S_SERVER_TOO_BUSY = unchecked( (int)( 1723 ) ); + public const int RPC_S_SERVER_TOO_BUSY = unchecked((int)(1723)); // The network options are invalid. - public const int RPC_S_INVALID_NETWORK_OPTIONS = unchecked( (int)( 1724 ) ); + public const int RPC_S_INVALID_NETWORK_OPTIONS = unchecked((int)(1724)); // There is not a remote procedure call active in this thread. - public const int RPC_S_NO_CALL_ACTIVE = unchecked( (int)( 1725 ) ); + public const int RPC_S_NO_CALL_ACTIVE = unchecked((int)(1725)); // The remote procedure call failed. - public const int RPC_S_CALL_FAILED = unchecked( (int)( 1726 ) ); + public const int RPC_S_CALL_FAILED = unchecked((int)(1726)); // The remote procedure call failed and did not execute. - public const int RPC_S_CALL_FAILED_DNE = unchecked( (int)( 1727 ) ); + public const int RPC_S_CALL_FAILED_DNE = unchecked((int)(1727)); // A remote procedure call (RPC) protocol error occurred. - public const int RPC_S_PROTOCOL_ERROR = unchecked( (int)( 1728 ) ); + public const int RPC_S_PROTOCOL_ERROR = unchecked((int)(1728)); // The transfer syntax is not supported by the RPC server. - public const int RPC_S_UNSUPPORTED_TRANS_SYN = unchecked( (int)( 1730 ) ); + public const int RPC_S_UNSUPPORTED_TRANS_SYN = unchecked((int)(1730)); // The universal unique identifier (UUID) type is not supported. - public const int RPC_S_UNSUPPORTED_TYPE = unchecked( (int)( 1732 ) ); + public const int RPC_S_UNSUPPORTED_TYPE = unchecked((int)(1732)); // The tag is invalid. - public const int RPC_S_INVALID_TAG = unchecked( (int)( 1733 ) ); + public const int RPC_S_INVALID_TAG = unchecked((int)(1733)); // The array bounds are invalid. - public const int RPC_S_INVALID_BOUND = unchecked( (int)( 1734 ) ); + public const int RPC_S_INVALID_BOUND = unchecked((int)(1734)); // The binding does not contain an entry name. - public const int RPC_S_NO_ENTRY_NAME = unchecked( (int)( 1735 ) ); + public const int RPC_S_NO_ENTRY_NAME = unchecked((int)(1735)); // The name syntax is invalid. - public const int RPC_S_INVALID_NAME_SYNTAX = unchecked( (int)( 1736 ) ); + public const int RPC_S_INVALID_NAME_SYNTAX = unchecked((int)(1736)); // The name syntax is not supported. - public const int RPC_S_UNSUPPORTED_NAME_SYNTAX = unchecked( (int)( 1737 ) ); + public const int RPC_S_UNSUPPORTED_NAME_SYNTAX = unchecked((int)(1737)); // No network address is available to use to construct a universal // unique identifier (UUID). - public const int RPC_S_UUID_NO_ADDRESS = unchecked( (int)( 1739 ) ); + public const int RPC_S_UUID_NO_ADDRESS = unchecked((int)(1739)); // The endpoint is a duplicate. - public const int RPC_S_DUPLICATE_ENDPOINT = unchecked( (int)( 1740 ) ); + public const int RPC_S_DUPLICATE_ENDPOINT = unchecked((int)(1740)); // The authentication type is unknown. - public const int RPC_S_UNKNOWN_AUTHN_TYPE = unchecked( (int)( 1741 ) ); + public const int RPC_S_UNKNOWN_AUTHN_TYPE = unchecked((int)(1741)); // The maximum number of calls is too small. - public const int RPC_S_MAX_CALLS_TOO_SMALL = unchecked( (int)( 1742 ) ); + public const int RPC_S_MAX_CALLS_TOO_SMALL = unchecked((int)(1742)); // The string is too long. - public const int RPC_S_STRING_TOO_LONG = unchecked( (int)( 1743 ) ); + public const int RPC_S_STRING_TOO_LONG = unchecked((int)(1743)); // The RPC protocol sequence was not found. - public const int RPC_S_PROTSEQ_NOT_FOUND = unchecked( (int)( 1744 ) ); + public const int RPC_S_PROTSEQ_NOT_FOUND = unchecked((int)(1744)); // The procedure number is out of range. - public const int RPC_S_PROCNUM_OUT_OF_RANGE = unchecked( (int)( 1745 ) ); + public const int RPC_S_PROCNUM_OUT_OF_RANGE = unchecked((int)(1745)); // The binding does not contain any authentication information. - public const int RPC_S_BINDING_HAS_NO_AUTH = unchecked( (int)( 1746 ) ); + public const int RPC_S_BINDING_HAS_NO_AUTH = unchecked((int)(1746)); // The authentication service is unknown. - public const int RPC_S_UNKNOWN_AUTHN_SERVICE = unchecked( (int)( 1747 ) ); + public const int RPC_S_UNKNOWN_AUTHN_SERVICE = unchecked((int)(1747)); // The authentication level is unknown. - public const int RPC_S_UNKNOWN_AUTHN_LEVEL = unchecked( (int)( 1748 ) ); + public const int RPC_S_UNKNOWN_AUTHN_LEVEL = unchecked((int)(1748)); // The security context is invalid. - public const int RPC_S_INVALID_AUTH_IDENTITY = unchecked( (int)( 1749 ) ); + public const int RPC_S_INVALID_AUTH_IDENTITY = unchecked((int)(1749)); // The authorization service is unknown. - public const int RPC_S_UNKNOWN_AUTHZ_SERVICE = unchecked( (int)( 1750 ) ); + public const int RPC_S_UNKNOWN_AUTHZ_SERVICE = unchecked((int)(1750)); // The entry is invalid. - public const int EPT_S_INVALID_ENTRY = unchecked( (int)( 1751 ) ); + public const int EPT_S_INVALID_ENTRY = unchecked((int)(1751)); // The server endpoint cannot perform the operation. - public const int EPT_S_CANT_PERFORM_OP = unchecked( (int)( 1752 ) ); + public const int EPT_S_CANT_PERFORM_OP = unchecked((int)(1752)); // There are no more endpoints available from the endpoint mapper. - public const int EPT_S_NOT_REGISTERED = unchecked( (int)( 1753 ) ); + public const int EPT_S_NOT_REGISTERED = unchecked((int)(1753)); // No interfaces have been exported. - public const int RPC_S_NOTHING_TO_EXPORT = unchecked( (int)( 1754 ) ); + public const int RPC_S_NOTHING_TO_EXPORT = unchecked((int)(1754)); // The entry name is incomplete. - public const int RPC_S_INCOMPLETE_NAME = unchecked( (int)( 1755 ) ); + public const int RPC_S_INCOMPLETE_NAME = unchecked((int)(1755)); // The version option is invalid. - public const int RPC_S_INVALID_VERS_OPTION = unchecked( (int)( 1756 ) ); + public const int RPC_S_INVALID_VERS_OPTION = unchecked((int)(1756)); // There are no more members. - public const int RPC_S_NO_MORE_MEMBERS = unchecked( (int)( 1757 ) ); + public const int RPC_S_NO_MORE_MEMBERS = unchecked((int)(1757)); // There is nothing to unexport. - public const int RPC_S_NOT_ALL_OBJS_UNEXPORTED = unchecked( (int)( 1758 ) ); + public const int RPC_S_NOT_ALL_OBJS_UNEXPORTED = unchecked((int)(1758)); // The interface was not found. - public const int RPC_S_INTERFACE_NOT_FOUND = unchecked( (int)( 1759 ) ); + public const int RPC_S_INTERFACE_NOT_FOUND = unchecked((int)(1759)); // The entry already exists. - public const int RPC_S_ENTRY_ALREADY_EXISTS = unchecked( (int)( 1760 ) ); + public const int RPC_S_ENTRY_ALREADY_EXISTS = unchecked((int)(1760)); // The entry is not found. - public const int RPC_S_ENTRY_NOT_FOUND = unchecked( (int)( 1761 ) ); + public const int RPC_S_ENTRY_NOT_FOUND = unchecked((int)(1761)); // The name service is unavailable. - public const int RPC_S_NAME_SERVICE_UNAVAILABLE = unchecked( (int)( 1762 ) ); + public const int RPC_S_NAME_SERVICE_UNAVAILABLE = unchecked((int)(1762)); // The network address family is invalid. - public const int RPC_S_INVALID_NAF_ID = unchecked( (int)( 1763 ) ); + public const int RPC_S_INVALID_NAF_ID = unchecked((int)(1763)); // The requested operation is not supported. - public const int RPC_S_CANNOT_SUPPORT = unchecked( (int)( 1764 ) ); + public const int RPC_S_CANNOT_SUPPORT = unchecked((int)(1764)); // No security context is available to allow impersonation. - public const int RPC_S_NO_CONTEXT_AVAILABLE = unchecked( (int)( 1765 ) ); + public const int RPC_S_NO_CONTEXT_AVAILABLE = unchecked((int)(1765)); // An internal error occurred in a remote procedure call (RPC). - public const int RPC_S_INTERNAL_ERROR = unchecked( (int)( 1766 ) ); + public const int RPC_S_INTERNAL_ERROR = unchecked((int)(1766)); // The RPC server attempted an integer division by zero.' - public const int RPC_S_ZERO_DIVIDE = unchecked( (int)( 1767 ) ); + public const int RPC_S_ZERO_DIVIDE = unchecked((int)(1767)); // An addressing error occurred in the RPC server. - public const int RPC_S_ADDRESS_ERROR = unchecked( (int)( 1768 ) ); + public const int RPC_S_ADDRESS_ERROR = unchecked((int)(1768)); // A floating-point operation at the RPC server caused a division by zero. - public const int RPC_S_FP_DIV_ZERO = unchecked( (int)( 1769 ) ); + public const int RPC_S_FP_DIV_ZERO = unchecked((int)(1769)); // A floating-point underflow occurred at the RPC server. - public const int RPC_S_FP_UNDERFLOW = unchecked( (int)( 1770 ) ); + public const int RPC_S_FP_UNDERFLOW = unchecked((int)(1770)); // A floating-point overflow occurred at the RPC server. - public const int RPC_S_FP_OVERFLOW = unchecked( (int)( 1771 ) ); + public const int RPC_S_FP_OVERFLOW = unchecked((int)(1771)); // The list of RPC servers available for the binding of auto handles // has been exhausted. - public const int RPC_X_NO_MORE_ENTRIES = unchecked( (int)( 1772 ) ); + public const int RPC_X_NO_MORE_ENTRIES = unchecked((int)(1772)); // Unable to open the character translation table file. - public const int RPC_X_SS_CHAR_TRANS_OPEN_FAIL = unchecked( (int)( 1773 ) ); + public const int RPC_X_SS_CHAR_TRANS_OPEN_FAIL = unchecked((int)(1773)); // The file containing the character translation table has fewer than // 512 bytes. - public const int RPC_X_SS_CHAR_TRANS_SHORT_FILE = unchecked( (int)( 1774 ) ); + public const int RPC_X_SS_CHAR_TRANS_SHORT_FILE = unchecked((int)(1774)); // A null context handle was passed from the client to the host during // a remote procedure call. - public const int RPC_X_SS_IN_NULL_CONTEXT = unchecked( (int)( 1775 ) ); + public const int RPC_X_SS_IN_NULL_CONTEXT = unchecked((int)(1775)); // The context handle changed during a remote procedure call. - public const int RPC_X_SS_CONTEXT_DAMAGED = unchecked( (int)( 1777 ) ); + public const int RPC_X_SS_CONTEXT_DAMAGED = unchecked((int)(1777)); // The binding handles passed to a remote procedure call do not match. - public const int RPC_X_SS_HANDLES_MISMATCH = unchecked( (int)( 1778 ) ); + public const int RPC_X_SS_HANDLES_MISMATCH = unchecked((int)(1778)); // The stub is unable to get the remote procedure call handle. - public const int RPC_X_SS_CANNOT_GET_CALL_HANDLE = unchecked( (int)( 1779 ) ); + public const int RPC_X_SS_CANNOT_GET_CALL_HANDLE = unchecked((int)(1779)); // A null reference pointer was passed to the stub. - public const int RPC_X_NULL_REF_POINTER = unchecked( (int)( 1780 ) ); + public const int RPC_X_NULL_REF_POINTER = unchecked((int)(1780)); // The enumeration value is out of range. - public const int RPC_X_ENUM_VALUE_OUT_OF_RANGE = unchecked( (int)( 1781 ) ); + public const int RPC_X_ENUM_VALUE_OUT_OF_RANGE = unchecked((int)(1781)); // The byte count is too small. - public const int RPC_X_BYTE_COUNT_TOO_SMALL = unchecked( (int)( 1782 ) ); + public const int RPC_X_BYTE_COUNT_TOO_SMALL = unchecked((int)(1782)); // The stub received bad data. - public const int RPC_X_BAD_STUB_DATA = unchecked( (int)( 1783 ) ); + public const int RPC_X_BAD_STUB_DATA = unchecked((int)(1783)); // The supplied user buffer is not valid for the requested operation. - public const int ERROR_INVALID_USER_BUFFER = unchecked( (int)( 1784 ) ); + public const int ERROR_INVALID_USER_BUFFER = unchecked((int)(1784)); // The disk media is not recognized. It may not be formatted. - public const int ERROR_UNRECOGNIZED_MEDIA = unchecked( (int)( 1785 ) ); + public const int ERROR_UNRECOGNIZED_MEDIA = unchecked((int)(1785)); // The workstation does not have a trust secret. - public const int ERROR_NO_TRUST_LSA_SECRET = unchecked( (int)( 1786 ) ); + public const int ERROR_NO_TRUST_LSA_SECRET = unchecked((int)(1786)); // The SAM database on the Windows NT Advanced Server does not have a computer // account for this workstation trust relationship. - public const int ERROR_NO_TRUST_SAM_ACCOUNT = unchecked( (int)( 1787 ) ); + public const int ERROR_NO_TRUST_SAM_ACCOUNT = unchecked((int)(1787)); // The trust relationship between the primary domain and the trusted // domain failed. - public const int ERROR_TRUSTED_DOMAIN_FAILURE = unchecked( (int)( 1788 ) ); + public const int ERROR_TRUSTED_DOMAIN_FAILURE = unchecked((int)(1788)); // The trust relationship between this workstation and the primary // domain failed. - public const int ERROR_TRUSTED_RELATIONSHIP_FAILURE = unchecked( (int)( 1789 ) ); + public const int ERROR_TRUSTED_RELATIONSHIP_FAILURE = unchecked((int)(1789)); // The network logon failed. - public const int ERROR_TRUST_FAILURE = unchecked( (int)( 1790 ) ); + public const int ERROR_TRUST_FAILURE = unchecked((int)(1790)); // A remote procedure call is already in progress for this thread. - public const int RPC_S_CALL_IN_PROGRESS = unchecked( (int)( 1791 ) ); + public const int RPC_S_CALL_IN_PROGRESS = unchecked((int)(1791)); // An attempt was made to logon, but the network logon service was not started. - public const int ERROR_NETLOGON_NOT_STARTED = unchecked( (int)( 1792 ) ); + public const int ERROR_NETLOGON_NOT_STARTED = unchecked((int)(1792)); // The user's account has expired. - public const int ERROR_ACCOUNT_EXPIRED = unchecked( (int)( 1793 ) ); + public const int ERROR_ACCOUNT_EXPIRED = unchecked((int)(1793)); // The redirector is in use and cannot be unloaded. - public const int ERROR_REDIRECTOR_HAS_OPEN_HANDLES = unchecked( (int)( 1794 ) ); + public const int ERROR_REDIRECTOR_HAS_OPEN_HANDLES = unchecked((int)(1794)); // The specified printer driver is already installed. - public const int ERROR_PRINTER_DRIVER_ALREADY_INSTALLED = unchecked( (int)( 1795 ) ); + public const int ERROR_PRINTER_DRIVER_ALREADY_INSTALLED = unchecked((int)(1795)); // The specified port is unknown. - public const int ERROR_UNKNOWN_PORT = unchecked( (int)( 1796 ) ); + public const int ERROR_UNKNOWN_PORT = unchecked((int)(1796)); // The printer driver is unknown. - public const int ERROR_UNKNOWN_PRINTER_DRIVER = unchecked( (int)( 1797 ) ); + public const int ERROR_UNKNOWN_PRINTER_DRIVER = unchecked((int)(1797)); // The print processor is unknown. // - public const int ERROR_UNKNOWN_PRINTPROCESSOR = unchecked( (int)( 1798 ) ); + public const int ERROR_UNKNOWN_PRINTPROCESSOR = unchecked((int)(1798)); // The specified separator file is invalid. - public const int ERROR_INVALID_SEPARATOR_FILE = unchecked( (int)( 1799 ) ); + public const int ERROR_INVALID_SEPARATOR_FILE = unchecked((int)(1799)); // The specified priority is invalid. - public const int ERROR_INVALID_PRIORITY = unchecked( (int)( 1800 ) ); + public const int ERROR_INVALID_PRIORITY = unchecked((int)(1800)); // The printer name is invalid. - public const int ERROR_INVALID_PRINTER_NAME = unchecked( (int)( 1801 ) ); + public const int ERROR_INVALID_PRINTER_NAME = unchecked((int)(1801)); // The printer already exists. - public const int ERROR_PRINTER_ALREADY_EXISTS = unchecked( (int)( 1802 ) ); + public const int ERROR_PRINTER_ALREADY_EXISTS = unchecked((int)(1802)); // The printer command is invalid. - public const int ERROR_INVALID_PRINTER_COMMAND = unchecked( (int)( 1803 ) ); + public const int ERROR_INVALID_PRINTER_COMMAND = unchecked((int)(1803)); // The specified datatype is invalid. - public const int ERROR_INVALID_DATATYPE = unchecked( (int)( 1804 ) ); + public const int ERROR_INVALID_DATATYPE = unchecked((int)(1804)); // The Environment specified is invalid. - public const int ERROR_INVALID_ENVIRONMENT = unchecked( (int)( 1805 ) ); + public const int ERROR_INVALID_ENVIRONMENT = unchecked((int)(1805)); // There are no more bindings. - public const int RPC_S_NO_MORE_BINDINGS = unchecked( (int)( 1806 ) ); + public const int RPC_S_NO_MORE_BINDINGS = unchecked((int)(1806)); // The account used is an interdomain trust account. Use your Global user account or local user account to access this server. - public const int ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = unchecked( (int)( 1807 ) ); + public const int ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = unchecked((int)(1807)); // The account used is a Computer Account. Use your Global user account or local user account to access this server. - public const int ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT = unchecked( (int)( 1808 ) ); + public const int ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT = unchecked((int)(1808)); // The account used is an server trust account. Use your Global user account or local user account to access this server. - public const int ERROR_NOLOGON_SERVER_TRUST_ACCOUNT = unchecked( (int)( 1809 ) ); + public const int ERROR_NOLOGON_SERVER_TRUST_ACCOUNT = unchecked((int)(1809)); // The name or security ID (SID) of the domain specified is inconsistent // with the trust information for that domain. - public const int ERROR_DOMAIN_TRUST_INCONSISTENT = unchecked( (int)( 1810 ) ); + public const int ERROR_DOMAIN_TRUST_INCONSISTENT = unchecked((int)(1810)); // The server is in use and cannot be unloaded. - public const int ERROR_SERVER_HAS_OPEN_HANDLES = unchecked( (int)( 1811 ) ); + public const int ERROR_SERVER_HAS_OPEN_HANDLES = unchecked((int)(1811)); // The specified image file did not contain a resource section. - public const int ERROR_RESOURCE_DATA_NOT_FOUND = unchecked( (int)( 1812 ) ); + public const int ERROR_RESOURCE_DATA_NOT_FOUND = unchecked((int)(1812)); // The specified resource type can not be found in the image file. - public const int ERROR_RESOURCE_TYPE_NOT_FOUND = unchecked( (int)( 1813 ) ); + public const int ERROR_RESOURCE_TYPE_NOT_FOUND = unchecked((int)(1813)); // The specified resource name can not be found in the image file. - public const int ERROR_RESOURCE_NAME_NOT_FOUND = unchecked( (int)( 1814 ) ); + public const int ERROR_RESOURCE_NAME_NOT_FOUND = unchecked((int)(1814)); // The specified resource language ID cannot be found in the image file. - public const int ERROR_RESOURCE_LANG_NOT_FOUND = unchecked( (int)( 1815 ) ); + public const int ERROR_RESOURCE_LANG_NOT_FOUND = unchecked((int)(1815)); // Not enough quota is available to process this command. - public const int ERROR_NOT_ENOUGH_QUOTA = unchecked( (int)( 1816 ) ); + public const int ERROR_NOT_ENOUGH_QUOTA = unchecked((int)(1816)); // The group member was not found. - public const int RPC_S_GROUP_MEMBER_NOT_FOUND = unchecked( (int)( 1898 ) ); + public const int RPC_S_GROUP_MEMBER_NOT_FOUND = unchecked((int)(1898)); // The endpoint mapper database could not be created. - public const int EPT_S_CANT_CREATE = unchecked( (int)( 1899 ) ); + public const int EPT_S_CANT_CREATE = unchecked((int)(1899)); // The object universal unique identifier (UUID) is the nil UUID. - public const int RPC_S_INVALID_OBJECT = unchecked( (int)( 1900 ) ); + public const int RPC_S_INVALID_OBJECT = unchecked((int)(1900)); // The specified time is invalid. - public const int ERROR_INVALID_TIME = unchecked( (int)( 1901 ) ); + public const int ERROR_INVALID_TIME = unchecked((int)(1901)); // The specified Form name is invalid. - public const int ERROR_INVALID_FORM_NAME = unchecked( (int)( 1902 ) ); + public const int ERROR_INVALID_FORM_NAME = unchecked((int)(1902)); // The specified Form size is invalid - public const int ERROR_INVALID_FORM_SIZE = unchecked( (int)( 1903 ) ); + public const int ERROR_INVALID_FORM_SIZE = unchecked((int)(1903)); // The specified Printer handle is already being waited on - public const int ERROR_ALREADY_WAITING = unchecked( (int)( 1904 ) ); + public const int ERROR_ALREADY_WAITING = unchecked((int)(1904)); // The specified Printer has been deleted - public const int ERROR_PRINTER_DELETED = unchecked( (int)( 1905 ) ); + public const int ERROR_PRINTER_DELETED = unchecked((int)(1905)); // The state of the Printer is invalid - public const int ERROR_INVALID_PRINTER_STATE = unchecked( (int)( 1906 ) ); + public const int ERROR_INVALID_PRINTER_STATE = unchecked((int)(1906)); // The list of servers for this workgroup is not currently available - public const int ERROR_NO_BROWSER_SERVERS_FOUND = unchecked( (int)( 6118 ) ); + public const int ERROR_NO_BROWSER_SERVERS_FOUND = unchecked((int)(6118)); // ------------------------- @@ -13307,10 +13307,10 @@ public struct MONCONVSTRUCT // This section defines all the support for Multimedia applications // general constants - public const int MAXPNAMELEN = unchecked( (int)( 32 ) );// max product name length (including NULL) - public const int MAXERRORLENGTH = unchecked( (int)( 128 ) );// max error text length (including final NULL) + public const int MAXPNAMELEN = unchecked((int)(32));// max product name length (including NULL) + public const int MAXERRORLENGTH = unchecked((int)(128));// max error text length (including final NULL) - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SMPTE { public byte hour; @@ -13322,13 +13322,13 @@ public struct SMPTE public int pad; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MIDI { public int songptrpos; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MMTIME { public int wType; @@ -13336,85 +13336,85 @@ public struct MMTIME } // values for wType field in MMTIME struct - public const int TIME_MS = unchecked( (int)( 0x1 ) );// time in Milliseconds - public const int TIME_SAMPLES = unchecked( (int)( 0x2 ) );// number of wave samples - public const int TIME_BYTES = unchecked( (int)( 0x4 ) );// current byte offset - public const int TIME_SMPTE = unchecked( (int)( 0x8 ) );// SMPTE time - public const int TIME_MIDI = unchecked( (int)( 0x10 ) );// MIDI time + public const int TIME_MS = unchecked((int)(0x1));// time in Milliseconds + public const int TIME_SAMPLES = unchecked((int)(0x2));// number of wave samples + public const int TIME_BYTES = unchecked((int)(0x4));// current byte offset + public const int TIME_SMPTE = unchecked((int)(0x8));// SMPTE time + public const int TIME_MIDI = unchecked((int)(0x10));// MIDI time // Multimedia Window Messages - public const int MM_JOY1MOVE = unchecked( (int)( 0x3A0 ) );// joystick - public const int MM_JOY2MOVE = unchecked( (int)( 0x3A1 ) ); - public const int MM_JOY1ZMOVE = unchecked( (int)( 0x3A2 ) ); - public const int MM_JOY2ZMOVE = unchecked( (int)( 0x3A3 ) ); - public const int MM_JOY1BUTTONDOWN = unchecked( (int)( 0x3B5 ) ); - public const int MM_JOY2BUTTONDOWN = unchecked( (int)( 0x3B6 ) ); - public const int MM_JOY1BUTTONUP = unchecked( (int)( 0x3B7 ) ); - public const int MM_JOY2BUTTONUP = unchecked( (int)( 0x3B8 ) ); - - public const int MM_MCINOTIFY = unchecked( (int)( 0x3B9 ) );// MCI - public const int MM_MCISYSTEM_STRING = unchecked( (int)( 0x3CA ) ); - - public const int MM_WOM_OPEN = unchecked( (int)( 0x3BB ) );// waveform output - public const int MM_WOM_CLOSE = unchecked( (int)( 0x3BC ) ); - public const int MM_WOM_DONE = unchecked( (int)( 0x3BD ) ); - - public const int MM_WIM_OPEN = unchecked( (int)( 0x3BE ) );// waveform input - public const int MM_WIM_CLOSE = unchecked( (int)( 0x3BF ) ); - public const int MM_WIM_DATA = unchecked( (int)( 0x3C0 ) ); - - public const int MM_MIM_OPEN = unchecked( (int)( 0x3C1 ) );// MIDI input - public const int MM_MIM_CLOSE = unchecked( (int)( 0x3C2 ) ); - public const int MM_MIM_DATA = unchecked( (int)( 0x3C3 ) ); - public const int MM_MIM_LONGDATA = unchecked( (int)( 0x3C4 ) ); - public const int MM_MIM_ERROR = unchecked( (int)( 0x3C5 ) ); - public const int MM_MIM_LONGERROR = unchecked( (int)( 0x3C6 ) ); - - public const int MM_MOM_OPEN = unchecked( (int)( 0x3C7 ) );// MIDI output - public const int MM_MOM_CLOSE = unchecked( (int)( 0x3C8 ) ); - public const int MM_MOM_DONE = unchecked( (int)( 0x3C9 ) ); + public const int MM_JOY1MOVE = unchecked((int)(0x3A0));// joystick + public const int MM_JOY2MOVE = unchecked((int)(0x3A1)); + public const int MM_JOY1ZMOVE = unchecked((int)(0x3A2)); + public const int MM_JOY2ZMOVE = unchecked((int)(0x3A3)); + public const int MM_JOY1BUTTONDOWN = unchecked((int)(0x3B5)); + public const int MM_JOY2BUTTONDOWN = unchecked((int)(0x3B6)); + public const int MM_JOY1BUTTONUP = unchecked((int)(0x3B7)); + public const int MM_JOY2BUTTONUP = unchecked((int)(0x3B8)); + + public const int MM_MCINOTIFY = unchecked((int)(0x3B9));// MCI + public const int MM_MCISYSTEM_STRING = unchecked((int)(0x3CA)); + + public const int MM_WOM_OPEN = unchecked((int)(0x3BB));// waveform output + public const int MM_WOM_CLOSE = unchecked((int)(0x3BC)); + public const int MM_WOM_DONE = unchecked((int)(0x3BD)); + + public const int MM_WIM_OPEN = unchecked((int)(0x3BE));// waveform input + public const int MM_WIM_CLOSE = unchecked((int)(0x3BF)); + public const int MM_WIM_DATA = unchecked((int)(0x3C0)); + + public const int MM_MIM_OPEN = unchecked((int)(0x3C1));// MIDI input + public const int MM_MIM_CLOSE = unchecked((int)(0x3C2)); + public const int MM_MIM_DATA = unchecked((int)(0x3C3)); + public const int MM_MIM_LONGDATA = unchecked((int)(0x3C4)); + public const int MM_MIM_ERROR = unchecked((int)(0x3C5)); + public const int MM_MIM_LONGERROR = unchecked((int)(0x3C6)); + + public const int MM_MOM_OPEN = unchecked((int)(0x3C7));// MIDI output + public const int MM_MOM_CLOSE = unchecked((int)(0x3C8)); + public const int MM_MOM_DONE = unchecked((int)(0x3C9)); // String resource number bases (internal use) - public const int MMSYSERR_BASE = unchecked( (int)( 0 ) ); - public const int WAVERR_BASE = unchecked( (int)( 32 ) ); - public const int MIDIERR_BASE = unchecked( (int)( 64 ) ); - public const int TIMERR_BASE = unchecked( (int)( 96 ) );// was 128, changed to match Win 31 Sonic - public const int JOYERR_BASE = unchecked( (int)( 160 ) ); - public const int MCIERR_BASE = unchecked( (int)( 256 ) ); + public const int MMSYSERR_BASE = unchecked((int)(0)); + public const int WAVERR_BASE = unchecked((int)(32)); + public const int MIDIERR_BASE = unchecked((int)(64)); + public const int TIMERR_BASE = unchecked((int)(96));// was 128, changed to match Win 31 Sonic + public const int JOYERR_BASE = unchecked((int)(160)); + public const int MCIERR_BASE = unchecked((int)(256)); - public const int MCI_STRING_OFFSET = unchecked( (int)( 512 ) );// if this number is changed you MUST + public const int MCI_STRING_OFFSET = unchecked((int)(512));// if this number is changed you MUST // alter the MCI_DEVTYPE_... list below - public const int MCI_VD_OFFSET = unchecked( (int)( 1024 ) ); - public const int MCI_CD_OFFSET = unchecked( (int)( 1088 ) ); - public const int MCI_WAVE_OFFSET = unchecked( (int)( 1152 ) ); - public const int MCI_SEQ_OFFSET = unchecked( (int)( 1216 ) ); + public const int MCI_VD_OFFSET = unchecked((int)(1024)); + public const int MCI_CD_OFFSET = unchecked((int)(1088)); + public const int MCI_WAVE_OFFSET = unchecked((int)(1152)); + public const int MCI_SEQ_OFFSET = unchecked((int)(1216)); // General error return values - public const int MMSYSERR_NOERROR = unchecked( (int)( 0 ) );// no error - public const int MMSYSERR_ERROR = unchecked( (int)( ( MMSYSERR_BASE + 1 ) ) );// unspecified error - public const int MMSYSERR_BADDEVICEID = unchecked( (int)( ( MMSYSERR_BASE + 2 ) ) );// device ID out of range - public const int MMSYSERR_NOTENABLED = unchecked( (int)( ( MMSYSERR_BASE + 3 ) ) );// driver failed enable - public const int MMSYSERR_ALLOCATED = unchecked( (int)( ( MMSYSERR_BASE + 4 ) ) );// device already allocated - public const int MMSYSERR_INVALHANDLE = unchecked( (int)( ( MMSYSERR_BASE + 5 ) ) );// device handle is invalid - public const int MMSYSERR_NODRIVER = unchecked( (int)( ( MMSYSERR_BASE + 6 ) ) );// no device driver present - public const int MMSYSERR_NOMEM = unchecked( (int)( ( MMSYSERR_BASE + 7 ) ) );// memory allocation error - public const int MMSYSERR_NOTSUPPORTED = unchecked( (int)( ( MMSYSERR_BASE + 8 ) ) );// function isn't supported - public const int MMSYSERR_BADERRNUM = unchecked( (int)( ( MMSYSERR_BASE + 9 ) ) );// error value out of range - public const int MMSYSERR_INVALFLAG = unchecked( (int)( ( MMSYSERR_BASE + 10 ) ) );// invalid flag passed - public const int MMSYSERR_INVALPARAM = unchecked( (int)( ( MMSYSERR_BASE + 11 ) ) );// invalid parameter passed - public const int MMSYSERR_HANDLEBUSY = unchecked( (int)( ( MMSYSERR_BASE + 12 ) ) );// handle being used + public const int MMSYSERR_NOERROR = unchecked((int)(0));// no error + public const int MMSYSERR_ERROR = unchecked((int)((MMSYSERR_BASE + 1)));// unspecified error + public const int MMSYSERR_BADDEVICEID = unchecked((int)((MMSYSERR_BASE + 2)));// device ID out of range + public const int MMSYSERR_NOTENABLED = unchecked((int)((MMSYSERR_BASE + 3)));// driver failed enable + public const int MMSYSERR_ALLOCATED = unchecked((int)((MMSYSERR_BASE + 4)));// device already allocated + public const int MMSYSERR_INVALHANDLE = unchecked((int)((MMSYSERR_BASE + 5)));// device handle is invalid + public const int MMSYSERR_NODRIVER = unchecked((int)((MMSYSERR_BASE + 6)));// no device driver present + public const int MMSYSERR_NOMEM = unchecked((int)((MMSYSERR_BASE + 7)));// memory allocation error + public const int MMSYSERR_NOTSUPPORTED = unchecked((int)((MMSYSERR_BASE + 8)));// function isn't supported + public const int MMSYSERR_BADERRNUM = unchecked((int)((MMSYSERR_BASE + 9)));// error value out of range + public const int MMSYSERR_INVALFLAG = unchecked((int)((MMSYSERR_BASE + 10)));// invalid flag passed + public const int MMSYSERR_INVALPARAM = unchecked((int)((MMSYSERR_BASE + 11)));// invalid parameter passed + public const int MMSYSERR_HANDLEBUSY = unchecked((int)((MMSYSERR_BASE + 12)));// handle being used // simultaneously on another // thread (eg callback) - public const int MMSYSERR_INVALIDALIAS = unchecked( (int)( ( MMSYSERR_BASE + 13 ) ) );// "Specified alias not found in WIN.INI - public const int MMSYSERR_LASTERROR = unchecked( (int)( ( MMSYSERR_BASE + 13 ) ) );// last error in range - public const int MM_MOM_POSITIONCB = unchecked( (int)( 0x3CA ) );// Callback for MEVT_POSITIONCB - public const int MM_MCISIGNAL = unchecked( (int)( 0x3CB ) ); - public const int MM_MIM_MOREDATA = unchecked( (int)( 0x3CC ) );// MIM_DONE w/ pending events - public const int MIDICAPS_STREAM = unchecked( (int)( 0x8 ) );// driver supports midiStreamOut directly + public const int MMSYSERR_INVALIDALIAS = unchecked((int)((MMSYSERR_BASE + 13)));// "Specified alias not found in WIN.INI + public const int MMSYSERR_LASTERROR = unchecked((int)((MMSYSERR_BASE + 13)));// last error in range + public const int MM_MOM_POSITIONCB = unchecked((int)(0x3CA));// Callback for MEVT_POSITIONCB + public const int MM_MCISIGNAL = unchecked((int)(0x3CB)); + public const int MM_MIM_MOREDATA = unchecked((int)(0x3CC));// MIM_DONE w/ pending events + public const int MIDICAPS_STREAM = unchecked((int)(0x8));// driver supports midiStreamOut directly - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MIDIEVENT { public int dwDeltaTime;// Ticks since last event @@ -13423,7 +13423,7 @@ public struct MIDIEVENT public int dwParms;// Parameters if this is a long event } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MIDISTRMBUFFVER { public int dwVersion;// Stream buffer format version @@ -13440,32 +13440,32 @@ public struct MIDISTRMBUFFVER // padded to be an even multiple of 4 Byte long. // - public const int MEVT_F_SHORT = unchecked( (int)( 0x0 ) ); - public const int MEVT_F_LONG = unchecked( (int)( 0x80000000 ) ); - public const int MEVT_F_CALLBACK = unchecked( (int)( 0x40000000 ) ); - public const int MIDISTRM_ERROR = unchecked( (int)( -2 ) ); + public const int MEVT_F_SHORT = unchecked((int)(0x0)); + public const int MEVT_F_LONG = unchecked((int)(0x80000000)); + public const int MEVT_F_CALLBACK = unchecked((int)(0x40000000)); + public const int MIDISTRM_ERROR = unchecked((int)(-2)); // // Structures and defines for midiStreamProperty // - public const int MIDIPROP_SET = unchecked( (int)( 0x80000000 ) ); - public const int MIDIPROP_GET = unchecked( (int)( 0x40000000 ) ); + public const int MIDIPROP_SET = unchecked((int)(0x80000000)); + public const int MIDIPROP_GET = unchecked((int)(0x40000000)); // These are intentionally both non-zero so the app cannot accidentally // leave the operation off and happen to appear to work due to default // action. - public const int MIDIPROP_TIMEDIV = unchecked( (int)( 0x1 ) ); - public const int MIDIPROP_TEMPO = unchecked( (int)( 0x2 ) ); + public const int MIDIPROP_TIMEDIV = unchecked((int)(0x1)); + public const int MIDIPROP_TEMPO = unchecked((int)(0x2)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MIDIPROPTIMEDIV { public int cbStruct; public int dwTimeDiv; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MIDIPROPTEMPO { public int cbStruct; @@ -13481,63 +13481,63 @@ public struct MIDIPROPTEMPO // ************************************************************************** - public const int MIXER_SHORT_NAME_CHARS = unchecked( (int)( 16 ) ); - public const int MIXER_LONG_NAME_CHARS = unchecked( (int)( 64 ) ); + public const int MIXER_SHORT_NAME_CHARS = unchecked((int)(16)); + public const int MIXER_LONG_NAME_CHARS = unchecked((int)(64)); // // MMRESULT error return values specific to the mixer API // // - public const int MIXERR_BASE = unchecked( (int)( 1024 ) ); - public const int MIXERR_INVALLINE = unchecked( (int)( ( MIXERR_BASE + 0 ) ) ); - public const int MIXERR_INVALCONTROL = unchecked( (int)( ( MIXERR_BASE + 1 ) ) ); - public const int MIXERR_INVALVALUE = unchecked( (int)( ( MIXERR_BASE + 2 ) ) ); - public const int MIXERR_LASTERROR = unchecked( (int)( ( MIXERR_BASE + 2 ) ) ); - - - public const int MIXER_OBJECTF_HANDLE = unchecked( (int)( 0x80000000 ) ); - public const int MIXER_OBJECTF_MIXER = unchecked( (int)( 0x0 ) ); - public const int MIXER_OBJECTF_HMIXER = unchecked( (int)( ( MIXER_OBJECTF_HANDLE | MIXER_OBJECTF_MIXER ) ) ); - public const int MIXER_OBJECTF_WAVEOUT = unchecked( (int)( 0x10000000 ) ); - public const int MIXER_OBJECTF_HWAVEOUT = unchecked( (int)( ( MIXER_OBJECTF_HANDLE | MIXER_OBJECTF_WAVEOUT ) ) ); - public const int MIXER_OBJECTF_WAVEIN = unchecked( (int)( 0x20000000 ) ); - public const int MIXER_OBJECTF_HWAVEIN = unchecked( (int)( ( MIXER_OBJECTF_HANDLE | MIXER_OBJECTF_WAVEIN ) ) ); - public const int MIXER_OBJECTF_MIDIOUT = unchecked( (int)( 0x30000000 ) ); - public const int MIXER_OBJECTF_HMIDIOUT = unchecked( (int)( ( MIXER_OBJECTF_HANDLE | MIXER_OBJECTF_MIDIOUT ) ) ); - public const int MIXER_OBJECTF_MIDIIN = unchecked( (int)( 0x40000000 ) ); - public const int MIXER_OBJECTF_HMIDIIN = unchecked( (int)( ( MIXER_OBJECTF_HANDLE | MIXER_OBJECTF_MIDIIN ) ) ); - public const int MIXER_OBJECTF_AUX = unchecked( (int)( 0x50000000 ) ); - - - [DllImport( "winmm.dll", EntryPoint = "mixerGetNumDevs", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + public const int MIXERR_BASE = unchecked((int)(1024)); + public const int MIXERR_INVALLINE = unchecked((int)((MIXERR_BASE + 0))); + public const int MIXERR_INVALCONTROL = unchecked((int)((MIXERR_BASE + 1))); + public const int MIXERR_INVALVALUE = unchecked((int)((MIXERR_BASE + 2))); + public const int MIXERR_LASTERROR = unchecked((int)((MIXERR_BASE + 2))); + + + public const int MIXER_OBJECTF_HANDLE = unchecked((int)(0x80000000)); + public const int MIXER_OBJECTF_MIXER = unchecked((int)(0x0)); + public const int MIXER_OBJECTF_HMIXER = unchecked((int)((MIXER_OBJECTF_HANDLE | MIXER_OBJECTF_MIXER))); + public const int MIXER_OBJECTF_WAVEOUT = unchecked((int)(0x10000000)); + public const int MIXER_OBJECTF_HWAVEOUT = unchecked((int)((MIXER_OBJECTF_HANDLE | MIXER_OBJECTF_WAVEOUT))); + public const int MIXER_OBJECTF_WAVEIN = unchecked((int)(0x20000000)); + public const int MIXER_OBJECTF_HWAVEIN = unchecked((int)((MIXER_OBJECTF_HANDLE | MIXER_OBJECTF_WAVEIN))); + public const int MIXER_OBJECTF_MIDIOUT = unchecked((int)(0x30000000)); + public const int MIXER_OBJECTF_HMIDIOUT = unchecked((int)((MIXER_OBJECTF_HANDLE | MIXER_OBJECTF_MIDIOUT))); + public const int MIXER_OBJECTF_MIDIIN = unchecked((int)(0x40000000)); + public const int MIXER_OBJECTF_HMIDIIN = unchecked((int)((MIXER_OBJECTF_HANDLE | MIXER_OBJECTF_MIDIIN))); + public const int MIXER_OBJECTF_AUX = unchecked((int)(0x50000000)); + + + [DllImport("winmm.dll", EntryPoint = "mixerGetNumDevs", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int mixerGetNumDevs(); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MIXERCAPS { public int wMid;// manufacturer id public int wPid;// product id public int vDriverVersion;// version of the driver - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = MAXPNAMELEN )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAXPNAMELEN)] public string szPname;// product name public int fdwSupport;// misc. support bits public int cDestinations;// count of destinations } - [DllImport( "winmm.dll", EntryPoint = "mixerGetDevCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mixerGetDevCaps( int uMxId, MIXERCAPS pmxcaps, int cbmxcaps ); + [DllImport("winmm.dll", EntryPoint = "mixerGetDevCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mixerGetDevCaps(int uMxId, MIXERCAPS pmxcaps, int cbmxcaps); - [DllImport( "winmm.dll", EntryPoint = "mixerOpen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mixerOpen( int phmx, int uMxId, int dwCallback, int dwInstance, int fdwOpen ); + [DllImport("winmm.dll", EntryPoint = "mixerOpen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mixerOpen(int phmx, int uMxId, int dwCallback, int dwInstance, int fdwOpen); - [DllImport( "winmm.dll", EntryPoint = "mixerClose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mixerClose( IntPtr hmx ); + [DllImport("winmm.dll", EntryPoint = "mixerClose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mixerClose(IntPtr hmx); - [DllImport( "winmm.dll", EntryPoint = "mixerMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mixerMessage( IntPtr hmx, int uMsg, int dwParam1, int dwParam2 ); + [DllImport("winmm.dll", EntryPoint = "mixerMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mixerMessage(IntPtr hmx, int uMsg, int dwParam1, int dwParam2); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct TARGET {// for use in MIXERLINE and others (embedded structure) @@ -13546,11 +13546,11 @@ public struct TARGET public int wMid;// of target device public int wPid;// " public int vDriverVersion;// " - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = MAXPNAMELEN )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAXPNAMELEN)] public string szPname; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MIXERLINE { public int cbStruct;// size of MIXERLINE structure @@ -13563,79 +13563,79 @@ public struct MIXERLINE public int cChannels;// number of channels line supports public int cConnections;// number of connections (possible) public int cControls;// number of controls at this line - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = MIXER_SHORT_NAME_CHARS )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MIXER_SHORT_NAME_CHARS)] public string szShortName; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = MIXER_LONG_NAME_CHARS )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MIXER_LONG_NAME_CHARS)] public string szName; public TARGET tTarget; } // MIXERLINE.fdwLine - public const int MIXERLINE_LINEF_ACTIVE = unchecked( (int)( 0x1 ) ); - public const int MIXERLINE_LINEF_DISCONNECTED = unchecked( (int)( 0x8000 ) ); - public const int MIXERLINE_LINEF_SOURCE = unchecked( (int)( 0x80000000 ) ); + public const int MIXERLINE_LINEF_ACTIVE = unchecked((int)(0x1)); + public const int MIXERLINE_LINEF_DISCONNECTED = unchecked((int)(0x8000)); + public const int MIXERLINE_LINEF_SOURCE = unchecked((int)(0x80000000)); // MIXERLINE.dwComponentType // component types for destinations and sources - public const int MIXERLINE_COMPONENTTYPE_DST_FIRST = unchecked( (int)( 0x0 ) ); - public const int MIXERLINE_COMPONENTTYPE_DST_UNDEFINED = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_DST_FIRST + 0 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_DST_DIGITAL = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_DST_FIRST + 1 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_DST_LINE = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_DST_FIRST + 2 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_DST_MONITOR = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_DST_FIRST + 3 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_DST_SPEAKERS = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_DST_FIRST + 4 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_DST_HEADPHONES = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_DST_FIRST + 5 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_DST_TELEPHONE = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_DST_FIRST + 6 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_DST_WAVEIN = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_DST_FIRST + 7 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_DST_VOICEIN = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_DST_FIRST + 8 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_DST_LAST = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_DST_FIRST + 8 ) ) ); - - public const int MIXERLINE_COMPONENTTYPE_SRC_FIRST = unchecked( (int)( 0x1000 ) ); - public const int MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_SRC_FIRST + 0 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_SRC_DIGITAL = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_SRC_FIRST + 1 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_SRC_LINE = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_SRC_FIRST + 2 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_SRC_FIRST + 3 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_SRC_FIRST + 4 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_SRC_FIRST + 5 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_SRC_FIRST + 6 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_SRC_FIRST + 7 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_SRC_FIRST + 8 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_SRC_FIRST + 9 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_SRC_ANALOG = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10 ) ) ); - public const int MIXERLINE_COMPONENTTYPE_SRC_LAST = unchecked( (int)( ( MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10 ) ) ); + public const int MIXERLINE_COMPONENTTYPE_DST_FIRST = unchecked((int)(0x0)); + public const int MIXERLINE_COMPONENTTYPE_DST_UNDEFINED = unchecked((int)((MIXERLINE_COMPONENTTYPE_DST_FIRST + 0))); + public const int MIXERLINE_COMPONENTTYPE_DST_DIGITAL = unchecked((int)((MIXERLINE_COMPONENTTYPE_DST_FIRST + 1))); + public const int MIXERLINE_COMPONENTTYPE_DST_LINE = unchecked((int)((MIXERLINE_COMPONENTTYPE_DST_FIRST + 2))); + public const int MIXERLINE_COMPONENTTYPE_DST_MONITOR = unchecked((int)((MIXERLINE_COMPONENTTYPE_DST_FIRST + 3))); + public const int MIXERLINE_COMPONENTTYPE_DST_SPEAKERS = unchecked((int)((MIXERLINE_COMPONENTTYPE_DST_FIRST + 4))); + public const int MIXERLINE_COMPONENTTYPE_DST_HEADPHONES = unchecked((int)((MIXERLINE_COMPONENTTYPE_DST_FIRST + 5))); + public const int MIXERLINE_COMPONENTTYPE_DST_TELEPHONE = unchecked((int)((MIXERLINE_COMPONENTTYPE_DST_FIRST + 6))); + public const int MIXERLINE_COMPONENTTYPE_DST_WAVEIN = unchecked((int)((MIXERLINE_COMPONENTTYPE_DST_FIRST + 7))); + public const int MIXERLINE_COMPONENTTYPE_DST_VOICEIN = unchecked((int)((MIXERLINE_COMPONENTTYPE_DST_FIRST + 8))); + public const int MIXERLINE_COMPONENTTYPE_DST_LAST = unchecked((int)((MIXERLINE_COMPONENTTYPE_DST_FIRST + 8))); + + public const int MIXERLINE_COMPONENTTYPE_SRC_FIRST = unchecked((int)(0x1000)); + public const int MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED = unchecked((int)((MIXERLINE_COMPONENTTYPE_SRC_FIRST + 0))); + public const int MIXERLINE_COMPONENTTYPE_SRC_DIGITAL = unchecked((int)((MIXERLINE_COMPONENTTYPE_SRC_FIRST + 1))); + public const int MIXERLINE_COMPONENTTYPE_SRC_LINE = unchecked((int)((MIXERLINE_COMPONENTTYPE_SRC_FIRST + 2))); + public const int MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE = unchecked((int)((MIXERLINE_COMPONENTTYPE_SRC_FIRST + 3))); + public const int MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER = unchecked((int)((MIXERLINE_COMPONENTTYPE_SRC_FIRST + 4))); + public const int MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC = unchecked((int)((MIXERLINE_COMPONENTTYPE_SRC_FIRST + 5))); + public const int MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE = unchecked((int)((MIXERLINE_COMPONENTTYPE_SRC_FIRST + 6))); + public const int MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER = unchecked((int)((MIXERLINE_COMPONENTTYPE_SRC_FIRST + 7))); + public const int MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT = unchecked((int)((MIXERLINE_COMPONENTTYPE_SRC_FIRST + 8))); + public const int MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY = unchecked((int)((MIXERLINE_COMPONENTTYPE_SRC_FIRST + 9))); + public const int MIXERLINE_COMPONENTTYPE_SRC_ANALOG = unchecked((int)((MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10))); + public const int MIXERLINE_COMPONENTTYPE_SRC_LAST = unchecked((int)((MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10))); // // MIXERLINE.Target.dwType // // - public const int MIXERLINE_TARGETTYPE_UNDEFINED = unchecked( (int)( 0 ) ); - public const int MIXERLINE_TARGETTYPE_WAVEOUT = unchecked( (int)( 1 ) ); - public const int MIXERLINE_TARGETTYPE_WAVEIN = unchecked( (int)( 2 ) ); - public const int MIXERLINE_TARGETTYPE_MIDIOUT = unchecked( (int)( 3 ) ); - public const int MIXERLINE_TARGETTYPE_MIDIIN = unchecked( (int)( 4 ) ); - public const int MIXERLINE_TARGETTYPE_AUX = unchecked( (int)( 5 ) ); + public const int MIXERLINE_TARGETTYPE_UNDEFINED = unchecked((int)(0)); + public const int MIXERLINE_TARGETTYPE_WAVEOUT = unchecked((int)(1)); + public const int MIXERLINE_TARGETTYPE_WAVEIN = unchecked((int)(2)); + public const int MIXERLINE_TARGETTYPE_MIDIOUT = unchecked((int)(3)); + public const int MIXERLINE_TARGETTYPE_MIDIIN = unchecked((int)(4)); + public const int MIXERLINE_TARGETTYPE_AUX = unchecked((int)(5)); - [DllImport( "winmm.dll", EntryPoint = "mixerGetLineInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mixerGetLineInfo( IntPtr hmxobj, MIXERLINE pmxl, int fdwInfo ); - public const int MIXER_GETLINEINFOF_DESTINATION = unchecked( (int)( 0x0 ) ); - public const int MIXER_GETLINEINFOF_SOURCE = unchecked( (int)( 0x1 ) ); - public const int MIXER_GETLINEINFOF_LINEID = unchecked( (int)( 0x2 ) ); - public const int MIXER_GETLINEINFOF_COMPONENTTYPE = unchecked( (int)( 0x3 ) ); - public const int MIXER_GETLINEINFOF_TARGETTYPE = unchecked( (int)( 0x4 ) ); - public const int MIXER_GETLINEINFOF_QUERYMASK = unchecked( (int)( 0xF ) ); + [DllImport("winmm.dll", EntryPoint = "mixerGetLineInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mixerGetLineInfo(IntPtr hmxobj, MIXERLINE pmxl, int fdwInfo); + public const int MIXER_GETLINEINFOF_DESTINATION = unchecked((int)(0x0)); + public const int MIXER_GETLINEINFOF_SOURCE = unchecked((int)(0x1)); + public const int MIXER_GETLINEINFOF_LINEID = unchecked((int)(0x2)); + public const int MIXER_GETLINEINFOF_COMPONENTTYPE = unchecked((int)(0x3)); + public const int MIXER_GETLINEINFOF_TARGETTYPE = unchecked((int)(0x4)); + public const int MIXER_GETLINEINFOF_QUERYMASK = unchecked((int)(0xF)); - [DllImport( "winmm.dll", EntryPoint = "mixerGetID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mixerGetID( IntPtr hmxobj, int pumxID, int fdwId ); + [DllImport("winmm.dll", EntryPoint = "mixerGetID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mixerGetID(IntPtr hmxobj, int pumxID, int fdwId); // MIXERCONTROL - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MIXERCONTROL { public int cbStruct;// size in Byte of MIXERCONTROL @@ -13643,9 +13643,9 @@ public struct MIXERCONTROL public int dwControlType;// MIXERCONTROL_CONTROLTYPE_xxx public int fdwControl;// MIXERCONTROL_CONTROLF_xxx public int cMultipleItems;// if MIXERCONTROL_CONTROLF_MULTIPLE set - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = MIXER_SHORT_NAME_CHARS )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MIXER_SHORT_NAME_CHARS)] public string szShortName; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = MIXER_LONG_NAME_CHARS )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MIXER_LONG_NAME_CHARS)] public string szName; public int Bounds;// Longest member of the Bounds union public int Metrics;// Longest member of the Metrics union @@ -13654,73 +13654,73 @@ public struct MIXERCONTROL // // MIXERCONTROL.fdwControl - public const int MIXERCONTROL_CONTROLF_UNIFORM = unchecked( (int)( 0x1 ) ); - public const int MIXERCONTROL_CONTROLF_MULTIPLE = unchecked( (int)( 0x2 ) ); - public const int MIXERCONTROL_CONTROLF_DISABLED = unchecked( (int)( 0x80000000 ) ); + public const int MIXERCONTROL_CONTROLF_UNIFORM = unchecked((int)(0x1)); + public const int MIXERCONTROL_CONTROLF_MULTIPLE = unchecked((int)(0x2)); + public const int MIXERCONTROL_CONTROLF_DISABLED = unchecked((int)(0x80000000)); // MIXERCONTROL_CONTROLTYPE_xxx building block defines - public const int MIXERCONTROL_CT_CLASS_MASK = unchecked( (int)( 0xF0000000 ) ); - public const int MIXERCONTROL_CT_CLASS_CUSTOM = unchecked( (int)( 0x0 ) ); - public const int MIXERCONTROL_CT_CLASS_METER = unchecked( (int)( 0x10000000 ) ); - public const int MIXERCONTROL_CT_CLASS_SWITCH = unchecked( (int)( 0x20000000 ) ); - public const int MIXERCONTROL_CT_CLASS_NUMBER = unchecked( (int)( 0x30000000 ) ); - public const int MIXERCONTROL_CT_CLASS_SLIDER = unchecked( (int)( 0x40000000 ) ); - public const int MIXERCONTROL_CT_CLASS_FADER = unchecked( (int)( 0x50000000 ) ); - public const int MIXERCONTROL_CT_CLASS_TIME = unchecked( (int)( 0x60000000 ) ); - public const int MIXERCONTROL_CT_CLASS_LIST = unchecked( (int)( 0x70000000 ) ); - public const int MIXERCONTROL_CT_SUBCLASS_MASK = unchecked( (int)( 0xF000000 ) ); - public const int MIXERCONTROL_CT_SC_SWITCH_BOOLEAN = unchecked( (int)( 0x0 ) ); - public const int MIXERCONTROL_CT_SC_SWITCH_BUTTON = unchecked( (int)( 0x1000000 ) ); - public const int MIXERCONTROL_CT_SC_METER_POLLED = unchecked( (int)( 0x0 ) ); - public const int MIXERCONTROL_CT_SC_TIME_MICROSECS = unchecked( (int)( 0x0 ) ); - public const int MIXERCONTROL_CT_SC_TIME_MILLISECS = unchecked( (int)( 0x1000000 ) ); - public const int MIXERCONTROL_CT_SC_LIST_SINGLE = unchecked( (int)( 0x0 ) ); - public const int MIXERCONTROL_CT_SC_LIST_MULTIPLE = unchecked( (int)( 0x1000000 ) ); - public const int MIXERCONTROL_CT_UNITS_MASK = unchecked( (int)( 0xFF0000 ) ); - public const int MIXERCONTROL_CT_UNITS_CUSTOM = unchecked( (int)( 0x0 ) ); - public const int MIXERCONTROL_CT_UNITS_BOOLEAN = unchecked( (int)( 0x10000 ) ); - public const int MIXERCONTROL_CT_UNITS_SIGNED = unchecked( (int)( 0x20000 ) ); - public const int MIXERCONTROL_CT_UNITS_UNSIGNED = unchecked( (int)( 0x30000 ) ); - public const int MIXERCONTROL_CT_UNITS_DECIBELS = unchecked( (int)( 0x40000 ) );// in 10ths - public const int MIXERCONTROL_CT_UNITS_PERCENT = unchecked( (int)( 0x50000 ) );// in 10ths + public const int MIXERCONTROL_CT_CLASS_MASK = unchecked((int)(0xF0000000)); + public const int MIXERCONTROL_CT_CLASS_CUSTOM = unchecked((int)(0x0)); + public const int MIXERCONTROL_CT_CLASS_METER = unchecked((int)(0x10000000)); + public const int MIXERCONTROL_CT_CLASS_SWITCH = unchecked((int)(0x20000000)); + public const int MIXERCONTROL_CT_CLASS_NUMBER = unchecked((int)(0x30000000)); + public const int MIXERCONTROL_CT_CLASS_SLIDER = unchecked((int)(0x40000000)); + public const int MIXERCONTROL_CT_CLASS_FADER = unchecked((int)(0x50000000)); + public const int MIXERCONTROL_CT_CLASS_TIME = unchecked((int)(0x60000000)); + public const int MIXERCONTROL_CT_CLASS_LIST = unchecked((int)(0x70000000)); + public const int MIXERCONTROL_CT_SUBCLASS_MASK = unchecked((int)(0xF000000)); + public const int MIXERCONTROL_CT_SC_SWITCH_BOOLEAN = unchecked((int)(0x0)); + public const int MIXERCONTROL_CT_SC_SWITCH_BUTTON = unchecked((int)(0x1000000)); + public const int MIXERCONTROL_CT_SC_METER_POLLED = unchecked((int)(0x0)); + public const int MIXERCONTROL_CT_SC_TIME_MICROSECS = unchecked((int)(0x0)); + public const int MIXERCONTROL_CT_SC_TIME_MILLISECS = unchecked((int)(0x1000000)); + public const int MIXERCONTROL_CT_SC_LIST_SINGLE = unchecked((int)(0x0)); + public const int MIXERCONTROL_CT_SC_LIST_MULTIPLE = unchecked((int)(0x1000000)); + public const int MIXERCONTROL_CT_UNITS_MASK = unchecked((int)(0xFF0000)); + public const int MIXERCONTROL_CT_UNITS_CUSTOM = unchecked((int)(0x0)); + public const int MIXERCONTROL_CT_UNITS_BOOLEAN = unchecked((int)(0x10000)); + public const int MIXERCONTROL_CT_UNITS_SIGNED = unchecked((int)(0x20000)); + public const int MIXERCONTROL_CT_UNITS_UNSIGNED = unchecked((int)(0x30000)); + public const int MIXERCONTROL_CT_UNITS_DECIBELS = unchecked((int)(0x40000));// in 10ths + public const int MIXERCONTROL_CT_UNITS_PERCENT = unchecked((int)(0x50000));// in 10ths // // Commonly used control types for specifying MIXERCONTROL.dwControlType // - public const int MIXERCONTROL_CONTROLTYPE_CUSTOM = unchecked( (int)( ( MIXERCONTROL_CT_CLASS_CUSTOM | MIXERCONTROL_CT_UNITS_CUSTOM ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_BOOLEANMETER = unchecked( (int)( ( MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_BOOLEAN ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_SIGNEDMETER = unchecked( (int)( ( MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_SIGNED ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_PEAKMETER = unchecked( (int)( ( MIXERCONTROL_CONTROLTYPE_SIGNEDMETER + 1 ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER = unchecked( (int)( ( MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_UNSIGNED ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_BOOLEAN = unchecked( (int)( ( MIXERCONTROL_CT_CLASS_SWITCH | MIXERCONTROL_CT_SC_SWITCH_BOOLEAN | MIXERCONTROL_CT_UNITS_BOOLEAN ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_ONOFF = unchecked( (int)( ( MIXERCONTROL_CONTROLTYPE_BOOLEAN + 1 ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_MUTE = unchecked( (int)( ( MIXERCONTROL_CONTROLTYPE_BOOLEAN + 2 ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_MONO = unchecked( (int)( ( MIXERCONTROL_CONTROLTYPE_BOOLEAN + 3 ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_LOUDNESS = unchecked( (int)( ( MIXERCONTROL_CONTROLTYPE_BOOLEAN + 4 ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_STEREOENH = unchecked( (int)( ( MIXERCONTROL_CONTROLTYPE_BOOLEAN + 5 ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_BUTTON = unchecked( (int)( ( MIXERCONTROL_CT_CLASS_SWITCH | MIXERCONTROL_CT_SC_SWITCH_BUTTON | MIXERCONTROL_CT_UNITS_BOOLEAN ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_DECIBELS = unchecked( (int)( ( MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_DECIBELS ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_SIGNED = unchecked( (int)( ( MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_SIGNED ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_UNSIGNED = unchecked( (int)( ( MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_UNSIGNED ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_PERCENT = unchecked( (int)( ( MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_PERCENT ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_SLIDER = unchecked( (int)( ( MIXERCONTROL_CT_CLASS_SLIDER | MIXERCONTROL_CT_UNITS_SIGNED ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_PAN = unchecked( (int)( ( MIXERCONTROL_CONTROLTYPE_SLIDER + 1 ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_QSOUNDPAN = unchecked( (int)( ( MIXERCONTROL_CONTROLTYPE_SLIDER + 2 ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_FADER = unchecked( (int)( ( MIXERCONTROL_CT_CLASS_FADER | MIXERCONTROL_CT_UNITS_UNSIGNED ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_VOLUME = unchecked( (int)( ( MIXERCONTROL_CONTROLTYPE_FADER + 1 ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_BASS = unchecked( (int)( ( MIXERCONTROL_CONTROLTYPE_FADER + 2 ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_TREBLE = unchecked( (int)( ( MIXERCONTROL_CONTROLTYPE_FADER + 3 ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_EQUALIZER = unchecked( (int)( ( MIXERCONTROL_CONTROLTYPE_FADER + 4 ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_SINGLESELECT = unchecked( (int)( ( MIXERCONTROL_CT_CLASS_LIST | MIXERCONTROL_CT_SC_LIST_SINGLE | MIXERCONTROL_CT_UNITS_BOOLEAN ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_MUX = unchecked( (int)( ( MIXERCONTROL_CONTROLTYPE_SINGLESELECT + 1 ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT = unchecked( (int)( ( MIXERCONTROL_CT_CLASS_LIST | MIXERCONTROL_CT_SC_LIST_MULTIPLE | MIXERCONTROL_CT_UNITS_BOOLEAN ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_MIXER = unchecked( (int)( ( MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT + 1 ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_MICROTIME = unchecked( (int)( ( MIXERCONTROL_CT_CLASS_TIME | MIXERCONTROL_CT_SC_TIME_MICROSECS | MIXERCONTROL_CT_UNITS_UNSIGNED ) ) ); - public const int MIXERCONTROL_CONTROLTYPE_MILLITIME = unchecked( (int)( ( MIXERCONTROL_CT_CLASS_TIME | MIXERCONTROL_CT_SC_TIME_MILLISECS | MIXERCONTROL_CT_UNITS_UNSIGNED ) ) ); + public const int MIXERCONTROL_CONTROLTYPE_CUSTOM = unchecked((int)((MIXERCONTROL_CT_CLASS_CUSTOM | MIXERCONTROL_CT_UNITS_CUSTOM))); + public const int MIXERCONTROL_CONTROLTYPE_BOOLEANMETER = unchecked((int)((MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_BOOLEAN))); + public const int MIXERCONTROL_CONTROLTYPE_SIGNEDMETER = unchecked((int)((MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_SIGNED))); + public const int MIXERCONTROL_CONTROLTYPE_PEAKMETER = unchecked((int)((MIXERCONTROL_CONTROLTYPE_SIGNEDMETER + 1))); + public const int MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER = unchecked((int)((MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_UNSIGNED))); + public const int MIXERCONTROL_CONTROLTYPE_BOOLEAN = unchecked((int)((MIXERCONTROL_CT_CLASS_SWITCH | MIXERCONTROL_CT_SC_SWITCH_BOOLEAN | MIXERCONTROL_CT_UNITS_BOOLEAN))); + public const int MIXERCONTROL_CONTROLTYPE_ONOFF = unchecked((int)((MIXERCONTROL_CONTROLTYPE_BOOLEAN + 1))); + public const int MIXERCONTROL_CONTROLTYPE_MUTE = unchecked((int)((MIXERCONTROL_CONTROLTYPE_BOOLEAN + 2))); + public const int MIXERCONTROL_CONTROLTYPE_MONO = unchecked((int)((MIXERCONTROL_CONTROLTYPE_BOOLEAN + 3))); + public const int MIXERCONTROL_CONTROLTYPE_LOUDNESS = unchecked((int)((MIXERCONTROL_CONTROLTYPE_BOOLEAN + 4))); + public const int MIXERCONTROL_CONTROLTYPE_STEREOENH = unchecked((int)((MIXERCONTROL_CONTROLTYPE_BOOLEAN + 5))); + public const int MIXERCONTROL_CONTROLTYPE_BUTTON = unchecked((int)((MIXERCONTROL_CT_CLASS_SWITCH | MIXERCONTROL_CT_SC_SWITCH_BUTTON | MIXERCONTROL_CT_UNITS_BOOLEAN))); + public const int MIXERCONTROL_CONTROLTYPE_DECIBELS = unchecked((int)((MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_DECIBELS))); + public const int MIXERCONTROL_CONTROLTYPE_SIGNED = unchecked((int)((MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_SIGNED))); + public const int MIXERCONTROL_CONTROLTYPE_UNSIGNED = unchecked((int)((MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_UNSIGNED))); + public const int MIXERCONTROL_CONTROLTYPE_PERCENT = unchecked((int)((MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_PERCENT))); + public const int MIXERCONTROL_CONTROLTYPE_SLIDER = unchecked((int)((MIXERCONTROL_CT_CLASS_SLIDER | MIXERCONTROL_CT_UNITS_SIGNED))); + public const int MIXERCONTROL_CONTROLTYPE_PAN = unchecked((int)((MIXERCONTROL_CONTROLTYPE_SLIDER + 1))); + public const int MIXERCONTROL_CONTROLTYPE_QSOUNDPAN = unchecked((int)((MIXERCONTROL_CONTROLTYPE_SLIDER + 2))); + public const int MIXERCONTROL_CONTROLTYPE_FADER = unchecked((int)((MIXERCONTROL_CT_CLASS_FADER | MIXERCONTROL_CT_UNITS_UNSIGNED))); + public const int MIXERCONTROL_CONTROLTYPE_VOLUME = unchecked((int)((MIXERCONTROL_CONTROLTYPE_FADER + 1))); + public const int MIXERCONTROL_CONTROLTYPE_BASS = unchecked((int)((MIXERCONTROL_CONTROLTYPE_FADER + 2))); + public const int MIXERCONTROL_CONTROLTYPE_TREBLE = unchecked((int)((MIXERCONTROL_CONTROLTYPE_FADER + 3))); + public const int MIXERCONTROL_CONTROLTYPE_EQUALIZER = unchecked((int)((MIXERCONTROL_CONTROLTYPE_FADER + 4))); + public const int MIXERCONTROL_CONTROLTYPE_SINGLESELECT = unchecked((int)((MIXERCONTROL_CT_CLASS_LIST | MIXERCONTROL_CT_SC_LIST_SINGLE | MIXERCONTROL_CT_UNITS_BOOLEAN))); + public const int MIXERCONTROL_CONTROLTYPE_MUX = unchecked((int)((MIXERCONTROL_CONTROLTYPE_SINGLESELECT + 1))); + public const int MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT = unchecked((int)((MIXERCONTROL_CT_CLASS_LIST | MIXERCONTROL_CT_SC_LIST_MULTIPLE | MIXERCONTROL_CT_UNITS_BOOLEAN))); + public const int MIXERCONTROL_CONTROLTYPE_MIXER = unchecked((int)((MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT + 1))); + public const int MIXERCONTROL_CONTROLTYPE_MICROTIME = unchecked((int)((MIXERCONTROL_CT_CLASS_TIME | MIXERCONTROL_CT_SC_TIME_MICROSECS | MIXERCONTROL_CT_UNITS_UNSIGNED))); + public const int MIXERCONTROL_CONTROLTYPE_MILLITIME = unchecked((int)((MIXERCONTROL_CT_CLASS_TIME | MIXERCONTROL_CT_SC_TIME_MILLISECS | MIXERCONTROL_CT_UNITS_UNSIGNED))); // // MIXERLINECONTROLS // - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MIXERLINECONTROLS { public int cbStruct;// size in Byte of MIXERLINECONTROLS @@ -13733,15 +13733,15 @@ public struct MIXERLINECONTROLS } - [DllImport( "winmm.dll", EntryPoint = "mixerGetLineControls", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mixerGetLineControls( IntPtr hmxobj, MIXERLINECONTROLS pmxlc, int fdwControls ); + [DllImport("winmm.dll", EntryPoint = "mixerGetLineControls", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mixerGetLineControls(IntPtr hmxobj, MIXERLINECONTROLS pmxlc, int fdwControls); - public const int MIXER_GETLINECONTROLSF_ALL = unchecked( (int)( 0x0 ) ); - public const int MIXER_GETLINECONTROLSF_ONEBYID = unchecked( (int)( 0x1 ) ); - public const int MIXER_GETLINECONTROLSF_ONEBYTYPE = unchecked( (int)( 0x2 ) ); - public const int MIXER_GETLINECONTROLSF_QUERYMASK = unchecked( (int)( 0xF ) ); + public const int MIXER_GETLINECONTROLSF_ALL = unchecked((int)(0x0)); + public const int MIXER_GETLINECONTROLSF_ONEBYID = unchecked((int)(0x1)); + public const int MIXER_GETLINECONTROLSF_ONEBYTYPE = unchecked((int)(0x2)); + public const int MIXER_GETLINECONTROLSF_QUERYMASK = unchecked((int)(0xF)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MIXERCONTROLDETAILS { public int cbStruct;// size in Byte of MIXERCONTROLDETAILS @@ -13754,164 +13754,164 @@ public struct MIXERCONTROLDETAILS // MIXER_GETCONTROLDETAILSF_LISTTEXT - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MIXERCONTROLDETAILS_LISTTEXT { public int dwParam1; public int dwParam2; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = MIXER_LONG_NAME_CHARS )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MIXER_LONG_NAME_CHARS)] public string szName; } // MIXER_GETCONTROLDETAILSF_VALUE - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MIXERCONTROLDETAILS_BOOLEAN { public int fValue; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MIXERCONTROLDETAILS_SIGNED { public int lValue; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MIXERCONTROLDETAILS_UNSIGNED { public int dwValue; } - [DllImport( "winmm.dll", EntryPoint = "mixerGetControlDetails", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mixerGetControlDetails( IntPtr hmxobj, MIXERCONTROLDETAILS pmxcd, int fdwDetails ); + [DllImport("winmm.dll", EntryPoint = "mixerGetControlDetails", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mixerGetControlDetails(IntPtr hmxobj, MIXERCONTROLDETAILS pmxcd, int fdwDetails); - public const int MIXER_GETCONTROLDETAILSF_VALUE = unchecked( (int)( 0x0 ) ); - public const int MIXER_GETCONTROLDETAILSF_LISTTEXT = unchecked( (int)( 0x1 ) ); - public const int MIXER_GETCONTROLDETAILSF_QUERYMASK = unchecked( (int)( 0xF ) ); + public const int MIXER_GETCONTROLDETAILSF_VALUE = unchecked((int)(0x0)); + public const int MIXER_GETCONTROLDETAILSF_LISTTEXT = unchecked((int)(0x1)); + public const int MIXER_GETCONTROLDETAILSF_QUERYMASK = unchecked((int)(0xF)); - [DllImport( "winmm.dll", EntryPoint = "mixerSetControlDetails", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mixerSetControlDetails( IntPtr hmxobj, MIXERCONTROLDETAILS pmxcd, int fdwDetails ); + [DllImport("winmm.dll", EntryPoint = "mixerSetControlDetails", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mixerSetControlDetails(IntPtr hmxobj, MIXERCONTROLDETAILS pmxcd, int fdwDetails); - public const int MIXER_SETCONTROLDETAILSF_VALUE = unchecked( (int)( 0x0 ) ); - public const int MIXER_SETCONTROLDETAILSF_CUSTOM = unchecked( (int)( 0x1 ) ); - public const int MIXER_SETCONTROLDETAILSF_QUERYMASK = unchecked( (int)( 0xF ) ); + public const int MIXER_SETCONTROLDETAILSF_VALUE = unchecked((int)(0x0)); + public const int MIXER_SETCONTROLDETAILSF_CUSTOM = unchecked((int)(0x1)); + public const int MIXER_SETCONTROLDETAILSF_QUERYMASK = unchecked((int)(0xF)); // constants used with JOYINFOEX - public const int JOY_BUTTON5 = unchecked( (int)( 0x10 ) ); - public const int JOY_BUTTON6 = unchecked( (int)( 0x20 ) ); - public const int JOY_BUTTON7 = unchecked( (int)( 0x40 ) ); - public const int JOY_BUTTON8 = unchecked( (int)( 0x80 ) ); - public const int JOY_BUTTON9 = unchecked( (int)( 0x100 ) ); - public const int JOY_BUTTON10 = unchecked( (int)( 0x200 ) ); - public const int JOY_BUTTON11 = unchecked( (int)( 0x400 ) ); - public const int JOY_BUTTON12 = unchecked( (int)( 0x800 ) ); - public const int JOY_BUTTON13 = unchecked( (int)( 0x1000 ) ); - public const int JOY_BUTTON14 = unchecked( (int)( 0x2000 ) ); - public const int JOY_BUTTON15 = unchecked( (int)( 0x4000 ) ); - public const int JOY_BUTTON16 = unchecked( (int)( 0x8000 ) ); - public const int JOY_BUTTON17 = unchecked( (int)( 0x10000 ) ); - public const int JOY_BUTTON18 = unchecked( (int)( 0x20000 ) ); - public const int JOY_BUTTON19 = unchecked( (int)( 0x40000 ) ); - public const int JOY_BUTTON20 = unchecked( (int)( 0x80000 ) ); - public const int JOY_BUTTON21 = unchecked( (int)( 0x100000 ) ); - public const int JOY_BUTTON22 = unchecked( (int)( 0x200000 ) ); - public const int JOY_BUTTON23 = unchecked( (int)( 0x400000 ) ); - public const int JOY_BUTTON24 = unchecked( (int)( 0x800000 ) ); - public const int JOY_BUTTON25 = unchecked( (int)( 0x1000000 ) ); - public const int JOY_BUTTON26 = unchecked( (int)( 0x2000000 ) ); - public const int JOY_BUTTON27 = unchecked( (int)( 0x4000000 ) ); - public const int JOY_BUTTON28 = unchecked( (int)( 0x8000000 ) ); - public const int JOY_BUTTON29 = unchecked( (int)( 0x10000000 ) ); - public const int JOY_BUTTON30 = unchecked( (int)( 0x20000000 ) ); - public const int JOY_BUTTON31 = unchecked( (int)( 0x40000000 ) ); - public const int JOY_BUTTON32 = unchecked( (int)( 0x80000000 ) ); + public const int JOY_BUTTON5 = unchecked((int)(0x10)); + public const int JOY_BUTTON6 = unchecked((int)(0x20)); + public const int JOY_BUTTON7 = unchecked((int)(0x40)); + public const int JOY_BUTTON8 = unchecked((int)(0x80)); + public const int JOY_BUTTON9 = unchecked((int)(0x100)); + public const int JOY_BUTTON10 = unchecked((int)(0x200)); + public const int JOY_BUTTON11 = unchecked((int)(0x400)); + public const int JOY_BUTTON12 = unchecked((int)(0x800)); + public const int JOY_BUTTON13 = unchecked((int)(0x1000)); + public const int JOY_BUTTON14 = unchecked((int)(0x2000)); + public const int JOY_BUTTON15 = unchecked((int)(0x4000)); + public const int JOY_BUTTON16 = unchecked((int)(0x8000)); + public const int JOY_BUTTON17 = unchecked((int)(0x10000)); + public const int JOY_BUTTON18 = unchecked((int)(0x20000)); + public const int JOY_BUTTON19 = unchecked((int)(0x40000)); + public const int JOY_BUTTON20 = unchecked((int)(0x80000)); + public const int JOY_BUTTON21 = unchecked((int)(0x100000)); + public const int JOY_BUTTON22 = unchecked((int)(0x200000)); + public const int JOY_BUTTON23 = unchecked((int)(0x400000)); + public const int JOY_BUTTON24 = unchecked((int)(0x800000)); + public const int JOY_BUTTON25 = unchecked((int)(0x1000000)); + public const int JOY_BUTTON26 = unchecked((int)(0x2000000)); + public const int JOY_BUTTON27 = unchecked((int)(0x4000000)); + public const int JOY_BUTTON28 = unchecked((int)(0x8000000)); + public const int JOY_BUTTON29 = unchecked((int)(0x10000000)); + public const int JOY_BUTTON30 = unchecked((int)(0x20000000)); + public const int JOY_BUTTON31 = unchecked((int)(0x40000000)); + public const int JOY_BUTTON32 = unchecked((int)(0x80000000)); // constants used with JOYINFOEX structure - public const int JOY_POVCENTERED = unchecked( (int)( -1 ) ); - public const int JOY_POVFORWARD = unchecked( (int)( 0 ) ); - public const int JOY_POVRIGHT = unchecked( (int)( 9000 ) ); - public const int JOY_POVBACKWARD = unchecked( (int)( 18000 ) ); - public const int JOY_POVLEFT = unchecked( (int)( 27000 ) ); - public const int JOY_RETURNX = unchecked( (int)( 0x1 ) ); - public const int JOY_RETURNY = unchecked( (int)( 0x2 ) ); - public const int JOY_RETURNZ = unchecked( (int)( 0x4 ) ); - public const int JOY_RETURNR = unchecked( (int)( 0x8 ) ); - public const int JOY_RETURNU = unchecked( (int)( 0x10 ) );// axis 5 - public const int JOY_RETURNV = unchecked( (int)( 0x20 ) );// axis 6 - public const int JOY_RETURNPOV = unchecked( (int)( 0x40 ) ); - public const int JOY_RETURNBUTTONS = unchecked( (int)( 0x80 ) ); - public const int JOY_RETURNRAWDATA = unchecked( (int)( 0x100 ) ); - public const int JOY_RETURNPOVCTS = unchecked( (int)( 0x200 ) ); - public const int JOY_RETURNCENTERED = unchecked( (int)( 0x400 ) ); - public const int JOY_USEDEADZONE = unchecked( (int)( 0x800 ) ); - public const int JOY_RETURNALL = unchecked( (int)( ( JOY_RETURNX | JOY_RETURNY | JOY_RETURNZ | JOY_RETURNR | JOY_RETURNU | JOY_RETURNV | JOY_RETURNPOV | JOY_RETURNBUTTONS ) ) ); - public const int JOY_CAL_READALWAYS = unchecked( (int)( 0x10000 ) ); - public const int JOY_CAL_READXYONLY = unchecked( (int)( 0x20000 ) ); - public const int JOY_CAL_READ3 = unchecked( (int)( 0x40000 ) ); - public const int JOY_CAL_READ4 = unchecked( (int)( 0x80000 ) ); - public const int JOY_CAL_READXONLY = unchecked( (int)( 0x100000 ) ); - public const int JOY_CAL_READYONLY = unchecked( (int)( 0x200000 ) ); - public const int JOY_CAL_READ5 = unchecked( (int)( 0x400000 ) ); - public const int JOY_CAL_READ6 = unchecked( (int)( 0x800000 ) ); - public const int JOY_CAL_READZONLY = unchecked( (int)( 0x1000000 ) ); - public const int JOY_CAL_READRONLY = unchecked( (int)( 0x2000000 ) ); - public const int JOY_CAL_READUONLY = unchecked( (int)( 0x4000000 ) ); - public const int JOY_CAL_READVONLY = unchecked( (int)( 0x8000000 ) ); - - - [DllImport( "winmm.dll", EntryPoint = "joyGetPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int joyGetPos( int uJoyID, JOYINFO pji ); - - [DllImport( "winmm.dll", EntryPoint = "joyGetPosEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int joyGetPosEx( int uJoyID, JOYINFOEX pji ); - public const int WAVE_FORMAT_QUERY = unchecked( (int)( 0x1 ) ); - public const int SND_PURGE = unchecked( (int)( 0x40 ) );// purge non-static events for task - public const int SND_APPLICATION = unchecked( (int)( 0x80 ) );// look for application specific association - public const int WAVE_MAPPED = unchecked( (int)( 0x4 ) ); - public const int WAVE_FORMAT_DIRECT = unchecked( (int)( 0x8 ) ); - public const int WAVE_FORMAT_DIRECT_QUERY = unchecked( (int)( ( WAVE_FORMAT_QUERY | WAVE_FORMAT_DIRECT ) ) ); - public const int MIM_MOREDATA = unchecked( (int)( MM_MIM_MOREDATA ) ); - public const int MOM_POSITIONCB = unchecked( (int)( MM_MOM_POSITIONCB ) ); + public const int JOY_POVCENTERED = unchecked((int)(-1)); + public const int JOY_POVFORWARD = unchecked((int)(0)); + public const int JOY_POVRIGHT = unchecked((int)(9000)); + public const int JOY_POVBACKWARD = unchecked((int)(18000)); + public const int JOY_POVLEFT = unchecked((int)(27000)); + public const int JOY_RETURNX = unchecked((int)(0x1)); + public const int JOY_RETURNY = unchecked((int)(0x2)); + public const int JOY_RETURNZ = unchecked((int)(0x4)); + public const int JOY_RETURNR = unchecked((int)(0x8)); + public const int JOY_RETURNU = unchecked((int)(0x10));// axis 5 + public const int JOY_RETURNV = unchecked((int)(0x20));// axis 6 + public const int JOY_RETURNPOV = unchecked((int)(0x40)); + public const int JOY_RETURNBUTTONS = unchecked((int)(0x80)); + public const int JOY_RETURNRAWDATA = unchecked((int)(0x100)); + public const int JOY_RETURNPOVCTS = unchecked((int)(0x200)); + public const int JOY_RETURNCENTERED = unchecked((int)(0x400)); + public const int JOY_USEDEADZONE = unchecked((int)(0x800)); + public const int JOY_RETURNALL = unchecked((int)((JOY_RETURNX | JOY_RETURNY | JOY_RETURNZ | JOY_RETURNR | JOY_RETURNU | JOY_RETURNV | JOY_RETURNPOV | JOY_RETURNBUTTONS))); + public const int JOY_CAL_READALWAYS = unchecked((int)(0x10000)); + public const int JOY_CAL_READXYONLY = unchecked((int)(0x20000)); + public const int JOY_CAL_READ3 = unchecked((int)(0x40000)); + public const int JOY_CAL_READ4 = unchecked((int)(0x80000)); + public const int JOY_CAL_READXONLY = unchecked((int)(0x100000)); + public const int JOY_CAL_READYONLY = unchecked((int)(0x200000)); + public const int JOY_CAL_READ5 = unchecked((int)(0x400000)); + public const int JOY_CAL_READ6 = unchecked((int)(0x800000)); + public const int JOY_CAL_READZONLY = unchecked((int)(0x1000000)); + public const int JOY_CAL_READRONLY = unchecked((int)(0x2000000)); + public const int JOY_CAL_READUONLY = unchecked((int)(0x4000000)); + public const int JOY_CAL_READVONLY = unchecked((int)(0x8000000)); + + + [DllImport("winmm.dll", EntryPoint = "joyGetPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int joyGetPos(int uJoyID, JOYINFO pji); + + [DllImport("winmm.dll", EntryPoint = "joyGetPosEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int joyGetPosEx(int uJoyID, JOYINFOEX pji); + public const int WAVE_FORMAT_QUERY = unchecked((int)(0x1)); + public const int SND_PURGE = unchecked((int)(0x40));// purge non-static events for task + public const int SND_APPLICATION = unchecked((int)(0x80));// look for application specific association + public const int WAVE_MAPPED = unchecked((int)(0x4)); + public const int WAVE_FORMAT_DIRECT = unchecked((int)(0x8)); + public const int WAVE_FORMAT_DIRECT_QUERY = unchecked((int)((WAVE_FORMAT_QUERY | WAVE_FORMAT_DIRECT))); + public const int MIM_MOREDATA = unchecked((int)(MM_MIM_MOREDATA)); + public const int MOM_POSITIONCB = unchecked((int)(MM_MOM_POSITIONCB)); // flags for dwFlags parm of midiInOpen() - public const int MIDI_IO_STATUS = unchecked( (int)( 0x20 ) ); + public const int MIDI_IO_STATUS = unchecked((int)(0x20)); - [DllImport( "winmm.dll", EntryPoint = "midiStreamOpen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiStreamOpen( int phms, int puDeviceID, int cMidi, int dwCallback, int dwInstance, int fdwOpen ); + [DllImport("winmm.dll", EntryPoint = "midiStreamOpen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiStreamOpen(int phms, int puDeviceID, int cMidi, int dwCallback, int dwInstance, int fdwOpen); - [DllImport( "winmm.dll", EntryPoint = "midiStreamClose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiStreamClose( IntPtr hms ); + [DllImport("winmm.dll", EntryPoint = "midiStreamClose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiStreamClose(IntPtr hms); - [DllImport( "winmm.dll", EntryPoint = "midiStreamProperty", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiStreamProperty( IntPtr hms, ref byte lppropdata, int dwProperty ); + [DllImport("winmm.dll", EntryPoint = "midiStreamProperty", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiStreamProperty(IntPtr hms, ref byte lppropdata, int dwProperty); - [DllImport( "winmm.dll", EntryPoint = "midiStreamPosition", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiStreamPosition( IntPtr hms, ref MMTIME lpmmt, int cbmmt ); + [DllImport("winmm.dll", EntryPoint = "midiStreamPosition", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiStreamPosition(IntPtr hms, ref MMTIME lpmmt, int cbmmt); - [DllImport( "winmm.dll", EntryPoint = "midiStreamOut", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiStreamOut( IntPtr hms, MIDIHDR pmh, int cbmh ); + [DllImport("winmm.dll", EntryPoint = "midiStreamOut", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiStreamOut(IntPtr hms, MIDIHDR pmh, int cbmh); - [DllImport( "winmm.dll", EntryPoint = "midiStreamPause", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiStreamPause( IntPtr hms ); + [DllImport("winmm.dll", EntryPoint = "midiStreamPause", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiStreamPause(IntPtr hms); - [DllImport( "winmm.dll", EntryPoint = "midiStreamRestart", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiStreamRestart( IntPtr hms ); + [DllImport("winmm.dll", EntryPoint = "midiStreamRestart", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiStreamRestart(IntPtr hms); - [DllImport( "winmm.dll", EntryPoint = "midiStreamStop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiStreamStop( IntPtr hms ); + [DllImport("winmm.dll", EntryPoint = "midiStreamStop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiStreamStop(IntPtr hms); - [DllImport( "winmm.dll", EntryPoint = "midiConnect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiConnect( IntPtr hmi, IntPtr hmo, object pReserved ); + [DllImport("winmm.dll", EntryPoint = "midiConnect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiConnect(IntPtr hmi, IntPtr hmo, object pReserved); - [DllImport( "winmm.dll", EntryPoint = "midiDisconnect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiDisconnect( IntPtr hmi, IntPtr hmo, object pReserved ); + [DllImport("winmm.dll", EntryPoint = "midiDisconnect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiDisconnect(IntPtr hmi, IntPtr hmo, object pReserved); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct JOYINFOEX { public int dwSize;// size of structure @@ -13931,22 +13931,22 @@ public struct JOYINFOEX // Installable driver support // Driver messages - public const int DRV_LOAD = unchecked( (int)( 0x1 ) ); - public const int DRV_ENABLE = unchecked( (int)( 0x2 ) ); - public const int DRV_OPEN = unchecked( (int)( 0x3 ) ); - public const int DRV_CLOSE = unchecked( (int)( 0x4 ) ); - public const int DRV_DISABLE = unchecked( (int)( 0x5 ) ); - public const int DRV_FREE = unchecked( (int)( 0x6 ) ); - public const int DRV_CONFIGURE = unchecked( (int)( 0x7 ) ); - public const int DRV_QUERYCONFIGURE = unchecked( (int)( 0x8 ) ); - public const int DRV_INSTALL = unchecked( (int)( 0x9 ) ); - public const int DRV_REMOVE = unchecked( (int)( 0xA ) ); - public const int DRV_EXITSESSION = unchecked( (int)( 0xB ) ); - public const int DRV_POWER = unchecked( (int)( 0xF ) ); - public const int DRV_RESERVED = unchecked( (int)( 0x800 ) ); - public const int DRV_USER = unchecked( (int)( 0x4000 ) ); - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int DRV_LOAD = unchecked((int)(0x1)); + public const int DRV_ENABLE = unchecked((int)(0x2)); + public const int DRV_OPEN = unchecked((int)(0x3)); + public const int DRV_CLOSE = unchecked((int)(0x4)); + public const int DRV_DISABLE = unchecked((int)(0x5)); + public const int DRV_FREE = unchecked((int)(0x6)); + public const int DRV_CONFIGURE = unchecked((int)(0x7)); + public const int DRV_QUERYCONFIGURE = unchecked((int)(0x8)); + public const int DRV_INSTALL = unchecked((int)(0x9)); + public const int DRV_REMOVE = unchecked((int)(0xA)); + public const int DRV_EXITSESSION = unchecked((int)(0xB)); + public const int DRV_POWER = unchecked((int)(0xF)); + public const int DRV_RESERVED = unchecked((int)(0x800)); + public const int DRV_USER = unchecked((int)(0x4000)); + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DRVCONFIGINFO { public int dwDCISize; @@ -13956,132 +13956,132 @@ public struct DRVCONFIGINFO } // Supported return values for DRV_CONFIGURE message - public const int DRVCNF_CANCEL = unchecked( (int)( 0x0 ) ); - public const int DRVCNF_OK = unchecked( (int)( 0x1 ) ); - public const int DRVCNF_RESTART = unchecked( (int)( 0x2 ) ); + public const int DRVCNF_CANCEL = unchecked((int)(0x0)); + public const int DRVCNF_OK = unchecked((int)(0x1)); + public const int DRVCNF_RESTART = unchecked((int)(0x2)); // return values from DriverProc() function - public const int DRV_CANCEL = unchecked( (int)( DRVCNF_CANCEL ) ); - public const int DRV_OK = unchecked( (int)( DRVCNF_OK ) ); - public const int DRV_RESTART = unchecked( (int)( DRVCNF_RESTART ) ); + public const int DRV_CANCEL = unchecked((int)(DRVCNF_CANCEL)); + public const int DRV_OK = unchecked((int)(DRVCNF_OK)); + public const int DRV_RESTART = unchecked((int)(DRVCNF_RESTART)); - [DllImport( "winmm.dll", EntryPoint = "CloseDriver", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CloseDriver( IntPtr hDriver, int lParam1, int lParam2 ); + [DllImport("winmm.dll", EntryPoint = "CloseDriver", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CloseDriver(IntPtr hDriver, int lParam1, int lParam2); - [DllImport( "winmm.dll", EntryPoint = "OpenDriver", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenDriver( string szDriverName, string szSectionName, int lParam2 ); + [DllImport("winmm.dll", EntryPoint = "OpenDriver", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenDriver(string szDriverName, string szSectionName, int lParam2); - [DllImport( "winmm.dll", EntryPoint = "SendDriverMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SendDriverMessage( IntPtr hDriver, int message, int lParam1, int lParam2 ); + [DllImport("winmm.dll", EntryPoint = "SendDriverMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SendDriverMessage(IntPtr hDriver, int message, int lParam1, int lParam2); - [DllImport( "winmm.dll", EntryPoint = "DrvGetModuleHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DrvGetModuleHandle( IntPtr hDriver ); + [DllImport("winmm.dll", EntryPoint = "DrvGetModuleHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DrvGetModuleHandle(IntPtr hDriver); - [DllImport( "winmm.dll", EntryPoint = "GetDriverModuleHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetDriverModuleHandle( IntPtr hDriver ); + [DllImport("winmm.dll", EntryPoint = "GetDriverModuleHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetDriverModuleHandle(IntPtr hDriver); - [DllImport( "winmm.dll", EntryPoint = "DefDriverProc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DefDriverProc( int dwDriverIdentifier, IntPtr hdrvr, int uMsg, int lParam1, int lParam2 ); + [DllImport("winmm.dll", EntryPoint = "DefDriverProc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DefDriverProc(int dwDriverIdentifier, IntPtr hdrvr, int uMsg, int lParam1, int lParam2); - public const int DRV_MCI_FIRST = unchecked( (int)( DRV_RESERVED ) ); - public const int DRV_MCI_LAST = unchecked( (int)( DRV_RESERVED + 0xFFF ) ); + public const int DRV_MCI_FIRST = unchecked((int)(DRV_RESERVED)); + public const int DRV_MCI_LAST = unchecked((int)(DRV_RESERVED + 0xFFF)); // Driver callback support // flags used with waveOutOpen(), waveInOpen(), midiInOpen(), and // midiOutOpen() to specify the type of the dwCallback parameter. - public const int CALLBACK_TYPEMASK = unchecked( (int)( 0x70000 ) );// callback type mask - public const int CALLBACK_NULL = unchecked( (int)( 0x0 ) );// no callback - public const int CALLBACK_WINDOW = unchecked( (int)( 0x10000 ) );// dwCallback is a HWND - public const int CALLBACK_TASK = unchecked( (int)( 0x20000 ) );// dwCallback is a HTASK - public const int CALLBACK_FUNCTION = unchecked( (int)( 0x30000 ) );// dwCallback is a FARPROC + public const int CALLBACK_TYPEMASK = unchecked((int)(0x70000));// callback type mask + public const int CALLBACK_NULL = unchecked((int)(0x0));// no callback + public const int CALLBACK_WINDOW = unchecked((int)(0x10000));// dwCallback is a HWND + public const int CALLBACK_TASK = unchecked((int)(0x20000));// dwCallback is a HTASK + public const int CALLBACK_FUNCTION = unchecked((int)(0x30000));// dwCallback is a FARPROC // manufacturer IDs - public const int MM_MICROSOFT = unchecked( (int)( 1 ) );// Microsoft Corp. + public const int MM_MICROSOFT = unchecked((int)(1));// Microsoft Corp. // product IDs - public const int MM_MIDI_MAPPER = unchecked( (int)( 1 ) );// MIDI Mapper - public const int MM_WAVE_MAPPER = unchecked( (int)( 2 ) );// Wave Mapper + public const int MM_MIDI_MAPPER = unchecked((int)(1));// MIDI Mapper + public const int MM_WAVE_MAPPER = unchecked((int)(2));// Wave Mapper - public const int MM_SNDBLST_MIDIOUT = unchecked( (int)( 3 ) );// Sound Blaster MIDI output port - public const int MM_SNDBLST_MIDIIN = unchecked( (int)( 4 ) );// Sound Blaster MIDI input port - public const int MM_SNDBLST_SYNTH = unchecked( (int)( 5 ) );// Sound Blaster internal synthesizer - public const int MM_SNDBLST_WAVEOUT = unchecked( (int)( 6 ) );// Sound Blaster waveform output - public const int MM_SNDBLST_WAVEIN = unchecked( (int)( 7 ) );// Sound Blaster waveform input + public const int MM_SNDBLST_MIDIOUT = unchecked((int)(3));// Sound Blaster MIDI output port + public const int MM_SNDBLST_MIDIIN = unchecked((int)(4));// Sound Blaster MIDI input port + public const int MM_SNDBLST_SYNTH = unchecked((int)(5));// Sound Blaster internal synthesizer + public const int MM_SNDBLST_WAVEOUT = unchecked((int)(6));// Sound Blaster waveform output + public const int MM_SNDBLST_WAVEIN = unchecked((int)(7));// Sound Blaster waveform input - public const int MM_ADLIB = unchecked( (int)( 9 ) );// Ad Lib-compatible synthesizer + public const int MM_ADLIB = unchecked((int)(9));// Ad Lib-compatible synthesizer - public const int MM_MPU401_MIDIOUT = unchecked( (int)( 10 ) );// MPU401-compatible MIDI output port - public const int MM_MPU401_MIDIIN = unchecked( (int)( 11 ) );// MPU401-compatible MIDI input port + public const int MM_MPU401_MIDIOUT = unchecked((int)(10));// MPU401-compatible MIDI output port + public const int MM_MPU401_MIDIIN = unchecked((int)(11));// MPU401-compatible MIDI input port - public const int MM_PC_JOYSTICK = unchecked( (int)( 12 ) );// Joystick adapter + public const int MM_PC_JOYSTICK = unchecked((int)(12));// Joystick adapter - [DllImport( "winmm.dll", EntryPoint = "mmsystemGetVersion", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("winmm.dll", EntryPoint = "mmsystemGetVersion", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int mmsystemGetVersion(); - [DllImport( "winmm.dll", EntryPoint = "OutputDebugStr", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void OutputDebugStr( string lpszOutputString ); + [DllImport("winmm.dll", EntryPoint = "OutputDebugStr", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void OutputDebugStr(string lpszOutputString); - [DllImport( "winmm.dll", EntryPoint = "sndPlaySound", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int sndPlaySound( string lpszSoundName, int uFlags ); + [DllImport("winmm.dll", EntryPoint = "sndPlaySound", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int sndPlaySound(string lpszSoundName, int uFlags); // flag values for uFlags parameter - public const int SND_SYNC = unchecked( (int)( 0x0 ) );// play synchronously (default) - public const int SND_ASYNC = unchecked( (int)( 0x1 ) );// play asynchronously + public const int SND_SYNC = unchecked((int)(0x0));// play synchronously (default) + public const int SND_ASYNC = unchecked((int)(0x1));// play asynchronously - public const int SND_NODEFAULT = unchecked( (int)( 0x2 ) );// silence not default, if sound not found + public const int SND_NODEFAULT = unchecked((int)(0x2));// silence not default, if sound not found - public const int SND_MEMORY = unchecked( (int)( 0x4 ) );// lpszSoundName points to a memory file - public const int SND_ALIAS = unchecked( (int)( 0x10000 ) );// name is a WIN.INI [sounds] entry - public const int SND_FILENAME = unchecked( (int)( 0x20000 ) );// name is a file name - public const int SND_RESOURCE = unchecked( (int)( 0x40004 ) );// name is a resource name or atom - public const int SND_ALIAS_ID = unchecked( (int)( 0x110000 ) );// name is a WIN.INI [sounds] entry identifier + public const int SND_MEMORY = unchecked((int)(0x4));// lpszSoundName points to a memory file + public const int SND_ALIAS = unchecked((int)(0x10000));// name is a WIN.INI [sounds] entry + public const int SND_FILENAME = unchecked((int)(0x20000));// name is a file name + public const int SND_RESOURCE = unchecked((int)(0x40004));// name is a resource name or atom + public const int SND_ALIAS_ID = unchecked((int)(0x110000));// name is a WIN.INI [sounds] entry identifier - public const int SND_ALIAS_START = unchecked( (int)( 0 ) );// must be > 4096 to keep strings in same section of resource file + public const int SND_ALIAS_START = unchecked((int)(0));// must be > 4096 to keep strings in same section of resource file - public const int SND_LOOP = unchecked( (int)( 0x8 ) );// loop the sound until next sndPlaySound - public const int SND_NOSTOP = unchecked( (int)( 0x10 ) );// don't stop any currently playing sound - public const int SND_VALID = unchecked( (int)( 0x1F ) );// valid flags / ;Internal / + public const int SND_LOOP = unchecked((int)(0x8));// loop the sound until next sndPlaySound + public const int SND_NOSTOP = unchecked((int)(0x10));// don't stop any currently playing sound + public const int SND_VALID = unchecked((int)(0x1F));// valid flags / ;Internal / - public const int SND_NOWAIT = unchecked( (int)( 0x2000 ) );// don't wait if the driver is busy + public const int SND_NOWAIT = unchecked((int)(0x2000));// don't wait if the driver is busy - public const int SND_VALIDFLAGS = unchecked( (int)( 0x17201F ) );// Set of valid flag bits. Anything outside + public const int SND_VALIDFLAGS = unchecked((int)(0x17201F));// Set of valid flag bits. Anything outside // this range will raise an error - public const int SND_RESERVED = unchecked( (int)( 0xFF000000 ) );// In particular these flags are reserved + public const int SND_RESERVED = unchecked((int)(0xFF000000));// In particular these flags are reserved - public const int SND_TYPE_MASK = unchecked( (int)( 0x170007 ) ); + public const int SND_TYPE_MASK = unchecked((int)(0x170007)); - [DllImport( "winmm.dll", EntryPoint = "PlaySound", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PlaySound( string lpszName, IntPtr hModule, int dwFlags ); + [DllImport("winmm.dll", EntryPoint = "PlaySound", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PlaySound(string lpszName, IntPtr hModule, int dwFlags); // waveform audio error return values - public const int WAVERR_BADFORMAT = unchecked( (int)( ( WAVERR_BASE + 0 ) ) );// unsupported wave format - public const int WAVERR_STILLPLAYING = unchecked( (int)( ( WAVERR_BASE + 1 ) ) );// still something playing - public const int WAVERR_UNPREPARED = unchecked( (int)( ( WAVERR_BASE + 2 ) ) );// header not prepared - public const int WAVERR_SYNC = unchecked( (int)( ( WAVERR_BASE + 3 ) ) );// device is synchronous - public const int WAVERR_LASTERROR = unchecked( (int)( ( WAVERR_BASE + 3 ) ) );// last error in range + public const int WAVERR_BADFORMAT = unchecked((int)((WAVERR_BASE + 0)));// unsupported wave format + public const int WAVERR_STILLPLAYING = unchecked((int)((WAVERR_BASE + 1)));// still something playing + public const int WAVERR_UNPREPARED = unchecked((int)((WAVERR_BASE + 2)));// header not prepared + public const int WAVERR_SYNC = unchecked((int)((WAVERR_BASE + 3)));// device is synchronous + public const int WAVERR_LASTERROR = unchecked((int)((WAVERR_BASE + 3)));// last error in range // wave callback messages - public const int WOM_OPEN = unchecked( (int)( MM_WOM_OPEN ) ); - public const int WOM_CLOSE = unchecked( (int)( MM_WOM_CLOSE ) ); - public const int WOM_DONE = unchecked( (int)( MM_WOM_DONE ) ); - public const int WIM_OPEN = unchecked( (int)( MM_WIM_OPEN ) ); - public const int WIM_CLOSE = unchecked( (int)( MM_WIM_CLOSE ) ); - public const int WIM_DATA = unchecked( (int)( MM_WIM_DATA ) ); + public const int WOM_OPEN = unchecked((int)(MM_WOM_OPEN)); + public const int WOM_CLOSE = unchecked((int)(MM_WOM_CLOSE)); + public const int WOM_DONE = unchecked((int)(MM_WOM_DONE)); + public const int WIM_OPEN = unchecked((int)(MM_WIM_OPEN)); + public const int WIM_CLOSE = unchecked((int)(MM_WIM_CLOSE)); + public const int WIM_DATA = unchecked((int)(MM_WIM_DATA)); // device ID for wave device mapper - public const int WAVE_MAPPER = unchecked( (int)( -1 ) ); + public const int WAVE_MAPPER = unchecked((int)(-1)); // flags for dwFlags parameter in waveOutOpen() and waveInOpen() - public const int WAVE_ALLOWSYNC = unchecked( (int)( 0x2 ) ); - public const int WAVE_VALID = unchecked( (int)( 0x3 ) );// ;Internal + public const int WAVE_ALLOWSYNC = unchecked((int)(0x2)); + public const int WAVE_VALID = unchecked((int)(0x3));// ;Internal - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct WAVEHDR { public string lpData; @@ -14095,20 +14095,20 @@ public struct WAVEHDR } // flags for dwFlags field of WAVEHDR - public const int WHDR_DONE = unchecked( (int)( 0x1 ) );// done bit - public const int WHDR_PREPARED = unchecked( (int)( 0x2 ) );// set if this header has been prepared - public const int WHDR_BEGINLOOP = unchecked( (int)( 0x4 ) );// loop start block - public const int WHDR_ENDLOOP = unchecked( (int)( 0x8 ) );// loop end block - public const int WHDR_INQUEUE = unchecked( (int)( 0x10 ) );// reserved for driver - public const int WHDR_VALID = unchecked( (int)( 0x1F ) );// valid flags / ;Internal / - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int WHDR_DONE = unchecked((int)(0x1));// done bit + public const int WHDR_PREPARED = unchecked((int)(0x2));// set if this header has been prepared + public const int WHDR_BEGINLOOP = unchecked((int)(0x4));// loop start block + public const int WHDR_ENDLOOP = unchecked((int)(0x8));// loop end block + public const int WHDR_INQUEUE = unchecked((int)(0x10));// reserved for driver + public const int WHDR_VALID = unchecked((int)(0x1F));// valid flags / ;Internal / + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct WAVEOUTCAPS { public int wMid; public int wPid; public int vDriverVersion; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = MAXPNAMELEN )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAXPNAMELEN)] public string szPname; public int dwFormats; public int wChannels; @@ -14116,43 +14116,43 @@ public struct WAVEOUTCAPS } // flags for dwSupport field of WAVEOUTCAPS - public const int WAVECAPS_PITCH = unchecked( (int)( 0x1 ) );// supports pitch control - public const int WAVECAPS_PLAYBACKRATE = unchecked( (int)( 0x2 ) );// supports playback rate control - public const int WAVECAPS_VOLUME = unchecked( (int)( 0x4 ) );// supports volume control - public const int WAVECAPS_LRVOLUME = unchecked( (int)( 0x8 ) );// separate left-right volume control - public const int WAVECAPS_SYNC = unchecked( (int)( 0x10 ) ); + public const int WAVECAPS_PITCH = unchecked((int)(0x1));// supports pitch control + public const int WAVECAPS_PLAYBACKRATE = unchecked((int)(0x2));// supports playback rate control + public const int WAVECAPS_VOLUME = unchecked((int)(0x4));// supports volume control + public const int WAVECAPS_LRVOLUME = unchecked((int)(0x8));// separate left-right volume control + public const int WAVECAPS_SYNC = unchecked((int)(0x10)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct WAVEINCAPS { public int wMid; public int wPid; public int vDriverVersion; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = MAXPNAMELEN )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAXPNAMELEN)] public string szPname; public int dwFormats; public int wChannels; } // defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS - public const int WAVE_INVALIDFORMAT = unchecked( (int)( 0x0 ) );// invalid format - public const int WAVE_FORMAT_1M08 = unchecked( (int)( 0x1 ) );// 11.025 kHz, Mono, 8-bit - public const int WAVE_FORMAT_1S08 = unchecked( (int)( 0x2 ) );// 11.025 kHz, Stereo, 8-bit - public const int WAVE_FORMAT_1M16 = unchecked( (int)( 0x4 ) );// 11.025 kHz, Mono, 16-bit - public const int WAVE_FORMAT_1S16 = unchecked( (int)( 0x8 ) );// 11.025 kHz, Stereo, 16-bit - public const int WAVE_FORMAT_2M08 = unchecked( (int)( 0x10 ) );// 22.05 kHz, Mono, 8-bit - public const int WAVE_FORMAT_2S08 = unchecked( (int)( 0x20 ) );// 22.05 kHz, Stereo, 8-bit - public const int WAVE_FORMAT_2M16 = unchecked( (int)( 0x40 ) );// 22.05 kHz, Mono, 16-bit - public const int WAVE_FORMAT_2S16 = unchecked( (int)( 0x80 ) );// 22.05 kHz, Stereo, 16-bit - public const int WAVE_FORMAT_4M08 = unchecked( (int)( 0x100 ) );// 44.1 kHz, Mono, 8-bit - public const int WAVE_FORMAT_4S08 = unchecked( (int)( 0x200 ) );// 44.1 kHz, Stereo, 8-bit - public const int WAVE_FORMAT_4M16 = unchecked( (int)( 0x400 ) );// 44.1 kHz, Mono, 16-bit - public const int WAVE_FORMAT_4S16 = unchecked( (int)( 0x800 ) );// 44.1 kHz, Stereo, 16-bit + public const int WAVE_INVALIDFORMAT = unchecked((int)(0x0));// invalid format + public const int WAVE_FORMAT_1M08 = unchecked((int)(0x1));// 11.025 kHz, Mono, 8-bit + public const int WAVE_FORMAT_1S08 = unchecked((int)(0x2));// 11.025 kHz, Stereo, 8-bit + public const int WAVE_FORMAT_1M16 = unchecked((int)(0x4));// 11.025 kHz, Mono, 16-bit + public const int WAVE_FORMAT_1S16 = unchecked((int)(0x8));// 11.025 kHz, Stereo, 16-bit + public const int WAVE_FORMAT_2M08 = unchecked((int)(0x10));// 22.05 kHz, Mono, 8-bit + public const int WAVE_FORMAT_2S08 = unchecked((int)(0x20));// 22.05 kHz, Stereo, 8-bit + public const int WAVE_FORMAT_2M16 = unchecked((int)(0x40));// 22.05 kHz, Mono, 16-bit + public const int WAVE_FORMAT_2S16 = unchecked((int)(0x80));// 22.05 kHz, Stereo, 16-bit + public const int WAVE_FORMAT_4M08 = unchecked((int)(0x100));// 44.1 kHz, Mono, 8-bit + public const int WAVE_FORMAT_4S08 = unchecked((int)(0x200));// 44.1 kHz, Stereo, 8-bit + public const int WAVE_FORMAT_4M16 = unchecked((int)(0x400));// 44.1 kHz, Mono, 16-bit + public const int WAVE_FORMAT_4S16 = unchecked((int)(0x800));// 44.1 kHz, Stereo, 16-bit // flags for wFormatTag field of WAVEFORMAT - public const int WAVE_FORMAT_PCM = unchecked( (int)( 1 ) );// Needed in resource files so outside #ifndef RC_INVOKED + public const int WAVE_FORMAT_PCM = unchecked((int)(1));// Needed in resource files so outside #ifndef RC_INVOKED - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct WAVEFORMAT { public int wFormatTag; @@ -14162,7 +14162,7 @@ public struct WAVEFORMAT public int nBlockAlign; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PCMWAVEFORMAT { public WAVEFORMAT wf; @@ -14170,155 +14170,155 @@ public struct PCMWAVEFORMAT } - [DllImport( "winmm.dll", EntryPoint = "waveOutGetNumDevs", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("winmm.dll", EntryPoint = "waveOutGetNumDevs", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int waveOutGetNumDevs(); - [DllImport( "winmm.dll", EntryPoint = "waveOutGetDevCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutGetDevCaps( int uDeviceID, ref WAVEOUTCAPS lpCaps, int uSize ); + [DllImport("winmm.dll", EntryPoint = "waveOutGetDevCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutGetDevCaps(int uDeviceID, ref WAVEOUTCAPS lpCaps, int uSize); - [DllImport( "winmm.dll", EntryPoint = "waveOutGetVolume", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutGetVolume( int uDeviceID, IntPtr lpdwVolume ); + [DllImport("winmm.dll", EntryPoint = "waveOutGetVolume", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutGetVolume(int uDeviceID, IntPtr lpdwVolume); - [DllImport( "winmm.dll", EntryPoint = "waveOutSetVolume", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutSetVolume( int uDeviceID, int dwVolume ); + [DllImport("winmm.dll", EntryPoint = "waveOutSetVolume", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutSetVolume(int uDeviceID, int dwVolume); - [DllImport( "winmm.dll", EntryPoint = "waveOutGetErrorText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutGetErrorText( int err, string lpText, int uSize ); + [DllImport("winmm.dll", EntryPoint = "waveOutGetErrorText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutGetErrorText(int err, string lpText, int uSize); - [DllImport( "winmm.dll", EntryPoint = "waveOutOpen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutOpen( IntPtr lphWaveOut, int uDeviceID, ref WAVEFORMAT lpFormat, int dwCallback, int dwInstance, int dwFlags ); + [DllImport("winmm.dll", EntryPoint = "waveOutOpen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutOpen(IntPtr lphWaveOut, int uDeviceID, ref WAVEFORMAT lpFormat, int dwCallback, int dwInstance, int dwFlags); - [DllImport( "winmm.dll", EntryPoint = "waveOutClose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutClose( IntPtr hWaveOut ); + [DllImport("winmm.dll", EntryPoint = "waveOutClose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutClose(IntPtr hWaveOut); - [DllImport( "winmm.dll", EntryPoint = "waveOutPrepareHeader", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutPrepareHeader( IntPtr hWaveOut, ref WAVEHDR lpWaveOutHdr, int uSize ); + [DllImport("winmm.dll", EntryPoint = "waveOutPrepareHeader", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutPrepareHeader(IntPtr hWaveOut, ref WAVEHDR lpWaveOutHdr, int uSize); - [DllImport( "winmm.dll", EntryPoint = "waveOutUnprepareHeader", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutUnprepareHeader( IntPtr hWaveOut, ref WAVEHDR lpWaveOutHdr, int uSize ); + [DllImport("winmm.dll", EntryPoint = "waveOutUnprepareHeader", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutUnprepareHeader(IntPtr hWaveOut, ref WAVEHDR lpWaveOutHdr, int uSize); - [DllImport( "winmm.dll", EntryPoint = "waveOutWrite", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutWrite( IntPtr hWaveOut, ref WAVEHDR lpWaveOutHdr, int uSize ); + [DllImport("winmm.dll", EntryPoint = "waveOutWrite", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutWrite(IntPtr hWaveOut, ref WAVEHDR lpWaveOutHdr, int uSize); - [DllImport( "winmm.dll", EntryPoint = "waveOutPause", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutPause( IntPtr hWaveOut ); + [DllImport("winmm.dll", EntryPoint = "waveOutPause", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutPause(IntPtr hWaveOut); - [DllImport( "winmm.dll", EntryPoint = "waveOutRestart", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutRestart( IntPtr hWaveOut ); + [DllImport("winmm.dll", EntryPoint = "waveOutRestart", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutRestart(IntPtr hWaveOut); - [DllImport( "winmm.dll", EntryPoint = "waveOutReset", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutReset( IntPtr hWaveOut ); + [DllImport("winmm.dll", EntryPoint = "waveOutReset", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutReset(IntPtr hWaveOut); - [DllImport( "winmm.dll", EntryPoint = "waveOutBreakLoop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutBreakLoop( IntPtr hWaveOut ); + [DllImport("winmm.dll", EntryPoint = "waveOutBreakLoop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutBreakLoop(IntPtr hWaveOut); - [DllImport( "winmm.dll", EntryPoint = "waveOutGetPosition", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutGetPosition( IntPtr hWaveOut, ref MMTIME lpInfo, int uSize ); + [DllImport("winmm.dll", EntryPoint = "waveOutGetPosition", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutGetPosition(IntPtr hWaveOut, ref MMTIME lpInfo, int uSize); - [DllImport( "winmm.dll", EntryPoint = "waveOutGetPitch", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutGetPitch( IntPtr hWaveOut, IntPtr lpdwPitch ); + [DllImport("winmm.dll", EntryPoint = "waveOutGetPitch", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutGetPitch(IntPtr hWaveOut, IntPtr lpdwPitch); - [DllImport( "winmm.dll", EntryPoint = "waveOutSetPitch", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutSetPitch( IntPtr hWaveOut, int dwPitch ); + [DllImport("winmm.dll", EntryPoint = "waveOutSetPitch", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutSetPitch(IntPtr hWaveOut, int dwPitch); - [DllImport( "winmm.dll", EntryPoint = "waveOutGetPlaybackRate", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutGetPlaybackRate( IntPtr hWaveOut, IntPtr lpdwRate ); + [DllImport("winmm.dll", EntryPoint = "waveOutGetPlaybackRate", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutGetPlaybackRate(IntPtr hWaveOut, IntPtr lpdwRate); - [DllImport( "winmm.dll", EntryPoint = "waveOutSetPlaybackRate", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutSetPlaybackRate( IntPtr hWaveOut, int dwRate ); + [DllImport("winmm.dll", EntryPoint = "waveOutSetPlaybackRate", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutSetPlaybackRate(IntPtr hWaveOut, int dwRate); - [DllImport( "winmm.dll", EntryPoint = "waveOutGetID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutGetID( IntPtr hWaveOut, IntPtr lpuDeviceID ); + [DllImport("winmm.dll", EntryPoint = "waveOutGetID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutGetID(IntPtr hWaveOut, IntPtr lpuDeviceID); - [DllImport( "winmm.dll", EntryPoint = "waveOutMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveOutMessage( IntPtr hWaveOut, int msg, int dw1, int dw2 ); + [DllImport("winmm.dll", EntryPoint = "waveOutMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveOutMessage(IntPtr hWaveOut, int msg, int dw1, int dw2); - [DllImport( "winmm.dll", EntryPoint = "waveInGetNumDevs", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("winmm.dll", EntryPoint = "waveInGetNumDevs", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int waveInGetNumDevs(); - [DllImport( "winmm.dll", EntryPoint = "waveInGetDevCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveInGetDevCaps( int uDeviceID, ref WAVEINCAPS lpCaps, int uSize ); + [DllImport("winmm.dll", EntryPoint = "waveInGetDevCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveInGetDevCaps(int uDeviceID, ref WAVEINCAPS lpCaps, int uSize); - [DllImport( "winmm.dll", EntryPoint = "waveInGetErrorText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveInGetErrorText( int err, string lpText, int uSize ); + [DllImport("winmm.dll", EntryPoint = "waveInGetErrorText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveInGetErrorText(int err, string lpText, int uSize); - [DllImport( "winmm.dll", EntryPoint = "waveInOpen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveInOpen( IntPtr lphWaveIn, int uDeviceID, ref WAVEFORMAT lpFormat, int dwCallback, int dwInstance, int dwFlags ); + [DllImport("winmm.dll", EntryPoint = "waveInOpen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveInOpen(IntPtr lphWaveIn, int uDeviceID, ref WAVEFORMAT lpFormat, int dwCallback, int dwInstance, int dwFlags); - [DllImport( "winmm.dll", EntryPoint = "waveInClose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveInClose( IntPtr hWaveIn ); + [DllImport("winmm.dll", EntryPoint = "waveInClose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveInClose(IntPtr hWaveIn); - [DllImport( "winmm.dll", EntryPoint = "waveInPrepareHeader", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveInPrepareHeader( IntPtr hWaveIn, ref WAVEHDR lpWaveInHdr, int uSize ); + [DllImport("winmm.dll", EntryPoint = "waveInPrepareHeader", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveInPrepareHeader(IntPtr hWaveIn, ref WAVEHDR lpWaveInHdr, int uSize); - [DllImport( "winmm.dll", EntryPoint = "waveInUnprepareHeader", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveInUnprepareHeader( IntPtr hWaveIn, ref WAVEHDR lpWaveInHdr, int uSize ); + [DllImport("winmm.dll", EntryPoint = "waveInUnprepareHeader", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveInUnprepareHeader(IntPtr hWaveIn, ref WAVEHDR lpWaveInHdr, int uSize); - [DllImport( "winmm.dll", EntryPoint = "waveInAddBuffer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveInAddBuffer( IntPtr hWaveIn, ref WAVEHDR lpWaveInHdr, int uSize ); + [DllImport("winmm.dll", EntryPoint = "waveInAddBuffer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveInAddBuffer(IntPtr hWaveIn, ref WAVEHDR lpWaveInHdr, int uSize); - [DllImport( "winmm.dll", EntryPoint = "waveInStart", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveInStart( IntPtr hWaveIn ); + [DllImport("winmm.dll", EntryPoint = "waveInStart", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveInStart(IntPtr hWaveIn); - [DllImport( "winmm.dll", EntryPoint = "waveInStop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveInStop( IntPtr hWaveIn ); + [DllImport("winmm.dll", EntryPoint = "waveInStop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveInStop(IntPtr hWaveIn); - [DllImport( "winmm.dll", EntryPoint = "waveInReset", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveInReset( IntPtr hWaveIn ); + [DllImport("winmm.dll", EntryPoint = "waveInReset", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveInReset(IntPtr hWaveIn); - [DllImport( "winmm.dll", EntryPoint = "waveInGetPosition", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveInGetPosition( IntPtr hWaveIn, ref MMTIME lpInfo, int uSize ); + [DllImport("winmm.dll", EntryPoint = "waveInGetPosition", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveInGetPosition(IntPtr hWaveIn, ref MMTIME lpInfo, int uSize); - [DllImport( "winmm.dll", EntryPoint = "waveInGetID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveInGetID( IntPtr hWaveIn, IntPtr lpuDeviceID ); + [DllImport("winmm.dll", EntryPoint = "waveInGetID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveInGetID(IntPtr hWaveIn, IntPtr lpuDeviceID); - [DllImport( "winmm.dll", EntryPoint = "waveInMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int waveInMessage( IntPtr hWaveIn, int msg, int dw1, int dw2 ); + [DllImport("winmm.dll", EntryPoint = "waveInMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int waveInMessage(IntPtr hWaveIn, int msg, int dw1, int dw2); // MIDI error return values - public const int MIDIERR_UNPREPARED = unchecked( (int)( ( MIDIERR_BASE + 0 ) ) );// header not prepared - public const int MIDIERR_STILLPLAYING = unchecked( (int)( ( MIDIERR_BASE + 1 ) ) );// still something playing - public const int MIDIERR_NOMAP = unchecked( (int)( ( MIDIERR_BASE + 2 ) ) );// no current map - public const int MIDIERR_NOTREADY = unchecked( (int)( ( MIDIERR_BASE + 3 ) ) );// hardware is still busy - public const int MIDIERR_NODEVICE = unchecked( (int)( ( MIDIERR_BASE + 4 ) ) );// port no longer connected - public const int MIDIERR_INVALIDSETUP = unchecked( (int)( ( MIDIERR_BASE + 5 ) ) );// invalid setup - public const int MIDIERR_LASTERROR = unchecked( (int)( ( MIDIERR_BASE + 5 ) ) );// last error in range + public const int MIDIERR_UNPREPARED = unchecked((int)((MIDIERR_BASE + 0)));// header not prepared + public const int MIDIERR_STILLPLAYING = unchecked((int)((MIDIERR_BASE + 1)));// still something playing + public const int MIDIERR_NOMAP = unchecked((int)((MIDIERR_BASE + 2)));// no current map + public const int MIDIERR_NOTREADY = unchecked((int)((MIDIERR_BASE + 3)));// hardware is still busy + public const int MIDIERR_NODEVICE = unchecked((int)((MIDIERR_BASE + 4)));// port no longer connected + public const int MIDIERR_INVALIDSETUP = unchecked((int)((MIDIERR_BASE + 5)));// invalid setup + public const int MIDIERR_LASTERROR = unchecked((int)((MIDIERR_BASE + 5)));// last error in range // MIDI callback messages - public const int MIM_OPEN = unchecked( (int)( MM_MIM_OPEN ) ); - public const int MIM_CLOSE = unchecked( (int)( MM_MIM_CLOSE ) ); - public const int MIM_DATA = unchecked( (int)( MM_MIM_DATA ) ); - public const int MIM_LONGDATA = unchecked( (int)( MM_MIM_LONGDATA ) ); - public const int MIM_ERROR = unchecked( (int)( MM_MIM_ERROR ) ); - public const int MIM_LONGERROR = unchecked( (int)( MM_MIM_LONGERROR ) ); - public const int MOM_OPEN = unchecked( (int)( MM_MOM_OPEN ) ); - public const int MOM_CLOSE = unchecked( (int)( MM_MOM_CLOSE ) ); - public const int MOM_DONE = unchecked( (int)( MM_MOM_DONE ) ); + public const int MIM_OPEN = unchecked((int)(MM_MIM_OPEN)); + public const int MIM_CLOSE = unchecked((int)(MM_MIM_CLOSE)); + public const int MIM_DATA = unchecked((int)(MM_MIM_DATA)); + public const int MIM_LONGDATA = unchecked((int)(MM_MIM_LONGDATA)); + public const int MIM_ERROR = unchecked((int)(MM_MIM_ERROR)); + public const int MIM_LONGERROR = unchecked((int)(MM_MIM_LONGERROR)); + public const int MOM_OPEN = unchecked((int)(MM_MOM_OPEN)); + public const int MOM_CLOSE = unchecked((int)(MM_MOM_CLOSE)); + public const int MOM_DONE = unchecked((int)(MM_MOM_DONE)); // device ID for MIDI mapper - public const int MIDIMAPPER = unchecked( (int)( ( -1 ) ) );// Cannot be cast to DWORD as RC complains - public const int MIDI_MAPPER = unchecked( (int)( -1 ) ); + public const int MIDIMAPPER = unchecked((int)((-1)));// Cannot be cast to DWORD as RC complains + public const int MIDI_MAPPER = unchecked((int)(-1)); // flags for wFlags parm of midiOutCachePatches(), midiOutCacheDrumPatches() - public const int MIDI_CACHE_ALL = unchecked( (int)( 1 ) ); - public const int MIDI_CACHE_BESTFIT = unchecked( (int)( 2 ) ); - public const int MIDI_CACHE_QUERY = unchecked( (int)( 3 ) ); - public const int MIDI_UNCACHE = unchecked( (int)( 4 ) ); - public const int MIDI_CACHE_VALID = unchecked( (int)( ( MIDI_CACHE_ALL | MIDI_CACHE_BESTFIT | MIDI_CACHE_QUERY | MIDI_UNCACHE ) ) );// ;Internal + public const int MIDI_CACHE_ALL = unchecked((int)(1)); + public const int MIDI_CACHE_BESTFIT = unchecked((int)(2)); + public const int MIDI_CACHE_QUERY = unchecked((int)(3)); + public const int MIDI_UNCACHE = unchecked((int)(4)); + public const int MIDI_CACHE_VALID = unchecked((int)((MIDI_CACHE_ALL | MIDI_CACHE_BESTFIT | MIDI_CACHE_QUERY | MIDI_UNCACHE)));// ;Internal - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MIDIOUTCAPS { public int wMid; public int wPid; public int vDriverVersion; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = MAXPNAMELEN )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAXPNAMELEN)] public string szPname; public int wTechnology; public int wVoices; @@ -14328,28 +14328,28 @@ public struct MIDIOUTCAPS } // flags for wTechnology field of MIDIOUTCAPS structure - public const int MOD_MIDIPORT = unchecked( (int)( 1 ) );// output port - public const int MOD_SYNTH = unchecked( (int)( 2 ) );// generic internal synth - public const int MOD_SQSYNTH = unchecked( (int)( 3 ) );// square wave internal synth - public const int MOD_FMSYNTH = unchecked( (int)( 4 ) );// FM internal synth - public const int MOD_MAPPER = unchecked( (int)( 5 ) );// MIDI mapper + public const int MOD_MIDIPORT = unchecked((int)(1));// output port + public const int MOD_SYNTH = unchecked((int)(2));// generic internal synth + public const int MOD_SQSYNTH = unchecked((int)(3));// square wave internal synth + public const int MOD_FMSYNTH = unchecked((int)(4));// FM internal synth + public const int MOD_MAPPER = unchecked((int)(5));// MIDI mapper // flags for dwSupport field of MIDIOUTCAPS - public const int MIDICAPS_VOLUME = unchecked( (int)( 0x1 ) );// supports volume control - public const int MIDICAPS_LRVOLUME = unchecked( (int)( 0x2 ) );// separate left-right volume control - public const int MIDICAPS_CACHE = unchecked( (int)( 0x4 ) ); + public const int MIDICAPS_VOLUME = unchecked((int)(0x1));// supports volume control + public const int MIDICAPS_LRVOLUME = unchecked((int)(0x2));// separate left-right volume control + public const int MIDICAPS_CACHE = unchecked((int)(0x4)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MIDIINCAPS { public int wMid; public int wPid; public int vDriverVersion; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = MAXPNAMELEN )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAXPNAMELEN)] public string szPname; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MIDIHDR { public string lpData; @@ -14362,152 +14362,152 @@ public struct MIDIHDR } // flags for dwFlags field of MIDIHDR structure - public const int MHDR_DONE = unchecked( (int)( 0x1 ) );// done bit - public const int MHDR_PREPARED = unchecked( (int)( 0x2 ) );// set if header prepared - public const int MHDR_INQUEUE = unchecked( (int)( 0x4 ) );// reserved for driver - public const int MHDR_VALID = unchecked( (int)( 0x7 ) );// valid flags / ;Internal / + public const int MHDR_DONE = unchecked((int)(0x1));// done bit + public const int MHDR_PREPARED = unchecked((int)(0x2));// set if header prepared + public const int MHDR_INQUEUE = unchecked((int)(0x4));// reserved for driver + public const int MHDR_VALID = unchecked((int)(0x7));// valid flags / ;Internal / - [DllImport( "winmm.dll", EntryPoint = "midiOutGetDevCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiOutGetDevCaps( int uDeviceID, ref MIDIOUTCAPS lpCaps, int uSize ); + [DllImport("winmm.dll", EntryPoint = "midiOutGetDevCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiOutGetDevCaps(int uDeviceID, ref MIDIOUTCAPS lpCaps, int uSize); - [DllImport( "winmm.dll", EntryPoint = "midiOutGetVolume", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiOutGetVolume( int uDeviceID, IntPtr lpdwVolume ); + [DllImport("winmm.dll", EntryPoint = "midiOutGetVolume", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiOutGetVolume(int uDeviceID, IntPtr lpdwVolume); - [DllImport( "winmm.dll", EntryPoint = "midiOutSetVolume", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiOutSetVolume( int uDeviceID, int dwVolume ); + [DllImport("winmm.dll", EntryPoint = "midiOutSetVolume", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiOutSetVolume(int uDeviceID, int dwVolume); - [DllImport( "winmm.dll", EntryPoint = "midiOutGetErrorText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiOutGetErrorText( int err, string lpText, int uSize ); + [DllImport("winmm.dll", EntryPoint = "midiOutGetErrorText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiOutGetErrorText(int err, string lpText, int uSize); - [DllImport( "winmm.dll", EntryPoint = "midiOutOpen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiOutOpen( IntPtr lphMidiOut, int uDeviceID, int dwCallback, int dwInstance, int dwFlags ); + [DllImport("winmm.dll", EntryPoint = "midiOutOpen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiOutOpen(IntPtr lphMidiOut, int uDeviceID, int dwCallback, int dwInstance, int dwFlags); - [DllImport( "winmm.dll", EntryPoint = "midiOutClose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiOutClose( IntPtr hMidiOut ); + [DllImport("winmm.dll", EntryPoint = "midiOutClose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiOutClose(IntPtr hMidiOut); - [DllImport( "winmm.dll", EntryPoint = "midiOutPrepareHeader", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiOutPrepareHeader( IntPtr hMidiOut, ref MIDIHDR lpMidiOutHdr, int uSize ); + [DllImport("winmm.dll", EntryPoint = "midiOutPrepareHeader", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiOutPrepareHeader(IntPtr hMidiOut, ref MIDIHDR lpMidiOutHdr, int uSize); - [DllImport( "winmm.dll", EntryPoint = "midiOutUnprepareHeader", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiOutUnprepareHeader( IntPtr hMidiOut, ref MIDIHDR lpMidiOutHdr, int uSize ); + [DllImport("winmm.dll", EntryPoint = "midiOutUnprepareHeader", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiOutUnprepareHeader(IntPtr hMidiOut, ref MIDIHDR lpMidiOutHdr, int uSize); - [DllImport( "winmm.dll", EntryPoint = "midiOutShortMsg", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiOutShortMsg( IntPtr hMidiOut, int dwMsg ); + [DllImport("winmm.dll", EntryPoint = "midiOutShortMsg", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiOutShortMsg(IntPtr hMidiOut, int dwMsg); - [DllImport( "winmm.dll", EntryPoint = "midiOutLongMsg", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiOutLongMsg( IntPtr hMidiOut, ref MIDIHDR lpMidiOutHdr, int uSize ); + [DllImport("winmm.dll", EntryPoint = "midiOutLongMsg", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiOutLongMsg(IntPtr hMidiOut, ref MIDIHDR lpMidiOutHdr, int uSize); - [DllImport( "winmm.dll", EntryPoint = "midiOutReset", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiOutReset( IntPtr hMidiOut ); + [DllImport("winmm.dll", EntryPoint = "midiOutReset", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiOutReset(IntPtr hMidiOut); - [DllImport( "winmm.dll", EntryPoint = "midiOutCachePatches", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiOutCachePatches( IntPtr hMidiOut, int uBank, IntPtr lpPatchArray, int uFlags ); + [DllImport("winmm.dll", EntryPoint = "midiOutCachePatches", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiOutCachePatches(IntPtr hMidiOut, int uBank, IntPtr lpPatchArray, int uFlags); - [DllImport( "winmm.dll", EntryPoint = "midiOutCacheDrumPatches", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiOutCacheDrumPatches( IntPtr hMidiOut, int uPatch, IntPtr lpKeyArray, int uFlags ); + [DllImport("winmm.dll", EntryPoint = "midiOutCacheDrumPatches", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiOutCacheDrumPatches(IntPtr hMidiOut, int uPatch, IntPtr lpKeyArray, int uFlags); - [DllImport( "winmm.dll", EntryPoint = "midiOutGetID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiOutGetID( IntPtr hMidiOut, IntPtr lpuDeviceID ); + [DllImport("winmm.dll", EntryPoint = "midiOutGetID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiOutGetID(IntPtr hMidiOut, IntPtr lpuDeviceID); - [DllImport( "winmm.dll", EntryPoint = "midiOutMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiOutMessage( IntPtr hMidiOut, int msg, int dw1, int dw2 ); + [DllImport("winmm.dll", EntryPoint = "midiOutMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiOutMessage(IntPtr hMidiOut, int msg, int dw1, int dw2); - [DllImport( "winmm.dll", EntryPoint = "midiInGetNumDevs", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("winmm.dll", EntryPoint = "midiInGetNumDevs", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int midiInGetNumDevs(); - [DllImport( "winmm.dll", EntryPoint = "midiInGetDevCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiInGetDevCaps( int uDeviceID, ref MIDIINCAPS lpCaps, int uSize ); + [DllImport("winmm.dll", EntryPoint = "midiInGetDevCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiInGetDevCaps(int uDeviceID, ref MIDIINCAPS lpCaps, int uSize); - [DllImport( "winmm.dll", EntryPoint = "midiInGetErrorText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiInGetErrorText( int err, string lpText, int uSize ); + [DllImport("winmm.dll", EntryPoint = "midiInGetErrorText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiInGetErrorText(int err, string lpText, int uSize); - [DllImport( "winmm.dll", EntryPoint = "midiInOpen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiInOpen( IntPtr lphMidiIn, int uDeviceID, int dwCallback, int dwInstance, int dwFlags ); + [DllImport("winmm.dll", EntryPoint = "midiInOpen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiInOpen(IntPtr lphMidiIn, int uDeviceID, int dwCallback, int dwInstance, int dwFlags); - [DllImport( "winmm.dll", EntryPoint = "midiInClose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiInClose( IntPtr hMidiIn ); + [DllImport("winmm.dll", EntryPoint = "midiInClose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiInClose(IntPtr hMidiIn); - [DllImport( "winmm.dll", EntryPoint = "midiInPrepareHeader", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiInPrepareHeader( IntPtr hMidiIn, ref MIDIHDR lpMidiInHdr, int uSize ); + [DllImport("winmm.dll", EntryPoint = "midiInPrepareHeader", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiInPrepareHeader(IntPtr hMidiIn, ref MIDIHDR lpMidiInHdr, int uSize); - [DllImport( "winmm.dll", EntryPoint = "midiInUnprepareHeader", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiInUnprepareHeader( IntPtr hMidiIn, ref MIDIHDR lpMidiInHdr, int uSize ); + [DllImport("winmm.dll", EntryPoint = "midiInUnprepareHeader", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiInUnprepareHeader(IntPtr hMidiIn, ref MIDIHDR lpMidiInHdr, int uSize); - [DllImport( "winmm.dll", EntryPoint = "midiInAddBuffer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiInAddBuffer( IntPtr hMidiIn, ref MIDIHDR lpMidiInHdr, int uSize ); + [DllImport("winmm.dll", EntryPoint = "midiInAddBuffer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiInAddBuffer(IntPtr hMidiIn, ref MIDIHDR lpMidiInHdr, int uSize); - [DllImport( "winmm.dll", EntryPoint = "midiInStart", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiInStart( IntPtr hMidiIn ); + [DllImport("winmm.dll", EntryPoint = "midiInStart", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiInStart(IntPtr hMidiIn); - [DllImport( "winmm.dll", EntryPoint = "midiInStop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiInStop( IntPtr hMidiIn ); + [DllImport("winmm.dll", EntryPoint = "midiInStop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiInStop(IntPtr hMidiIn); - [DllImport( "winmm.dll", EntryPoint = "midiInReset", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiInReset( IntPtr hMidiIn ); + [DllImport("winmm.dll", EntryPoint = "midiInReset", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiInReset(IntPtr hMidiIn); - [DllImport( "winmm.dll", EntryPoint = "midiInGetID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiInGetID( IntPtr hMidiIn, IntPtr lpuDeviceID ); + [DllImport("winmm.dll", EntryPoint = "midiInGetID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiInGetID(IntPtr hMidiIn, IntPtr lpuDeviceID); - [DllImport( "winmm.dll", EntryPoint = "midiInMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int midiInMessage( IntPtr hMidiIn, int msg, int dw1, int dw2 ); + [DllImport("winmm.dll", EntryPoint = "midiInMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int midiInMessage(IntPtr hMidiIn, int msg, int dw1, int dw2); // device ID for aux device mapper - public const int AUX_MAPPER = unchecked( (int)( -1 ) ); + public const int AUX_MAPPER = unchecked((int)(-1)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct AUXCAPS { public int wMid; public int wPid; public int vDriverVersion; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = MAXPNAMELEN )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAXPNAMELEN)] public string szPname; public int wTechnology; public int dwSupport; } // flags for wTechnology field in AUXCAPS structure - public const int AUXCAPS_CDAUDIO = unchecked( (int)( 1 ) );// audio from internal CD-ROM drive - public const int AUXCAPS_AUXIN = unchecked( (int)( 2 ) );// audio from auxiliary input jacks + public const int AUXCAPS_CDAUDIO = unchecked((int)(1));// audio from internal CD-ROM drive + public const int AUXCAPS_AUXIN = unchecked((int)(2));// audio from auxiliary input jacks // flags for dwSupport field in AUXCAPS structure - public const int AUXCAPS_VOLUME = unchecked( (int)( 0x1 ) );// supports volume control - public const int AUXCAPS_LRVOLUME = unchecked( (int)( 0x2 ) );// separate left-right volume control + public const int AUXCAPS_VOLUME = unchecked((int)(0x1));// supports volume control + public const int AUXCAPS_LRVOLUME = unchecked((int)(0x2));// separate left-right volume control - [DllImport( "winmm.dll", EntryPoint = "auxGetNumDevs", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("winmm.dll", EntryPoint = "auxGetNumDevs", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int auxGetNumDevs(); - [DllImport( "winmm.dll", EntryPoint = "auxGetDevCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int auxGetDevCaps( int uDeviceID, ref AUXCAPS lpCaps, int uSize ); + [DllImport("winmm.dll", EntryPoint = "auxGetDevCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int auxGetDevCaps(int uDeviceID, ref AUXCAPS lpCaps, int uSize); - [DllImport( "winmm.dll", EntryPoint = "auxSetVolume", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int auxSetVolume( int uDeviceID, int dwVolume ); + [DllImport("winmm.dll", EntryPoint = "auxSetVolume", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int auxSetVolume(int uDeviceID, int dwVolume); - [DllImport( "winmm.dll", EntryPoint = "auxGetVolume", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int auxGetVolume( int uDeviceID, IntPtr lpdwVolume ); + [DllImport("winmm.dll", EntryPoint = "auxGetVolume", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int auxGetVolume(int uDeviceID, IntPtr lpdwVolume); - [DllImport( "winmm.dll", EntryPoint = "auxOutMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int auxOutMessage( int uDeviceID, int msg, int dw1, int dw2 ); + [DllImport("winmm.dll", EntryPoint = "auxOutMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int auxOutMessage(int uDeviceID, int msg, int dw1, int dw2); // timer error return values - public const int TIMERR_NOERROR = unchecked( (int)( ( 0 ) ) );// no error - public const int TIMERR_NOCANDO = unchecked( (int)( ( TIMERR_BASE + 1 ) ) );// request not completed - public const int TIMERR_STRUCT = unchecked( (int)( ( TIMERR_BASE + 33 ) ) );// time struct size + public const int TIMERR_NOERROR = unchecked((int)((0)));// no error + public const int TIMERR_NOCANDO = unchecked((int)((TIMERR_BASE + 1)));// request not completed + public const int TIMERR_STRUCT = unchecked((int)((TIMERR_BASE + 33)));// time struct size // flags for wFlags parameter of timeSetEvent() function - public const int TIME_ONESHOT = unchecked( (int)( 0 ) );// program timer for single event - public const int TIME_PERIODIC = unchecked( (int)( 1 ) );// program for continuous periodic event + public const int TIME_ONESHOT = unchecked((int)(0));// program timer for single event + public const int TIME_PERIODIC = unchecked((int)(1));// program for continuous periodic event - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct TIMECAPS { public int wPeriodMin; @@ -14515,53 +14515,53 @@ public struct TIMECAPS } - [DllImport( "winmm.dll", EntryPoint = "timeGetSystemTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int timeGetSystemTime( ref MMTIME lpTime, int uSize ); + [DllImport("winmm.dll", EntryPoint = "timeGetSystemTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int timeGetSystemTime(ref MMTIME lpTime, int uSize); - [DllImport( "winmm.dll", EntryPoint = "timeGetTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("winmm.dll", EntryPoint = "timeGetTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int timeGetTime(); - [DllImport( "winmm.dll", EntryPoint = "timeSetEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int timeSetEvent( int uDelay, int uResolution, IntPtr lpFunction, int dwUser, int uFlags ); + [DllImport("winmm.dll", EntryPoint = "timeSetEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int timeSetEvent(int uDelay, int uResolution, IntPtr lpFunction, int dwUser, int uFlags); - [DllImport( "winmm.dll", EntryPoint = "timeKillEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int timeKillEvent( int uID ); + [DllImport("winmm.dll", EntryPoint = "timeKillEvent", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int timeKillEvent(int uID); - [DllImport( "winmm.dll", EntryPoint = "timeGetDevCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int timeGetDevCaps( ref TIMECAPS lpTimeCaps, int uSize ); + [DllImport("winmm.dll", EntryPoint = "timeGetDevCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int timeGetDevCaps(ref TIMECAPS lpTimeCaps, int uSize); - [DllImport( "winmm.dll", EntryPoint = "timeBeginPeriod", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int timeBeginPeriod( int uPeriod ); + [DllImport("winmm.dll", EntryPoint = "timeBeginPeriod", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int timeBeginPeriod(int uPeriod); - [DllImport( "winmm.dll", EntryPoint = "timeEndPeriod", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int timeEndPeriod( int uPeriod ); + [DllImport("winmm.dll", EntryPoint = "timeEndPeriod", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int timeEndPeriod(int uPeriod); // joystick error return values - public const int JOYERR_NOERROR = unchecked( (int)( ( 0 ) ) );// no error - public const int JOYERR_PARMS = unchecked( (int)( ( JOYERR_BASE + 5 ) ) );// bad parameters - public const int JOYERR_NOCANDO = unchecked( (int)( ( JOYERR_BASE + 6 ) ) );// request not completed - public const int JOYERR_UNPLUGGED = unchecked( (int)( ( JOYERR_BASE + 7 ) ) );// joystick is unplugged + public const int JOYERR_NOERROR = unchecked((int)((0)));// no error + public const int JOYERR_PARMS = unchecked((int)((JOYERR_BASE + 5)));// bad parameters + public const int JOYERR_NOCANDO = unchecked((int)((JOYERR_BASE + 6)));// request not completed + public const int JOYERR_UNPLUGGED = unchecked((int)((JOYERR_BASE + 7)));// joystick is unplugged // constants used with JOYINFO structure and MM_JOY messages - public const int JOY_BUTTON1 = unchecked( (int)( 0x1 ) ); - public const int JOY_BUTTON2 = unchecked( (int)( 0x2 ) ); - public const int JOY_BUTTON3 = unchecked( (int)( 0x4 ) ); - public const int JOY_BUTTON4 = unchecked( (int)( 0x8 ) ); - public const int JOY_BUTTON1CHG = unchecked( (int)( 0x100 ) ); - public const int JOY_BUTTON2CHG = unchecked( (int)( 0x200 ) ); - public const int JOY_BUTTON3CHG = unchecked( (int)( 0x400 ) ); - public const int JOY_BUTTON4CHG = unchecked( (int)( 0x800 ) ); + public const int JOY_BUTTON1 = unchecked((int)(0x1)); + public const int JOY_BUTTON2 = unchecked((int)(0x2)); + public const int JOY_BUTTON3 = unchecked((int)(0x4)); + public const int JOY_BUTTON4 = unchecked((int)(0x8)); + public const int JOY_BUTTON1CHG = unchecked((int)(0x100)); + public const int JOY_BUTTON2CHG = unchecked((int)(0x200)); + public const int JOY_BUTTON3CHG = unchecked((int)(0x400)); + public const int JOY_BUTTON4CHG = unchecked((int)(0x800)); // joystick ID constants - public const int JOYSTICKID1 = unchecked( (int)( 0 ) ); - public const int JOYSTICKID2 = unchecked( (int)( 1 ) ); + public const int JOYSTICKID1 = unchecked((int)(0)); + public const int JOYSTICKID2 = unchecked((int)(1)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct JOYCAPS { public int wMid; public int wPid; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = MAXPNAMELEN )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAXPNAMELEN)] public string szPname; public int wXmin; public int wXmax; @@ -14574,7 +14574,7 @@ public struct JOYCAPS public int wPeriodMax; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct JOYINFO { public int wXpos; @@ -14584,42 +14584,42 @@ public struct JOYINFO } - [DllImport( "winmm.dll", EntryPoint = "joyGetDevCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int joyGetDevCaps( int id, ref JOYCAPS lpCaps, int uSize ); + [DllImport("winmm.dll", EntryPoint = "joyGetDevCaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int joyGetDevCaps(int id, ref JOYCAPS lpCaps, int uSize); - [DllImport( "winmm.dll", EntryPoint = "joyGetNumDev", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("winmm.dll", EntryPoint = "joyGetNumDev", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int joyGetNumDevs(); - [DllImport( "winmm.dll", EntryPoint = "joyGetThreshold", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int joyGetThreshold( int id, IntPtr lpuThreshold ); + [DllImport("winmm.dll", EntryPoint = "joyGetThreshold", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int joyGetThreshold(int id, IntPtr lpuThreshold); - [DllImport( "winmm.dll", EntryPoint = "joyReleaseCapture", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int joyReleaseCapture( int id ); + [DllImport("winmm.dll", EntryPoint = "joyReleaseCapture", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int joyReleaseCapture(int id); - [DllImport( "winmm.dll", EntryPoint = "joySetCapture", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int joySetCapture( IntPtr hWnd, int uID, int uPeriod, int bChanged ); + [DllImport("winmm.dll", EntryPoint = "joySetCapture", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int joySetCapture(IntPtr hWnd, int uID, int uPeriod, int bChanged); - [DllImport( "winmm.dll", EntryPoint = "joySetThreshold", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int joySetThreshold( int id, int uThreshold ); + [DllImport("winmm.dll", EntryPoint = "joySetThreshold", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int joySetThreshold(int id, int uThreshold); // MMIO error return values - public const int MMIOERR_BASE = unchecked( (int)( 256 ) ); - public const int MMIOERR_FILENOTFOUND = unchecked( (int)( ( MMIOERR_BASE + 1 ) ) );// file not found - public const int MMIOERR_OUTOFMEMORY = unchecked( (int)( ( MMIOERR_BASE + 2 ) ) );// out of memory - public const int MMIOERR_CANNOTOPEN = unchecked( (int)( ( MMIOERR_BASE + 3 ) ) );// cannot open - public const int MMIOERR_CANNOTCLOSE = unchecked( (int)( ( MMIOERR_BASE + 4 ) ) );// cannot close - public const int MMIOERR_CANNOTREAD = unchecked( (int)( ( MMIOERR_BASE + 5 ) ) );// cannot read - public const int MMIOERR_CANNOTWRITE = unchecked( (int)( ( MMIOERR_BASE + 6 ) ) );// cannot write - public const int MMIOERR_CANNOTSEEK = unchecked( (int)( ( MMIOERR_BASE + 7 ) ) );// cannot seek - public const int MMIOERR_CANNOTEXPAND = unchecked( (int)( ( MMIOERR_BASE + 8 ) ) );// cannot expand file - public const int MMIOERR_CHUNKNOTFOUND = unchecked( (int)( ( MMIOERR_BASE + 9 ) ) );// chunk not found - public const int MMIOERR_UNBUFFERED = unchecked( (int)( ( MMIOERR_BASE + 10 ) ) );// file is unbuffered + public const int MMIOERR_BASE = unchecked((int)(256)); + public const int MMIOERR_FILENOTFOUND = unchecked((int)((MMIOERR_BASE + 1)));// file not found + public const int MMIOERR_OUTOFMEMORY = unchecked((int)((MMIOERR_BASE + 2)));// out of memory + public const int MMIOERR_CANNOTOPEN = unchecked((int)((MMIOERR_BASE + 3)));// cannot open + public const int MMIOERR_CANNOTCLOSE = unchecked((int)((MMIOERR_BASE + 4)));// cannot close + public const int MMIOERR_CANNOTREAD = unchecked((int)((MMIOERR_BASE + 5)));// cannot read + public const int MMIOERR_CANNOTWRITE = unchecked((int)((MMIOERR_BASE + 6)));// cannot write + public const int MMIOERR_CANNOTSEEK = unchecked((int)((MMIOERR_BASE + 7)));// cannot seek + public const int MMIOERR_CANNOTEXPAND = unchecked((int)((MMIOERR_BASE + 8)));// cannot expand file + public const int MMIOERR_CHUNKNOTFOUND = unchecked((int)((MMIOERR_BASE + 9)));// chunk not found + public const int MMIOERR_UNBUFFERED = unchecked((int)((MMIOERR_BASE + 10)));// file is unbuffered // MMIO constants - public const string CFSEPCHAR = unchecked( (string)( "+" ) );// compound file name separator char. + public const string CFSEPCHAR = unchecked((string)("+"));// compound file name separator char. - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MMIOINFO { public int dwFlags; @@ -14640,71 +14640,71 @@ public struct MMIOINFO public IntPtr hmmio; } - public const int MMIO_RWMODE = unchecked( (int)( 0x3 ) );// mask to get bits used for opening + public const int MMIO_RWMODE = unchecked((int)(0x3));// mask to get bits used for opening // file for reading/writing/both - public const int MMIO_SHAREMODE = unchecked( (int)( 0x70 ) );// file sharing mode number + public const int MMIO_SHAREMODE = unchecked((int)(0x70));// file sharing mode number // constants for dwFlags field of MMIOINFO - public const int MMIO_CREATE = unchecked( (int)( 0x1000 ) );// create new file (or truncate file) - public const int MMIO_PARSE = unchecked( (int)( 0x100 ) );// parse new file returning path - public const int MMIO_DELETE = unchecked( (int)( 0x200 ) );// create new file (or truncate file) - public const int MMIO_EXIST = unchecked( (int)( 0x4000 ) );// checks for existence of file - public const int MMIO_ALLOCBUF = unchecked( (int)( 0x10000 ) );// mmioOpen() should allocate a buffer - public const int MMIO_GETTEMP = unchecked( (int)( 0x20000 ) );// mmioOpen() should retrieve temp name - - public const int MMIO_DIRTY = unchecked( (int)( 0x10000000 ) );// I/O buffer is dirty + public const int MMIO_CREATE = unchecked((int)(0x1000));// create new file (or truncate file) + public const int MMIO_PARSE = unchecked((int)(0x100));// parse new file returning path + public const int MMIO_DELETE = unchecked((int)(0x200));// create new file (or truncate file) + public const int MMIO_EXIST = unchecked((int)(0x4000));// checks for existence of file + public const int MMIO_ALLOCBUF = unchecked((int)(0x10000));// mmioOpen() should allocate a buffer + public const int MMIO_GETTEMP = unchecked((int)(0x20000));// mmioOpen() should retrieve temp name + + public const int MMIO_DIRTY = unchecked((int)(0x10000000));// I/O buffer is dirty // MMIO_DIRTY is also used in the field of MMCKINFO structure - public const int MMIO_OPEN_VALID = unchecked( (int)( 0x3FFFF ) );// valid flags for mmioOpen / ;Internal / + public const int MMIO_OPEN_VALID = unchecked((int)(0x3FFFF));// valid flags for mmioOpen / ;Internal / // read/write mode numbers (bit field MMIO_RWMODE) - public const int MMIO_READ = unchecked( (int)( 0x0 ) );// open file for reading only - public const int MMIO_WRITE = unchecked( (int)( 0x1 ) );// open file for writing only - public const int MMIO_READWRITE = unchecked( (int)( 0x2 ) );// open file for reading and writing + public const int MMIO_READ = unchecked((int)(0x0));// open file for reading only + public const int MMIO_WRITE = unchecked((int)(0x1));// open file for writing only + public const int MMIO_READWRITE = unchecked((int)(0x2));// open file for reading and writing // share mode numbers (bit field MMIO_SHAREMODE) - public const int MMIO_COMPAT = unchecked( (int)( 0x0 ) );// compatibility mode - public const int MMIO_EXCLUSIVE = unchecked( (int)( 0x10 ) );// exclusive-access mode - public const int MMIO_DENYWRITE = unchecked( (int)( 0x20 ) );// deny writing to other processes - public const int MMIO_DENYREAD = unchecked( (int)( 0x30 ) );// deny reading to other processes - public const int MMIO_DENYNONE = unchecked( (int)( 0x40 ) );// deny nothing to other processes + public const int MMIO_COMPAT = unchecked((int)(0x0));// compatibility mode + public const int MMIO_EXCLUSIVE = unchecked((int)(0x10));// exclusive-access mode + public const int MMIO_DENYWRITE = unchecked((int)(0x20));// deny writing to other processes + public const int MMIO_DENYREAD = unchecked((int)(0x30));// deny reading to other processes + public const int MMIO_DENYNONE = unchecked((int)(0x40));// deny nothing to other processes // flags for other functions - public const int MMIO_FHOPEN = unchecked( (int)( 0x10 ) );// mmioClose(): keep file handle open - public const int MMIO_EMPTYBUF = unchecked( (int)( 0x10 ) );// mmioFlush(): empty the I/O buffer - public const int MMIO_TOUPPER = unchecked( (int)( 0x10 ) );// mmioStringToFOURCC(): cvt. to u-case - public const int MMIO_INSTALLPROC = unchecked( (int)( 0x10000 ) );// mmioInstallIOProc(): install MMIOProc - public const int MMIO_PUBLICPROC = unchecked( (int)( 0x10000000 ) );// mmioInstallIOProc: install Globally - public const int MMIO_UNICODEPROC = unchecked( (int)( 0x1000000 ) );// mmioInstallIOProc(): Unicode MMIOProc - public const int MMIO_REMOVEPROC = unchecked( (int)( 0x20000 ) );// mmioInstallIOProc(): remove MMIOProc - public const int MMIO_FINDPROC = unchecked( (int)( 0x40000 ) );// mmioInstallIOProc(): find an MMIOProc - public const int MMIO_FINDCHUNK = unchecked( (int)( 0x10 ) );// mmioDescend(): find a chunk by ID - public const int MMIO_FINDRIFF = unchecked( (int)( 0x20 ) );// mmioDescend(): find a LIST chunk - public const int MMIO_FINDLIST = unchecked( (int)( 0x40 ) );// mmioDescend(): find a RIFF chunk - public const int MMIO_CREATERIFF = unchecked( (int)( 0x20 ) );// mmioCreateChunk(): make a LIST chunk - public const int MMIO_CREATELIST = unchecked( (int)( 0x40 ) );// mmioCreateChunk(): make a RIFF chunk - - public const int MMIO_VALIDPROC = unchecked( (int)( 0x11070000 ) );// valid for mmioInstallIOProc / ;Internal / + public const int MMIO_FHOPEN = unchecked((int)(0x10));// mmioClose(): keep file handle open + public const int MMIO_EMPTYBUF = unchecked((int)(0x10));// mmioFlush(): empty the I/O buffer + public const int MMIO_TOUPPER = unchecked((int)(0x10));// mmioStringToFOURCC(): cvt. to u-case + public const int MMIO_INSTALLPROC = unchecked((int)(0x10000));// mmioInstallIOProc(): install MMIOProc + public const int MMIO_PUBLICPROC = unchecked((int)(0x10000000));// mmioInstallIOProc: install Globally + public const int MMIO_UNICODEPROC = unchecked((int)(0x1000000));// mmioInstallIOProc(): Unicode MMIOProc + public const int MMIO_REMOVEPROC = unchecked((int)(0x20000));// mmioInstallIOProc(): remove MMIOProc + public const int MMIO_FINDPROC = unchecked((int)(0x40000));// mmioInstallIOProc(): find an MMIOProc + public const int MMIO_FINDCHUNK = unchecked((int)(0x10));// mmioDescend(): find a chunk by ID + public const int MMIO_FINDRIFF = unchecked((int)(0x20));// mmioDescend(): find a LIST chunk + public const int MMIO_FINDLIST = unchecked((int)(0x40));// mmioDescend(): find a RIFF chunk + public const int MMIO_CREATERIFF = unchecked((int)(0x20));// mmioCreateChunk(): make a LIST chunk + public const int MMIO_CREATELIST = unchecked((int)(0x40));// mmioCreateChunk(): make a RIFF chunk + + public const int MMIO_VALIDPROC = unchecked((int)(0x11070000));// valid for mmioInstallIOProc / ;Internal / // message numbers for MMIOPROC I/O procedure functions - public const int MMIOM_READ = unchecked( (int)( MMIO_READ ) );// read (must equal MMIO_READ!) - public const int MMIOM_WRITE = unchecked( (int)( MMIO_WRITE ) );// write (must equal MMIO_WRITE!) - public const int MMIOM_SEEK = unchecked( (int)( 2 ) );// seek to a new position in file - public const int MMIOM_OPEN = unchecked( (int)( 3 ) );// open file - public const int MMIOM_CLOSE = unchecked( (int)( 4 ) );// close file - public const int MMIOM_WRITEFLUSH = unchecked( (int)( 5 ) );// write and flush - public const int MMIOM_RENAME = unchecked( (int)( 6 ) );// rename specified file - public const int MMIOM_USER = unchecked( (int)( 0x8000 ) );// beginning of user-defined messages + public const int MMIOM_READ = unchecked((int)(MMIO_READ));// read (must equal MMIO_READ!) + public const int MMIOM_WRITE = unchecked((int)(MMIO_WRITE));// write (must equal MMIO_WRITE!) + public const int MMIOM_SEEK = unchecked((int)(2));// seek to a new position in file + public const int MMIOM_OPEN = unchecked((int)(3));// open file + public const int MMIOM_CLOSE = unchecked((int)(4));// close file + public const int MMIOM_WRITEFLUSH = unchecked((int)(5));// write and flush + public const int MMIOM_RENAME = unchecked((int)(6));// rename specified file + public const int MMIOM_USER = unchecked((int)(0x8000));// beginning of user-defined messages // flags for mmioSeek() - public const int SEEK_SET = unchecked( (int)( 0 ) );// seek to an absolute position - public const int SEEK_CUR = unchecked( (int)( 1 ) );// seek relative to current position - public const int SEEK_END = unchecked( (int)( 2 ) );// seek relative to end of file + public const int SEEK_SET = unchecked((int)(0));// seek to an absolute position + public const int SEEK_CUR = unchecked((int)(1));// seek relative to current position + public const int SEEK_END = unchecked((int)(2));// seek relative to end of file // other constants - public const int MMIO_DEFAULTBUFFER = unchecked( (int)( 8192 ) );// default buffer size + public const int MMIO_DEFAULTBUFFER = unchecked((int)(8192));// default buffer size - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MMCKINFO { public int ckid; @@ -14715,359 +14715,359 @@ public struct MMCKINFO } - [DllImport( "winmm.dll", EntryPoint = "mmioStringToFOURCC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mmioStringToFOURCC( string sz, int uFlags ); + [DllImport("winmm.dll", EntryPoint = "mmioStringToFOURCC", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mmioStringToFOURCC(string sz, int uFlags); - [DllImport( "winmm.dll", EntryPoint = "mmioOpen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mmioOpen( string szFileName, ref MMIOINFO lpmmioinfo, int dwOpenFlags ); + [DllImport("winmm.dll", EntryPoint = "mmioOpen", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mmioOpen(string szFileName, ref MMIOINFO lpmmioinfo, int dwOpenFlags); - [DllImport( "winmm.dll", EntryPoint = "mmioRename", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mmioRename( string szFileName, string SzNewFileName, ref MMIOINFO lpmmioinfo, int dwRenameFlags ); + [DllImport("winmm.dll", EntryPoint = "mmioRename", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mmioRename(string szFileName, string SzNewFileName, ref MMIOINFO lpmmioinfo, int dwRenameFlags); - [DllImport( "winmm.dll", EntryPoint = "mmioClose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mmioClose( IntPtr hmmio, int uFlags ); + [DllImport("winmm.dll", EntryPoint = "mmioClose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mmioClose(IntPtr hmmio, int uFlags); - [DllImport( "winmm.dll", EntryPoint = "mmioRead", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mmioRead( IntPtr hmmio, string pch, int cch ); + [DllImport("winmm.dll", EntryPoint = "mmioRead", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mmioRead(IntPtr hmmio, string pch, int cch); - [DllImport( "winmm.dll", EntryPoint = "mmioWrite", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mmioWrite( IntPtr hmmio, string pch, int cch ); + [DllImport("winmm.dll", EntryPoint = "mmioWrite", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mmioWrite(IntPtr hmmio, string pch, int cch); - [DllImport( "winmm.dll", EntryPoint = "mmioSeek", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mmioSeek( IntPtr hmmio, int lOffset, int iOrigin ); + [DllImport("winmm.dll", EntryPoint = "mmioSeek", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mmioSeek(IntPtr hmmio, int lOffset, int iOrigin); - [DllImport( "winmm.dll", EntryPoint = "mmioGetInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mmioGetInfo( IntPtr hmmio, ref MMIOINFO lpmmioinfo, int uFlags ); + [DllImport("winmm.dll", EntryPoint = "mmioGetInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mmioGetInfo(IntPtr hmmio, ref MMIOINFO lpmmioinfo, int uFlags); - [DllImport( "winmm.dll", EntryPoint = "mmioSetInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mmioSetInfo( IntPtr hmmio, ref MMIOINFO lpmmioinfo, int uFlags ); + [DllImport("winmm.dll", EntryPoint = "mmioSetInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mmioSetInfo(IntPtr hmmio, ref MMIOINFO lpmmioinfo, int uFlags); - [DllImport( "winmm.dll", EntryPoint = "mmioSetBuffer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mmioSetBuffer( IntPtr hmmio, string pchBuffer, int cchBuffer, int uFlags ); + [DllImport("winmm.dll", EntryPoint = "mmioSetBuffer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mmioSetBuffer(IntPtr hmmio, string pchBuffer, int cchBuffer, int uFlags); - [DllImport( "winmm.dll", EntryPoint = "mmioFlush", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mmioFlush( IntPtr hmmio, int uFlags ); + [DllImport("winmm.dll", EntryPoint = "mmioFlush", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mmioFlush(IntPtr hmmio, int uFlags); - [DllImport( "winmm.dll", EntryPoint = "mmioAdvance", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mmioAdvance( IntPtr hmmio, ref MMIOINFO lpmmioinfo, int uFlags ); + [DllImport("winmm.dll", EntryPoint = "mmioAdvance", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mmioAdvance(IntPtr hmmio, ref MMIOINFO lpmmioinfo, int uFlags); - [DllImport( "winmm.dll", EntryPoint = "mmioSendMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mmioSendMessage( IntPtr hmmio, int uMsg, int lParam1, int lParam2 ); + [DllImport("winmm.dll", EntryPoint = "mmioSendMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mmioSendMessage(IntPtr hmmio, int uMsg, int lParam1, int lParam2); - [DllImport( "winmm.dll", EntryPoint = "mmioDescend", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mmioDescend( IntPtr hmmio, ref MMCKINFO lpck, ref MMCKINFO lpckParent, int uFlags ); + [DllImport("winmm.dll", EntryPoint = "mmioDescend", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mmioDescend(IntPtr hmmio, ref MMCKINFO lpck, ref MMCKINFO lpckParent, int uFlags); - [DllImport( "winmm.dll", EntryPoint = "mmioAscend", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mmioAscend( IntPtr hmmio, ref MMCKINFO lpck, int uFlags ); + [DllImport("winmm.dll", EntryPoint = "mmioAscend", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mmioAscend(IntPtr hmmio, ref MMCKINFO lpck, int uFlags); - [DllImport( "winmm.dll", EntryPoint = "mmioCreateChunk", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mmioCreateChunk( IntPtr hmmio, ref MMCKINFO lpck, int uFlags ); + [DllImport("winmm.dll", EntryPoint = "mmioCreateChunk", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mmioCreateChunk(IntPtr hmmio, ref MMCKINFO lpck, int uFlags); // MCI functions - [DllImport( "winmm.dll", EntryPoint = "mciSendCommand", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mciSendCommand( int wDeviceID, int uMessage, int dwParam1, object dwParam2 ); + [DllImport("winmm.dll", EntryPoint = "mciSendCommand", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mciSendCommand(int wDeviceID, int uMessage, int dwParam1, object dwParam2); - [DllImport( "winmm.dll", EntryPoint = "mciSendString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mciSendString( string lpstrCommand, string lpstrReturnString, int uReturnLength, IntPtr hwndCallback ); + [DllImport("winmm.dll", EntryPoint = "mciSendString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mciSendString(string lpstrCommand, string lpstrReturnString, int uReturnLength, IntPtr hwndCallback); - [DllImport( "winmm.dll", EntryPoint = "mciGetCreatorTask", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mciGetCreatorTask( int wDeviceID ); + [DllImport("winmm.dll", EntryPoint = "mciGetCreatorTask", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mciGetCreatorTask(int wDeviceID); - [DllImport( "winmm.dll", EntryPoint = "mciGetDeviceID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mciGetDeviceID( string lpstrName ); + [DllImport("winmm.dll", EntryPoint = "mciGetDeviceID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mciGetDeviceID(string lpstrName); - [DllImport( "winmm.dll", EntryPoint = "mciGetDeviceIDFromElementID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mciGetDeviceIDFromElementID( int dwElementID, string lpstrType ); + [DllImport("winmm.dll", EntryPoint = "mciGetDeviceIDFromElementID", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mciGetDeviceIDFromElementID(int dwElementID, string lpstrType); - [DllImport( "winmm.dll", EntryPoint = "mciGetErrorString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mciGetErrorString( int dwError, string lpstrBuffer, int uLength ); + [DllImport("winmm.dll", EntryPoint = "mciGetErrorString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mciGetErrorString(int dwError, string lpstrBuffer, int uLength); - [DllImport( "winmm.dll", EntryPoint = "mciExecute", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mciExecute( string lpstrCommand ); + [DllImport("winmm.dll", EntryPoint = "mciExecute", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mciExecute(string lpstrCommand); // MCI error return values - public const int MCIERR_INVALID_DEVICE_ID = unchecked( (int)( ( MCIERR_BASE + 1 ) ) ); - public const int MCIERR_UNRECOGNIZED_KEYWORD = unchecked( (int)( ( MCIERR_BASE + 3 ) ) ); - public const int MCIERR_UNRECOGNIZED_COMMAND = unchecked( (int)( ( MCIERR_BASE + 5 ) ) ); - public const int MCIERR_HARDWARE = unchecked( (int)( ( MCIERR_BASE + 6 ) ) ); - public const int MCIERR_INVALID_DEVICE_NAME = unchecked( (int)( ( MCIERR_BASE + 7 ) ) ); - public const int MCIERR_OUT_OF_MEMORY = unchecked( (int)( ( MCIERR_BASE + 8 ) ) ); - public const int MCIERR_DEVICE_OPEN = unchecked( (int)( ( MCIERR_BASE + 9 ) ) ); - public const int MCIERR_CANNOT_LOAD_DRIVER = unchecked( (int)( ( MCIERR_BASE + 10 ) ) ); - public const int MCIERR_MISSING_COMMAND_STRING = unchecked( (int)( ( MCIERR_BASE + 11 ) ) ); - public const int MCIERR_PARAM_OVERFLOW = unchecked( (int)( ( MCIERR_BASE + 12 ) ) ); - public const int MCIERR_MISSING_STRING_ARGUMENT = unchecked( (int)( ( MCIERR_BASE + 13 ) ) ); - public const int MCIERR_BAD_INTEGER = unchecked( (int)( ( MCIERR_BASE + 14 ) ) ); - public const int MCIERR_PARSER_INTERNAL = unchecked( (int)( ( MCIERR_BASE + 15 ) ) ); - public const int MCIERR_DRIVER_INTERNAL = unchecked( (int)( ( MCIERR_BASE + 16 ) ) ); - public const int MCIERR_MISSING_PARAMETER = unchecked( (int)( ( MCIERR_BASE + 17 ) ) ); - public const int MCIERR_UNSUPPORTED_FUNCTION = unchecked( (int)( ( MCIERR_BASE + 18 ) ) ); - public const int MCIERR_FILE_NOT_FOUND = unchecked( (int)( ( MCIERR_BASE + 19 ) ) ); - public const int MCIERR_DEVICE_NOT_READY = unchecked( (int)( ( MCIERR_BASE + 20 ) ) ); - public const int MCIERR_INTERNAL = unchecked( (int)( ( MCIERR_BASE + 21 ) ) ); - public const int MCIERR_DRIVER = unchecked( (int)( ( MCIERR_BASE + 22 ) ) ); - public const int MCIERR_CANNOT_USE_ALL = unchecked( (int)( ( MCIERR_BASE + 23 ) ) ); - public const int MCIERR_MULTIPLE = unchecked( (int)( ( MCIERR_BASE + 24 ) ) ); - public const int MCIERR_EXTENSION_NOT_FOUND = unchecked( (int)( ( MCIERR_BASE + 25 ) ) ); - public const int MCIERR_OUTOFRANGE = unchecked( (int)( ( MCIERR_BASE + 26 ) ) ); - public const int MCIERR_FLAGS_NOT_COMPATIBLE = unchecked( (int)( ( MCIERR_BASE + 28 ) ) ); - public const int MCIERR_FILE_NOT_SAVED = unchecked( (int)( ( MCIERR_BASE + 30 ) ) ); - public const int MCIERR_DEVICE_TYPE_REQUIRED = unchecked( (int)( ( MCIERR_BASE + 31 ) ) ); - public const int MCIERR_DEVICE_LOCKED = unchecked( (int)( ( MCIERR_BASE + 32 ) ) ); - public const int MCIERR_DUPLICATE_ALIAS = unchecked( (int)( ( MCIERR_BASE + 33 ) ) ); - public const int MCIERR_BAD_CONSTANT = unchecked( (int)( ( MCIERR_BASE + 34 ) ) ); - public const int MCIERR_MUST_USE_SHAREABLE = unchecked( (int)( ( MCIERR_BASE + 35 ) ) ); - public const int MCIERR_MISSING_DEVICE_NAME = unchecked( (int)( ( MCIERR_BASE + 36 ) ) ); - public const int MCIERR_BAD_TIME_FORMAT = unchecked( (int)( ( MCIERR_BASE + 37 ) ) ); - public const int MCIERR_NO_CLOSING_QUOTE = unchecked( (int)( ( MCIERR_BASE + 38 ) ) ); - public const int MCIERR_DUPLICATE_FLAGS = unchecked( (int)( ( MCIERR_BASE + 39 ) ) ); - public const int MCIERR_INVALID_FILE = unchecked( (int)( ( MCIERR_BASE + 40 ) ) ); - public const int MCIERR_NULL_PARAMETER_BLOCK = unchecked( (int)( ( MCIERR_BASE + 41 ) ) ); - public const int MCIERR_UNNAMED_RESOURCE = unchecked( (int)( ( MCIERR_BASE + 42 ) ) ); - public const int MCIERR_NEW_REQUIRES_ALIAS = unchecked( (int)( ( MCIERR_BASE + 43 ) ) ); - public const int MCIERR_NOTIFY_ON_AUTO_OPEN = unchecked( (int)( ( MCIERR_BASE + 44 ) ) ); - public const int MCIERR_NO_ELEMENT_ALLOWED = unchecked( (int)( ( MCIERR_BASE + 45 ) ) ); - public const int MCIERR_NONAPPLICABLE_FUNCTION = unchecked( (int)( ( MCIERR_BASE + 46 ) ) ); - public const int MCIERR_ILLEGAL_FOR_AUTO_OPEN = unchecked( (int)( ( MCIERR_BASE + 47 ) ) ); - public const int MCIERR_FILENAME_REQUIRED = unchecked( (int)( ( MCIERR_BASE + 48 ) ) ); - public const int MCIERR_EXTRA_CHARACTERS = unchecked( (int)( ( MCIERR_BASE + 49 ) ) ); - public const int MCIERR_DEVICE_NOT_INSTALLED = unchecked( (int)( ( MCIERR_BASE + 50 ) ) ); - public const int MCIERR_GET_CD = unchecked( (int)( ( MCIERR_BASE + 51 ) ) ); - public const int MCIERR_SET_CD = unchecked( (int)( ( MCIERR_BASE + 52 ) ) ); - public const int MCIERR_SET_DRIVE = unchecked( (int)( ( MCIERR_BASE + 53 ) ) ); - public const int MCIERR_DEVICE_LENGTH = unchecked( (int)( ( MCIERR_BASE + 54 ) ) ); - public const int MCIERR_DEVICE_ORD_LENGTH = unchecked( (int)( ( MCIERR_BASE + 55 ) ) ); - public const int MCIERR_NO_INTEGER = unchecked( (int)( ( MCIERR_BASE + 56 ) ) ); - - public const int MCIERR_WAVE_OUTPUTSINUSE = unchecked( (int)( ( MCIERR_BASE + 64 ) ) ); - public const int MCIERR_WAVE_SETOUTPUTINUSE = unchecked( (int)( ( MCIERR_BASE + 65 ) ) ); - public const int MCIERR_WAVE_INPUTSINUSE = unchecked( (int)( ( MCIERR_BASE + 66 ) ) ); - public const int MCIERR_WAVE_SETINPUTINUSE = unchecked( (int)( ( MCIERR_BASE + 67 ) ) ); - public const int MCIERR_WAVE_OUTPUTUNSPECIFIED = unchecked( (int)( ( MCIERR_BASE + 68 ) ) ); - public const int MCIERR_WAVE_INPUTUNSPECIFIED = unchecked( (int)( ( MCIERR_BASE + 69 ) ) ); - public const int MCIERR_WAVE_OUTPUTSUNSUITABLE = unchecked( (int)( ( MCIERR_BASE + 70 ) ) ); - public const int MCIERR_WAVE_SETOUTPUTUNSUITABLE = unchecked( (int)( ( MCIERR_BASE + 71 ) ) ); - public const int MCIERR_WAVE_INPUTSUNSUITABLE = unchecked( (int)( ( MCIERR_BASE + 72 ) ) ); - public const int MCIERR_WAVE_SETINPUTUNSUITABLE = unchecked( (int)( ( MCIERR_BASE + 73 ) ) ); - - public const int MCIERR_SEQ_DIV_INCOMPATIBLE = unchecked( (int)( ( MCIERR_BASE + 80 ) ) ); - public const int MCIERR_SEQ_PORT_INUSE = unchecked( (int)( ( MCIERR_BASE + 81 ) ) ); - public const int MCIERR_SEQ_PORT_NONEXISTENT = unchecked( (int)( ( MCIERR_BASE + 82 ) ) ); - public const int MCIERR_SEQ_PORT_MAPNODEVICE = unchecked( (int)( ( MCIERR_BASE + 83 ) ) ); - public const int MCIERR_SEQ_PORT_MISCERROR = unchecked( (int)( ( MCIERR_BASE + 84 ) ) ); - public const int MCIERR_SEQ_TIMER = unchecked( (int)( ( MCIERR_BASE + 85 ) ) ); - public const int MCIERR_SEQ_PORTUNSPECIFIED = unchecked( (int)( ( MCIERR_BASE + 86 ) ) ); - public const int MCIERR_SEQ_NOMIDIPRESENT = unchecked( (int)( ( MCIERR_BASE + 87 ) ) ); - - public const int MCIERR_NO_WINDOW = unchecked( (int)( ( MCIERR_BASE + 90 ) ) ); - public const int MCIERR_CREATEWINDOW = unchecked( (int)( ( MCIERR_BASE + 91 ) ) ); - public const int MCIERR_FILE_READ = unchecked( (int)( ( MCIERR_BASE + 92 ) ) ); - public const int MCIERR_FILE_WRITE = unchecked( (int)( ( MCIERR_BASE + 93 ) ) ); + public const int MCIERR_INVALID_DEVICE_ID = unchecked((int)((MCIERR_BASE + 1))); + public const int MCIERR_UNRECOGNIZED_KEYWORD = unchecked((int)((MCIERR_BASE + 3))); + public const int MCIERR_UNRECOGNIZED_COMMAND = unchecked((int)((MCIERR_BASE + 5))); + public const int MCIERR_HARDWARE = unchecked((int)((MCIERR_BASE + 6))); + public const int MCIERR_INVALID_DEVICE_NAME = unchecked((int)((MCIERR_BASE + 7))); + public const int MCIERR_OUT_OF_MEMORY = unchecked((int)((MCIERR_BASE + 8))); + public const int MCIERR_DEVICE_OPEN = unchecked((int)((MCIERR_BASE + 9))); + public const int MCIERR_CANNOT_LOAD_DRIVER = unchecked((int)((MCIERR_BASE + 10))); + public const int MCIERR_MISSING_COMMAND_STRING = unchecked((int)((MCIERR_BASE + 11))); + public const int MCIERR_PARAM_OVERFLOW = unchecked((int)((MCIERR_BASE + 12))); + public const int MCIERR_MISSING_STRING_ARGUMENT = unchecked((int)((MCIERR_BASE + 13))); + public const int MCIERR_BAD_INTEGER = unchecked((int)((MCIERR_BASE + 14))); + public const int MCIERR_PARSER_INTERNAL = unchecked((int)((MCIERR_BASE + 15))); + public const int MCIERR_DRIVER_INTERNAL = unchecked((int)((MCIERR_BASE + 16))); + public const int MCIERR_MISSING_PARAMETER = unchecked((int)((MCIERR_BASE + 17))); + public const int MCIERR_UNSUPPORTED_FUNCTION = unchecked((int)((MCIERR_BASE + 18))); + public const int MCIERR_FILE_NOT_FOUND = unchecked((int)((MCIERR_BASE + 19))); + public const int MCIERR_DEVICE_NOT_READY = unchecked((int)((MCIERR_BASE + 20))); + public const int MCIERR_INTERNAL = unchecked((int)((MCIERR_BASE + 21))); + public const int MCIERR_DRIVER = unchecked((int)((MCIERR_BASE + 22))); + public const int MCIERR_CANNOT_USE_ALL = unchecked((int)((MCIERR_BASE + 23))); + public const int MCIERR_MULTIPLE = unchecked((int)((MCIERR_BASE + 24))); + public const int MCIERR_EXTENSION_NOT_FOUND = unchecked((int)((MCIERR_BASE + 25))); + public const int MCIERR_OUTOFRANGE = unchecked((int)((MCIERR_BASE + 26))); + public const int MCIERR_FLAGS_NOT_COMPATIBLE = unchecked((int)((MCIERR_BASE + 28))); + public const int MCIERR_FILE_NOT_SAVED = unchecked((int)((MCIERR_BASE + 30))); + public const int MCIERR_DEVICE_TYPE_REQUIRED = unchecked((int)((MCIERR_BASE + 31))); + public const int MCIERR_DEVICE_LOCKED = unchecked((int)((MCIERR_BASE + 32))); + public const int MCIERR_DUPLICATE_ALIAS = unchecked((int)((MCIERR_BASE + 33))); + public const int MCIERR_BAD_CONSTANT = unchecked((int)((MCIERR_BASE + 34))); + public const int MCIERR_MUST_USE_SHAREABLE = unchecked((int)((MCIERR_BASE + 35))); + public const int MCIERR_MISSING_DEVICE_NAME = unchecked((int)((MCIERR_BASE + 36))); + public const int MCIERR_BAD_TIME_FORMAT = unchecked((int)((MCIERR_BASE + 37))); + public const int MCIERR_NO_CLOSING_QUOTE = unchecked((int)((MCIERR_BASE + 38))); + public const int MCIERR_DUPLICATE_FLAGS = unchecked((int)((MCIERR_BASE + 39))); + public const int MCIERR_INVALID_FILE = unchecked((int)((MCIERR_BASE + 40))); + public const int MCIERR_NULL_PARAMETER_BLOCK = unchecked((int)((MCIERR_BASE + 41))); + public const int MCIERR_UNNAMED_RESOURCE = unchecked((int)((MCIERR_BASE + 42))); + public const int MCIERR_NEW_REQUIRES_ALIAS = unchecked((int)((MCIERR_BASE + 43))); + public const int MCIERR_NOTIFY_ON_AUTO_OPEN = unchecked((int)((MCIERR_BASE + 44))); + public const int MCIERR_NO_ELEMENT_ALLOWED = unchecked((int)((MCIERR_BASE + 45))); + public const int MCIERR_NONAPPLICABLE_FUNCTION = unchecked((int)((MCIERR_BASE + 46))); + public const int MCIERR_ILLEGAL_FOR_AUTO_OPEN = unchecked((int)((MCIERR_BASE + 47))); + public const int MCIERR_FILENAME_REQUIRED = unchecked((int)((MCIERR_BASE + 48))); + public const int MCIERR_EXTRA_CHARACTERS = unchecked((int)((MCIERR_BASE + 49))); + public const int MCIERR_DEVICE_NOT_INSTALLED = unchecked((int)((MCIERR_BASE + 50))); + public const int MCIERR_GET_CD = unchecked((int)((MCIERR_BASE + 51))); + public const int MCIERR_SET_CD = unchecked((int)((MCIERR_BASE + 52))); + public const int MCIERR_SET_DRIVE = unchecked((int)((MCIERR_BASE + 53))); + public const int MCIERR_DEVICE_LENGTH = unchecked((int)((MCIERR_BASE + 54))); + public const int MCIERR_DEVICE_ORD_LENGTH = unchecked((int)((MCIERR_BASE + 55))); + public const int MCIERR_NO_INTEGER = unchecked((int)((MCIERR_BASE + 56))); + + public const int MCIERR_WAVE_OUTPUTSINUSE = unchecked((int)((MCIERR_BASE + 64))); + public const int MCIERR_WAVE_SETOUTPUTINUSE = unchecked((int)((MCIERR_BASE + 65))); + public const int MCIERR_WAVE_INPUTSINUSE = unchecked((int)((MCIERR_BASE + 66))); + public const int MCIERR_WAVE_SETINPUTINUSE = unchecked((int)((MCIERR_BASE + 67))); + public const int MCIERR_WAVE_OUTPUTUNSPECIFIED = unchecked((int)((MCIERR_BASE + 68))); + public const int MCIERR_WAVE_INPUTUNSPECIFIED = unchecked((int)((MCIERR_BASE + 69))); + public const int MCIERR_WAVE_OUTPUTSUNSUITABLE = unchecked((int)((MCIERR_BASE + 70))); + public const int MCIERR_WAVE_SETOUTPUTUNSUITABLE = unchecked((int)((MCIERR_BASE + 71))); + public const int MCIERR_WAVE_INPUTSUNSUITABLE = unchecked((int)((MCIERR_BASE + 72))); + public const int MCIERR_WAVE_SETINPUTUNSUITABLE = unchecked((int)((MCIERR_BASE + 73))); + + public const int MCIERR_SEQ_DIV_INCOMPATIBLE = unchecked((int)((MCIERR_BASE + 80))); + public const int MCIERR_SEQ_PORT_INUSE = unchecked((int)((MCIERR_BASE + 81))); + public const int MCIERR_SEQ_PORT_NONEXISTENT = unchecked((int)((MCIERR_BASE + 82))); + public const int MCIERR_SEQ_PORT_MAPNODEVICE = unchecked((int)((MCIERR_BASE + 83))); + public const int MCIERR_SEQ_PORT_MISCERROR = unchecked((int)((MCIERR_BASE + 84))); + public const int MCIERR_SEQ_TIMER = unchecked((int)((MCIERR_BASE + 85))); + public const int MCIERR_SEQ_PORTUNSPECIFIED = unchecked((int)((MCIERR_BASE + 86))); + public const int MCIERR_SEQ_NOMIDIPRESENT = unchecked((int)((MCIERR_BASE + 87))); + + public const int MCIERR_NO_WINDOW = unchecked((int)((MCIERR_BASE + 90))); + public const int MCIERR_CREATEWINDOW = unchecked((int)((MCIERR_BASE + 91))); + public const int MCIERR_FILE_READ = unchecked((int)((MCIERR_BASE + 92))); + public const int MCIERR_FILE_WRITE = unchecked((int)((MCIERR_BASE + 93))); // All custom device driver errors must be >= this value - public const int MCIERR_CUSTOM_DRIVER_BASE = unchecked( (int)( ( MCIERR_BASE + 256 ) ) ); + public const int MCIERR_CUSTOM_DRIVER_BASE = unchecked((int)((MCIERR_BASE + 256))); // Message numbers must be in the range between MCI_FIRST and MCI_LAST - public const int MCI_FIRST = unchecked( (int)( 0x800 ) ); + public const int MCI_FIRST = unchecked((int)(0x800)); // Messages 0x801 and 0x802 are reserved - public const int MCI_OPEN = unchecked( (int)( 0x803 ) ); - public const int MCI_CLOSE = unchecked( (int)( 0x804 ) ); - public const int MCI_ESCAPE = unchecked( (int)( 0x805 ) ); - public const int MCI_PLAY = unchecked( (int)( 0x806 ) ); - public const int MCI_SEEK = unchecked( (int)( 0x807 ) ); - public const int MCI_STOP = unchecked( (int)( 0x808 ) ); - public const int MCI_PAUSE = unchecked( (int)( 0x809 ) ); - public const int MCI_INFO = unchecked( (int)( 0x80A ) ); - public const int MCI_GETDEVCAPS = unchecked( (int)( 0x80B ) ); - public const int MCI_SPIN = unchecked( (int)( 0x80C ) ); - public const int MCI_SET = unchecked( (int)( 0x80D ) ); - public const int MCI_STEP = unchecked( (int)( 0x80E ) ); - public const int MCI_RECORD = unchecked( (int)( 0x80F ) ); - public const int MCI_SYSINFO = unchecked( (int)( 0x810 ) ); - public const int MCI_BREAK = unchecked( (int)( 0x811 ) ); - public const int MCI_SOUND = unchecked( (int)( 0x812 ) ); - public const int MCI_SAVE = unchecked( (int)( 0x813 ) ); - public const int MCI_STATUS = unchecked( (int)( 0x814 ) ); - - public const int MCI_CUE = unchecked( (int)( 0x830 ) ); - - public const int MCI_REALIZE = unchecked( (int)( 0x840 ) ); - public const int MCI_WINDOW = unchecked( (int)( 0x841 ) ); - public const int MCI_PUT = unchecked( (int)( 0x842 ) ); - public const int MCI_WHERE = unchecked( (int)( 0x843 ) ); - public const int MCI_FREEZE = unchecked( (int)( 0x844 ) ); - public const int MCI_UNFREEZE = unchecked( (int)( 0x845 ) ); - - public const int MCI_LOAD = unchecked( (int)( 0x850 ) ); - public const int MCI_CUT = unchecked( (int)( 0x851 ) ); - public const int MCI_COPY = unchecked( (int)( 0x852 ) ); - public const int MCI_PASTE = unchecked( (int)( 0x853 ) ); - public const int MCI_UPDATE = unchecked( (int)( 0x854 ) ); - public const int MCI_RESUME = unchecked( (int)( 0x855 ) ); - public const int MCI_DELETE = unchecked( (int)( 0x856 ) ); - - public const int MCI_LAST = unchecked( (int)( 0xFFF ) ); + public const int MCI_OPEN = unchecked((int)(0x803)); + public const int MCI_CLOSE = unchecked((int)(0x804)); + public const int MCI_ESCAPE = unchecked((int)(0x805)); + public const int MCI_PLAY = unchecked((int)(0x806)); + public const int MCI_SEEK = unchecked((int)(0x807)); + public const int MCI_STOP = unchecked((int)(0x808)); + public const int MCI_PAUSE = unchecked((int)(0x809)); + public const int MCI_INFO = unchecked((int)(0x80A)); + public const int MCI_GETDEVCAPS = unchecked((int)(0x80B)); + public const int MCI_SPIN = unchecked((int)(0x80C)); + public const int MCI_SET = unchecked((int)(0x80D)); + public const int MCI_STEP = unchecked((int)(0x80E)); + public const int MCI_RECORD = unchecked((int)(0x80F)); + public const int MCI_SYSINFO = unchecked((int)(0x810)); + public const int MCI_BREAK = unchecked((int)(0x811)); + public const int MCI_SOUND = unchecked((int)(0x812)); + public const int MCI_SAVE = unchecked((int)(0x813)); + public const int MCI_STATUS = unchecked((int)(0x814)); + + public const int MCI_CUE = unchecked((int)(0x830)); + + public const int MCI_REALIZE = unchecked((int)(0x840)); + public const int MCI_WINDOW = unchecked((int)(0x841)); + public const int MCI_PUT = unchecked((int)(0x842)); + public const int MCI_WHERE = unchecked((int)(0x843)); + public const int MCI_FREEZE = unchecked((int)(0x844)); + public const int MCI_UNFREEZE = unchecked((int)(0x845)); + + public const int MCI_LOAD = unchecked((int)(0x850)); + public const int MCI_CUT = unchecked((int)(0x851)); + public const int MCI_COPY = unchecked((int)(0x852)); + public const int MCI_PASTE = unchecked((int)(0x853)); + public const int MCI_UPDATE = unchecked((int)(0x854)); + public const int MCI_RESUME = unchecked((int)(0x855)); + public const int MCI_DELETE = unchecked((int)(0x856)); + + public const int MCI_LAST = unchecked((int)(0xFFF)); // the next 0x400 message ID's are reserved for custom drivers // all custom MCI command messages must be >= than this value - public const int MCI_USER_MESSAGES = unchecked( (int)( ( 0x400 + MCI_FIRST ) ) ); - public const int MCI_ALL_DEVICE_ID = unchecked( (int)( -1 ) );// Matches all MCI devices + public const int MCI_USER_MESSAGES = unchecked((int)((0x400 + MCI_FIRST))); + public const int MCI_ALL_DEVICE_ID = unchecked((int)(-1));// Matches all MCI devices // constants for predefined MCI device types - public const int MCI_DEVTYPE_VCR = unchecked( (int)( 513 ) ); - public const int MCI_DEVTYPE_VIDEODISC = unchecked( (int)( 514 ) ); - public const int MCI_DEVTYPE_OVERLAY = unchecked( (int)( 515 ) ); - public const int MCI_DEVTYPE_CD_AUDIO = unchecked( (int)( 516 ) ); - public const int MCI_DEVTYPE_DAT = unchecked( (int)( 517 ) ); - public const int MCI_DEVTYPE_SCANNER = unchecked( (int)( 518 ) ); - public const int MCI_DEVTYPE_ANIMATION = unchecked( (int)( 519 ) ); - public const int MCI_DEVTYPE_DIGITAL_VIDEO = unchecked( (int)( 520 ) ); - public const int MCI_DEVTYPE_OTHER = unchecked( (int)( 521 ) ); - public const int MCI_DEVTYPE_WAVEFORM_AUDIO = unchecked( (int)( 522 ) ); - public const int MCI_DEVTYPE_SEQUENCER = unchecked( (int)( 523 ) ); - - public const int MCI_DEVTYPE_FIRST = unchecked( (int)( MCI_DEVTYPE_VCR ) ); - public const int MCI_DEVTYPE_LAST = unchecked( (int)( MCI_DEVTYPE_SEQUENCER ) ); - - public const int MCI_DEVTYPE_FIRST_USER = unchecked( (int)( 0x1000 ) ); + public const int MCI_DEVTYPE_VCR = unchecked((int)(513)); + public const int MCI_DEVTYPE_VIDEODISC = unchecked((int)(514)); + public const int MCI_DEVTYPE_OVERLAY = unchecked((int)(515)); + public const int MCI_DEVTYPE_CD_AUDIO = unchecked((int)(516)); + public const int MCI_DEVTYPE_DAT = unchecked((int)(517)); + public const int MCI_DEVTYPE_SCANNER = unchecked((int)(518)); + public const int MCI_DEVTYPE_ANIMATION = unchecked((int)(519)); + public const int MCI_DEVTYPE_DIGITAL_VIDEO = unchecked((int)(520)); + public const int MCI_DEVTYPE_OTHER = unchecked((int)(521)); + public const int MCI_DEVTYPE_WAVEFORM_AUDIO = unchecked((int)(522)); + public const int MCI_DEVTYPE_SEQUENCER = unchecked((int)(523)); + + public const int MCI_DEVTYPE_FIRST = unchecked((int)(MCI_DEVTYPE_VCR)); + public const int MCI_DEVTYPE_LAST = unchecked((int)(MCI_DEVTYPE_SEQUENCER)); + + public const int MCI_DEVTYPE_FIRST_USER = unchecked((int)(0x1000)); // return values for 'status mode' command - public const int MCI_MODE_NOT_READY = unchecked( (int)( ( MCI_STRING_OFFSET + 12 ) ) ); - public const int MCI_MODE_STOP = unchecked( (int)( ( MCI_STRING_OFFSET + 13 ) ) ); - public const int MCI_MODE_PLAY = unchecked( (int)( ( MCI_STRING_OFFSET + 14 ) ) ); - public const int MCI_MODE_RECORD = unchecked( (int)( ( MCI_STRING_OFFSET + 15 ) ) ); - public const int MCI_MODE_SEEK = unchecked( (int)( ( MCI_STRING_OFFSET + 16 ) ) ); - public const int MCI_MODE_PAUSE = unchecked( (int)( ( MCI_STRING_OFFSET + 17 ) ) ); - public const int MCI_MODE_OPEN = unchecked( (int)( ( MCI_STRING_OFFSET + 18 ) ) ); + public const int MCI_MODE_NOT_READY = unchecked((int)((MCI_STRING_OFFSET + 12))); + public const int MCI_MODE_STOP = unchecked((int)((MCI_STRING_OFFSET + 13))); + public const int MCI_MODE_PLAY = unchecked((int)((MCI_STRING_OFFSET + 14))); + public const int MCI_MODE_RECORD = unchecked((int)((MCI_STRING_OFFSET + 15))); + public const int MCI_MODE_SEEK = unchecked((int)((MCI_STRING_OFFSET + 16))); + public const int MCI_MODE_PAUSE = unchecked((int)((MCI_STRING_OFFSET + 17))); + public const int MCI_MODE_OPEN = unchecked((int)((MCI_STRING_OFFSET + 18))); // constants used in 'set time format' and 'status time format' commands - public const int MCI_FORMAT_MILLISECONDS = unchecked( (int)( 0 ) ); - public const int MCI_FORMAT_HMS = unchecked( (int)( 1 ) ); - public const int MCI_FORMAT_MSF = unchecked( (int)( 2 ) ); - public const int MCI_FORMAT_FRAMES = unchecked( (int)( 3 ) ); - public const int MCI_FORMAT_SMPTE_24 = unchecked( (int)( 4 ) ); - public const int MCI_FORMAT_SMPTE_25 = unchecked( (int)( 5 ) ); - public const int MCI_FORMAT_SMPTE_30 = unchecked( (int)( 6 ) ); - public const int MCI_FORMAT_SMPTE_30DROP = unchecked( (int)( 7 ) ); - public const int MCI_FORMAT_BYTES = unchecked( (int)( 8 ) ); - public const int MCI_FORMAT_SAMPLES = unchecked( (int)( 9 ) ); - public const int MCI_FORMAT_TMSF = unchecked( (int)( 10 ) ); + public const int MCI_FORMAT_MILLISECONDS = unchecked((int)(0)); + public const int MCI_FORMAT_HMS = unchecked((int)(1)); + public const int MCI_FORMAT_MSF = unchecked((int)(2)); + public const int MCI_FORMAT_FRAMES = unchecked((int)(3)); + public const int MCI_FORMAT_SMPTE_24 = unchecked((int)(4)); + public const int MCI_FORMAT_SMPTE_25 = unchecked((int)(5)); + public const int MCI_FORMAT_SMPTE_30 = unchecked((int)(6)); + public const int MCI_FORMAT_SMPTE_30DROP = unchecked((int)(7)); + public const int MCI_FORMAT_BYTES = unchecked((int)(8)); + public const int MCI_FORMAT_SAMPLES = unchecked((int)(9)); + public const int MCI_FORMAT_TMSF = unchecked((int)(10)); // Flags for wParam of the MM_MCINOTIFY message - public const int MCI_NOTIFY_SUCCESSFUL = unchecked( (int)( 0x1 ) ); - public const int MCI_NOTIFY_SUPERSEDED = unchecked( (int)( 0x2 ) ); - public const int MCI_NOTIFY_ABORTED = unchecked( (int)( 0x4 ) ); - public const int MCI_NOTIFY_FAILURE = unchecked( (int)( 0x8 ) ); + public const int MCI_NOTIFY_SUCCESSFUL = unchecked((int)(0x1)); + public const int MCI_NOTIFY_SUPERSEDED = unchecked((int)(0x2)); + public const int MCI_NOTIFY_ABORTED = unchecked((int)(0x4)); + public const int MCI_NOTIFY_FAILURE = unchecked((int)(0x8)); // common flags for dwFlags parameter of MCI command messages - public const int MCI_NOTIFY = unchecked( (int)( 0x1 ) ); - public const int MCI_WAIT = unchecked( (int)( 0x2 ) ); - public const int MCI_FROM = unchecked( (int)( 0x4 ) ); - public const int MCI_TO = unchecked( (int)( 0x8 ) ); - public const int MCI_TRACK = unchecked( (int)( 0x10 ) ); + public const int MCI_NOTIFY = unchecked((int)(0x1)); + public const int MCI_WAIT = unchecked((int)(0x2)); + public const int MCI_FROM = unchecked((int)(0x4)); + public const int MCI_TO = unchecked((int)(0x8)); + public const int MCI_TRACK = unchecked((int)(0x10)); // flags for dwFlags parameter of MCI_OPEN command message - public const int MCI_OPEN_SHAREABLE = unchecked( (int)( 0x100 ) ); - public const int MCI_OPEN_ELEMENT = unchecked( (int)( 0x200 ) ); - public const int MCI_OPEN_ALIAS = unchecked( (int)( 0x400 ) ); - public const int MCI_OPEN_ELEMENT_ID = unchecked( (int)( 0x800 ) ); - public const int MCI_OPEN_TYPE_ID = unchecked( (int)( 0x1000 ) ); - public const int MCI_OPEN_TYPE = unchecked( (int)( 0x2000 ) ); + public const int MCI_OPEN_SHAREABLE = unchecked((int)(0x100)); + public const int MCI_OPEN_ELEMENT = unchecked((int)(0x200)); + public const int MCI_OPEN_ALIAS = unchecked((int)(0x400)); + public const int MCI_OPEN_ELEMENT_ID = unchecked((int)(0x800)); + public const int MCI_OPEN_TYPE_ID = unchecked((int)(0x1000)); + public const int MCI_OPEN_TYPE = unchecked((int)(0x2000)); // flags for dwFlags parameter of MCI_SEEK command message - public const int MCI_SEEK_TO_START = unchecked( (int)( 0x100 ) ); - public const int MCI_SEEK_TO_END = unchecked( (int)( 0x200 ) ); + public const int MCI_SEEK_TO_START = unchecked((int)(0x100)); + public const int MCI_SEEK_TO_END = unchecked((int)(0x200)); // flags for dwFlags parameter of MCI_STATUS command message - public const int MCI_STATUS_ITEM = unchecked( (int)( 0x100 ) ); - public const int MCI_STATUS_START = unchecked( (int)( 0x200 ) ); + public const int MCI_STATUS_ITEM = unchecked((int)(0x100)); + public const int MCI_STATUS_START = unchecked((int)(0x200)); // flags for dwItem field of the MCI_STATUS_PARMS parameter block - public const int MCI_STATUS_LENGTH = unchecked( (int)( 0x1 ) ); - public const int MCI_STATUS_POSITION = unchecked( (int)( 0x2 ) ); - public const int MCI_STATUS_NUMBER_OF_TRACKS = unchecked( (int)( 0x3 ) ); - public const int MCI_STATUS_MODE = unchecked( (int)( 0x4 ) ); - public const int MCI_STATUS_MEDIA_PRESENT = unchecked( (int)( 0x5 ) ); - public const int MCI_STATUS_TIME_FORMAT = unchecked( (int)( 0x6 ) ); - public const int MCI_STATUS_READY = unchecked( (int)( 0x7 ) ); - public const int MCI_STATUS_CURRENT_TRACK = unchecked( (int)( 0x8 ) ); + public const int MCI_STATUS_LENGTH = unchecked((int)(0x1)); + public const int MCI_STATUS_POSITION = unchecked((int)(0x2)); + public const int MCI_STATUS_NUMBER_OF_TRACKS = unchecked((int)(0x3)); + public const int MCI_STATUS_MODE = unchecked((int)(0x4)); + public const int MCI_STATUS_MEDIA_PRESENT = unchecked((int)(0x5)); + public const int MCI_STATUS_TIME_FORMAT = unchecked((int)(0x6)); + public const int MCI_STATUS_READY = unchecked((int)(0x7)); + public const int MCI_STATUS_CURRENT_TRACK = unchecked((int)(0x8)); // flags for dwFlags parameter of MCI_INFO command message - public const int MCI_INFO_PRODUCT = unchecked( (int)( 0x100 ) ); - public const int MCI_INFO_FILE = unchecked( (int)( 0x200 ) ); + public const int MCI_INFO_PRODUCT = unchecked((int)(0x100)); + public const int MCI_INFO_FILE = unchecked((int)(0x200)); // flags for dwFlags parameter of MCI_GETDEVCAPS command message - public const int MCI_GETDEVCAPS_ITEM = unchecked( (int)( 0x100 ) ); + public const int MCI_GETDEVCAPS_ITEM = unchecked((int)(0x100)); // flags for dwItem field of the MCI_GETDEVCAPS_PARMS parameter block - public const int MCI_GETDEVCAPS_CAN_RECORD = unchecked( (int)( 0x1 ) ); - public const int MCI_GETDEVCAPS_HAS_AUDIO = unchecked( (int)( 0x2 ) ); - public const int MCI_GETDEVCAPS_HAS_VIDEO = unchecked( (int)( 0x3 ) ); - public const int MCI_GETDEVCAPS_DEVICE_TYPE = unchecked( (int)( 0x4 ) ); - public const int MCI_GETDEVCAPS_USES_FILES = unchecked( (int)( 0x5 ) ); - public const int MCI_GETDEVCAPS_COMPOUND_DEVICE = unchecked( (int)( 0x6 ) ); - public const int MCI_GETDEVCAPS_CAN_EJECT = unchecked( (int)( 0x7 ) ); - public const int MCI_GETDEVCAPS_CAN_PLAY = unchecked( (int)( 0x8 ) ); - public const int MCI_GETDEVCAPS_CAN_SAVE = unchecked( (int)( 0x9 ) ); + public const int MCI_GETDEVCAPS_CAN_RECORD = unchecked((int)(0x1)); + public const int MCI_GETDEVCAPS_HAS_AUDIO = unchecked((int)(0x2)); + public const int MCI_GETDEVCAPS_HAS_VIDEO = unchecked((int)(0x3)); + public const int MCI_GETDEVCAPS_DEVICE_TYPE = unchecked((int)(0x4)); + public const int MCI_GETDEVCAPS_USES_FILES = unchecked((int)(0x5)); + public const int MCI_GETDEVCAPS_COMPOUND_DEVICE = unchecked((int)(0x6)); + public const int MCI_GETDEVCAPS_CAN_EJECT = unchecked((int)(0x7)); + public const int MCI_GETDEVCAPS_CAN_PLAY = unchecked((int)(0x8)); + public const int MCI_GETDEVCAPS_CAN_SAVE = unchecked((int)(0x9)); // flags for dwFlags parameter of MCI_SYSINFO command message - public const int MCI_SYSINFO_QUANTITY = unchecked( (int)( 0x100 ) ); - public const int MCI_SYSINFO_OPEN = unchecked( (int)( 0x200 ) ); - public const int MCI_SYSINFO_NAME = unchecked( (int)( 0x400 ) ); - public const int MCI_SYSINFO_INSTALLNAME = unchecked( (int)( 0x800 ) ); + public const int MCI_SYSINFO_QUANTITY = unchecked((int)(0x100)); + public const int MCI_SYSINFO_OPEN = unchecked((int)(0x200)); + public const int MCI_SYSINFO_NAME = unchecked((int)(0x400)); + public const int MCI_SYSINFO_INSTALLNAME = unchecked((int)(0x800)); // flags for dwFlags parameter of MCI_SET command message - public const int MCI_SET_DOOR_OPEN = unchecked( (int)( 0x100 ) ); - public const int MCI_SET_DOOR_CLOSED = unchecked( (int)( 0x200 ) ); - public const int MCI_SET_TIME_FORMAT = unchecked( (int)( 0x400 ) ); - public const int MCI_SET_AUDIO = unchecked( (int)( 0x800 ) ); - public const int MCI_SET_VIDEO = unchecked( (int)( 0x1000 ) ); - public const int MCI_SET_ON = unchecked( (int)( 0x2000 ) ); - public const int MCI_SET_OFF = unchecked( (int)( 0x4000 ) ); + public const int MCI_SET_DOOR_OPEN = unchecked((int)(0x100)); + public const int MCI_SET_DOOR_CLOSED = unchecked((int)(0x200)); + public const int MCI_SET_TIME_FORMAT = unchecked((int)(0x400)); + public const int MCI_SET_AUDIO = unchecked((int)(0x800)); + public const int MCI_SET_VIDEO = unchecked((int)(0x1000)); + public const int MCI_SET_ON = unchecked((int)(0x2000)); + public const int MCI_SET_OFF = unchecked((int)(0x4000)); // flags for dwAudio field of MCI_SET_PARMS or MCI_SEQ_SET_PARMS - public const int MCI_SET_AUDIO_ALL = unchecked( (int)( 0x4001 ) ); - public const int MCI_SET_AUDIO_LEFT = unchecked( (int)( 0x4002 ) ); - public const int MCI_SET_AUDIO_RIGHT = unchecked( (int)( 0x4003 ) ); + public const int MCI_SET_AUDIO_ALL = unchecked((int)(0x4001)); + public const int MCI_SET_AUDIO_LEFT = unchecked((int)(0x4002)); + public const int MCI_SET_AUDIO_RIGHT = unchecked((int)(0x4003)); // flags for dwFlags parameter of MCI_BREAK command message - public const int MCI_BREAK_KEY = unchecked( (int)( 0x100 ) ); - public const int MCI_BREAK_HWND = unchecked( (int)( 0x200 ) ); - public const int MCI_BREAK_OFF = unchecked( (int)( 0x400 ) ); + public const int MCI_BREAK_KEY = unchecked((int)(0x100)); + public const int MCI_BREAK_HWND = unchecked((int)(0x200)); + public const int MCI_BREAK_OFF = unchecked((int)(0x400)); // flags for dwFlags parameter of MCI_RECORD command message - public const int MCI_RECORD_INSERT = unchecked( (int)( 0x100 ) ); - public const int MCI_RECORD_OVERWRITE = unchecked( (int)( 0x200 ) ); + public const int MCI_RECORD_INSERT = unchecked((int)(0x100)); + public const int MCI_RECORD_OVERWRITE = unchecked((int)(0x200)); // flags for dwFlags parameter of MCI_SOUND command message - public const int MCI_SOUND_NAME = unchecked( (int)( 0x100 ) ); + public const int MCI_SOUND_NAME = unchecked((int)(0x100)); // flags for dwFlags parameter of MCI_SAVE command message - public const int MCI_SAVE_FILE = unchecked( (int)( 0x100 ) ); + public const int MCI_SAVE_FILE = unchecked((int)(0x100)); // flags for dwFlags parameter of MCI_LOAD command message - public const int MCI_LOAD_FILE = unchecked( (int)( 0x100 ) ); + public const int MCI_LOAD_FILE = unchecked((int)(0x100)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_GENERIC_PARMS { public int dwCallback; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_OPEN_PARMS { public int dwCallback; @@ -15077,7 +15077,7 @@ public struct MCI_OPEN_PARMS public string lpstrAlias; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_PLAY_PARMS { public int dwCallback; @@ -15085,14 +15085,14 @@ public struct MCI_PLAY_PARMS public int dwTo; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_SEEK_PARMS { public int dwCallback; public int dwTo; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_STATUS_PARMS { public int dwCallback; @@ -15101,7 +15101,7 @@ public struct MCI_STATUS_PARMS public int dwTrack; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_INFO_PARMS { public int dwCallback; @@ -15109,7 +15109,7 @@ public struct MCI_INFO_PARMS public int dwRetSize; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_GETDEVCAPS_PARMS { public int dwCallback; @@ -15117,7 +15117,7 @@ public struct MCI_GETDEVCAPS_PARMS public int dwIten; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_SYSINFO_PARMS { public int dwCallback; @@ -15127,7 +15127,7 @@ public struct MCI_SYSINFO_PARMS public int wDeviceType; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_SET_PARMS { public int dwCallback; @@ -15135,7 +15135,7 @@ public struct MCI_SET_PARMS public int dwAudio; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_BREAK_PARMS { public int dwCallback; @@ -15143,28 +15143,28 @@ public struct MCI_BREAK_PARMS public IntPtr hwndBreak; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_SOUND_PARMS { public int dwCallback; public string lpstrSoundName; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_SAVE_PARMS { public int dwCallback; public string lpFileName; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_LOAD_PARMS { public int dwCallback; public string lpFileName; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_RECORD_PARMS { public int dwCallback; @@ -15172,56 +15172,56 @@ public struct MCI_RECORD_PARMS public int dwTo; } - public const int MCI_VD_MODE_PARK = unchecked( (int)( ( MCI_VD_OFFSET + 1 ) ) ); + public const int MCI_VD_MODE_PARK = unchecked((int)((MCI_VD_OFFSET + 1))); // return ID's for videodisc MCI_GETDEVCAPS command // flag for dwReturn field of MCI_STATUS_PARMS // MCI_STATUS command, (dwItem == MCI_VD_STATUS_MEDIA_TYPE) - public const int MCI_VD_MEDIA_CLV = unchecked( (int)( ( MCI_VD_OFFSET + 2 ) ) ); - public const int MCI_VD_MEDIA_CAV = unchecked( (int)( ( MCI_VD_OFFSET + 3 ) ) ); - public const int MCI_VD_MEDIA_OTHER = unchecked( (int)( ( MCI_VD_OFFSET + 4 ) ) ); + public const int MCI_VD_MEDIA_CLV = unchecked((int)((MCI_VD_OFFSET + 2))); + public const int MCI_VD_MEDIA_CAV = unchecked((int)((MCI_VD_OFFSET + 3))); + public const int MCI_VD_MEDIA_OTHER = unchecked((int)((MCI_VD_OFFSET + 4))); - public const int MCI_VD_FORMAT_TRACK = unchecked( (int)( 0x4001 ) ); + public const int MCI_VD_FORMAT_TRACK = unchecked((int)(0x4001)); // flags for dwFlags parameter of MCI_PLAY command message - public const int MCI_VD_PLAY_REVERSE = unchecked( (int)( 0x10000 ) ); - public const int MCI_VD_PLAY_FAST = unchecked( (int)( 0x20000 ) ); - public const int MCI_VD_PLAY_SPEED = unchecked( (int)( 0x40000 ) ); - public const int MCI_VD_PLAY_SCAN = unchecked( (int)( 0x80000 ) ); - public const int MCI_VD_PLAY_SLOW = unchecked( (int)( 0x100000 ) ); + public const int MCI_VD_PLAY_REVERSE = unchecked((int)(0x10000)); + public const int MCI_VD_PLAY_FAST = unchecked((int)(0x20000)); + public const int MCI_VD_PLAY_SPEED = unchecked((int)(0x40000)); + public const int MCI_VD_PLAY_SCAN = unchecked((int)(0x80000)); + public const int MCI_VD_PLAY_SLOW = unchecked((int)(0x100000)); // flag for dwFlags parameter of MCI_SEEK command message - public const int MCI_VD_SEEK_REVERSE = unchecked( (int)( 0x10000 ) ); + public const int MCI_VD_SEEK_REVERSE = unchecked((int)(0x10000)); // flags for dwItem field of MCI_STATUS_PARMS parameter block - public const int MCI_VD_STATUS_SPEED = unchecked( (int)( 0x4002 ) ); - public const int MCI_VD_STATUS_FORWARD = unchecked( (int)( 0x4003 ) ); - public const int MCI_VD_STATUS_MEDIA_TYPE = unchecked( (int)( 0x4004 ) ); - public const int MCI_VD_STATUS_SIDE = unchecked( (int)( 0x4005 ) ); - public const int MCI_VD_STATUS_DISC_SIZE = unchecked( (int)( 0x4006 ) ); + public const int MCI_VD_STATUS_SPEED = unchecked((int)(0x4002)); + public const int MCI_VD_STATUS_FORWARD = unchecked((int)(0x4003)); + public const int MCI_VD_STATUS_MEDIA_TYPE = unchecked((int)(0x4004)); + public const int MCI_VD_STATUS_SIDE = unchecked((int)(0x4005)); + public const int MCI_VD_STATUS_DISC_SIZE = unchecked((int)(0x4006)); // flags for dwFlags parameter of MCI_GETDEVCAPS command message - public const int MCI_VD_GETDEVCAPS_CLV = unchecked( (int)( 0x10000 ) ); - public const int MCI_VD_GETDEVCAPS_CAV = unchecked( (int)( 0x20000 ) ); + public const int MCI_VD_GETDEVCAPS_CLV = unchecked((int)(0x10000)); + public const int MCI_VD_GETDEVCAPS_CAV = unchecked((int)(0x20000)); - public const int MCI_VD_SPIN_UP = unchecked( (int)( 0x10000 ) ); - public const int MCI_VD_SPIN_DOWN = unchecked( (int)( 0x20000 ) ); + public const int MCI_VD_SPIN_UP = unchecked((int)(0x10000)); + public const int MCI_VD_SPIN_DOWN = unchecked((int)(0x20000)); // flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block - public const int MCI_VD_GETDEVCAPS_CAN_REVERSE = unchecked( (int)( 0x4002 ) ); - public const int MCI_VD_GETDEVCAPS_FAST_RATE = unchecked( (int)( 0x4003 ) ); - public const int MCI_VD_GETDEVCAPS_SLOW_RATE = unchecked( (int)( 0x4004 ) ); - public const int MCI_VD_GETDEVCAPS_NORMAL_RATE = unchecked( (int)( 0x4005 ) ); + public const int MCI_VD_GETDEVCAPS_CAN_REVERSE = unchecked((int)(0x4002)); + public const int MCI_VD_GETDEVCAPS_FAST_RATE = unchecked((int)(0x4003)); + public const int MCI_VD_GETDEVCAPS_SLOW_RATE = unchecked((int)(0x4004)); + public const int MCI_VD_GETDEVCAPS_NORMAL_RATE = unchecked((int)(0x4005)); // flags for the dwFlags parameter of MCI_STEP command message - public const int MCI_VD_STEP_FRAMES = unchecked( (int)( 0x10000 ) ); - public const int MCI_VD_STEP_REVERSE = unchecked( (int)( 0x20000 ) ); + public const int MCI_VD_STEP_FRAMES = unchecked((int)(0x10000)); + public const int MCI_VD_STEP_REVERSE = unchecked((int)(0x20000)); // flag for the MCI_ESCAPE command message - public const int MCI_VD_ESCAPE_STRING = unchecked( (int)( 0x100 ) ); + public const int MCI_VD_ESCAPE_STRING = unchecked((int)(0x100)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_VD_PLAY_PARMS { public int dwCallback; @@ -15230,56 +15230,56 @@ public struct MCI_VD_PLAY_PARMS public int dwSpeed; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_VD_STEP_PARMS { public int dwCallback; public int dwFrames; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_VD_ESCAPE_PARMS { public int dwCallback; public string lpstrCommand; } - public const int MCI_WAVE_PCM = unchecked( (int)( ( MCI_WAVE_OFFSET + 0 ) ) ); - public const int MCI_WAVE_MAPPER = unchecked( (int)( ( MCI_WAVE_OFFSET + 1 ) ) ); + public const int MCI_WAVE_PCM = unchecked((int)((MCI_WAVE_OFFSET + 0))); + public const int MCI_WAVE_MAPPER = unchecked((int)((MCI_WAVE_OFFSET + 1))); // flags for the dwFlags parameter of MCI_OPEN command message - public const int MCI_WAVE_OPEN_BUFFER = unchecked( (int)( 0x10000 ) ); + public const int MCI_WAVE_OPEN_BUFFER = unchecked((int)(0x10000)); // flags for the dwFlags parameter of MCI_SET command message - public const int MCI_WAVE_SET_FORMATTAG = unchecked( (int)( 0x10000 ) ); - public const int MCI_WAVE_SET_CHANNELS = unchecked( (int)( 0x20000 ) ); - public const int MCI_WAVE_SET_SAMPLESPERSEC = unchecked( (int)( 0x40000 ) ); - public const int MCI_WAVE_SET_AVGBYTESPERSEC = unchecked( (int)( 0x80000 ) ); - public const int MCI_WAVE_SET_BLOCKALIGN = unchecked( (int)( 0x100000 ) ); - public const int MCI_WAVE_SET_BITSPERSAMPLE = unchecked( (int)( 0x200000 ) ); + public const int MCI_WAVE_SET_FORMATTAG = unchecked((int)(0x10000)); + public const int MCI_WAVE_SET_CHANNELS = unchecked((int)(0x20000)); + public const int MCI_WAVE_SET_SAMPLESPERSEC = unchecked((int)(0x40000)); + public const int MCI_WAVE_SET_AVGBYTESPERSEC = unchecked((int)(0x80000)); + public const int MCI_WAVE_SET_BLOCKALIGN = unchecked((int)(0x100000)); + public const int MCI_WAVE_SET_BITSPERSAMPLE = unchecked((int)(0x200000)); // flags for the dwFlags parameter of MCI_STATUS, MCI_SET command messages - public const int MCI_WAVE_INPUT = unchecked( (int)( 0x400000 ) ); - public const int MCI_WAVE_OUTPUT = unchecked( (int)( 0x800000 ) ); + public const int MCI_WAVE_INPUT = unchecked((int)(0x400000)); + public const int MCI_WAVE_OUTPUT = unchecked((int)(0x800000)); // flags for the dwItem field of MCI_STATUS_PARMS parameter block - public const int MCI_WAVE_STATUS_FORMATTAG = unchecked( (int)( 0x4001 ) ); - public const int MCI_WAVE_STATUS_CHANNELS = unchecked( (int)( 0x4002 ) ); - public const int MCI_WAVE_STATUS_SAMPLESPERSEC = unchecked( (int)( 0x4003 ) ); - public const int MCI_WAVE_STATUS_AVGBYTESPERSEC = unchecked( (int)( 0x4004 ) ); - public const int MCI_WAVE_STATUS_BLOCKALIGN = unchecked( (int)( 0x4005 ) ); - public const int MCI_WAVE_STATUS_BITSPERSAMPLE = unchecked( (int)( 0x4006 ) ); - public const int MCI_WAVE_STATUS_LEVEL = unchecked( (int)( 0x4007 ) ); + public const int MCI_WAVE_STATUS_FORMATTAG = unchecked((int)(0x4001)); + public const int MCI_WAVE_STATUS_CHANNELS = unchecked((int)(0x4002)); + public const int MCI_WAVE_STATUS_SAMPLESPERSEC = unchecked((int)(0x4003)); + public const int MCI_WAVE_STATUS_AVGBYTESPERSEC = unchecked((int)(0x4004)); + public const int MCI_WAVE_STATUS_BLOCKALIGN = unchecked((int)(0x4005)); + public const int MCI_WAVE_STATUS_BITSPERSAMPLE = unchecked((int)(0x4006)); + public const int MCI_WAVE_STATUS_LEVEL = unchecked((int)(0x4007)); // flags for the dwFlags parameter of MCI_SET command message - public const int MCI_WAVE_SET_ANYINPUT = unchecked( (int)( 0x4000000 ) ); - public const int MCI_WAVE_SET_ANYOUTPUT = unchecked( (int)( 0x8000000 ) ); + public const int MCI_WAVE_SET_ANYINPUT = unchecked((int)(0x4000000)); + public const int MCI_WAVE_SET_ANYOUTPUT = unchecked((int)(0x8000000)); // flags for the dwFlags parameter of MCI_GETDEVCAPS command message - public const int MCI_WAVE_GETDEVCAPS_INPUTS = unchecked( (int)( 0x4001 ) ); - public const int MCI_WAVE_GETDEVCAPS_OUTPUTS = unchecked( (int)( 0x4002 ) ); + public const int MCI_WAVE_GETDEVCAPS_INPUTS = unchecked((int)(0x4001)); + public const int MCI_WAVE_GETDEVCAPS_OUTPUTS = unchecked((int)(0x4002)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_WAVE_OPEN_PARMS { public int dwCallback; @@ -15290,7 +15290,7 @@ public struct MCI_WAVE_OPEN_PARMS public int dwBufferSeconds; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_WAVE_DELETE_PARMS { public int dwCallback; @@ -15298,7 +15298,7 @@ public struct MCI_WAVE_DELETE_PARMS public int dwTo; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_WAVE_SET_PARMS { public int dwCallback; @@ -15320,38 +15320,38 @@ public struct MCI_WAVE_SET_PARMS // flags for the dwReturn field of MCI_STATUS_PARMS parameter block // MCI_STATUS command, (dwItem == MCI_SEQ_STATUS_DIVTYPE) - public const int MCI_SEQ_DIV_PPQN = unchecked( (int)( ( 0 + MCI_SEQ_OFFSET ) ) ); - public const int MCI_SEQ_DIV_SMPTE_24 = unchecked( (int)( ( 1 + MCI_SEQ_OFFSET ) ) ); - public const int MCI_SEQ_DIV_SMPTE_25 = unchecked( (int)( ( 2 + MCI_SEQ_OFFSET ) ) ); - public const int MCI_SEQ_DIV_SMPTE_30DROP = unchecked( (int)( ( 3 + MCI_SEQ_OFFSET ) ) ); - public const int MCI_SEQ_DIV_SMPTE_30 = unchecked( (int)( ( 4 + MCI_SEQ_OFFSET ) ) ); + public const int MCI_SEQ_DIV_PPQN = unchecked((int)((0 + MCI_SEQ_OFFSET))); + public const int MCI_SEQ_DIV_SMPTE_24 = unchecked((int)((1 + MCI_SEQ_OFFSET))); + public const int MCI_SEQ_DIV_SMPTE_25 = unchecked((int)((2 + MCI_SEQ_OFFSET))); + public const int MCI_SEQ_DIV_SMPTE_30DROP = unchecked((int)((3 + MCI_SEQ_OFFSET))); + public const int MCI_SEQ_DIV_SMPTE_30 = unchecked((int)((4 + MCI_SEQ_OFFSET))); // flags for the dwMaster field of MCI_SEQ_SET_PARMS parameter block // MCI_SET command, (dwFlags == MCI_SEQ_SET_MASTER) - public const int MCI_SEQ_FORMAT_SONGPTR = unchecked( (int)( 0x4001 ) ); - public const int MCI_SEQ_FILE = unchecked( (int)( 0x4002 ) ); - public const int MCI_SEQ_MIDI = unchecked( (int)( 0x4003 ) ); - public const int MCI_SEQ_SMPTE = unchecked( (int)( 0x4004 ) ); - public const int MCI_SEQ_NONE = unchecked( (int)( 65533 ) ); + public const int MCI_SEQ_FORMAT_SONGPTR = unchecked((int)(0x4001)); + public const int MCI_SEQ_FILE = unchecked((int)(0x4002)); + public const int MCI_SEQ_MIDI = unchecked((int)(0x4003)); + public const int MCI_SEQ_SMPTE = unchecked((int)(0x4004)); + public const int MCI_SEQ_NONE = unchecked((int)(65533)); - public const int MCI_SEQ_MAPPER = unchecked( (int)( 65535 ) ); + public const int MCI_SEQ_MAPPER = unchecked((int)(65535)); // flags for the dwItem field of MCI_STATUS_PARMS parameter block - public const int MCI_SEQ_STATUS_TEMPO = unchecked( (int)( 0x4002 ) ); - public const int MCI_SEQ_STATUS_PORT = unchecked( (int)( 0x4003 ) ); - public const int MCI_SEQ_STATUS_SLAVE = unchecked( (int)( 0x4007 ) ); - public const int MCI_SEQ_STATUS_MASTER = unchecked( (int)( 0x4008 ) ); - public const int MCI_SEQ_STATUS_OFFSET = unchecked( (int)( 0x4009 ) ); - public const int MCI_SEQ_STATUS_DIVTYPE = unchecked( (int)( 0x400A ) ); + public const int MCI_SEQ_STATUS_TEMPO = unchecked((int)(0x4002)); + public const int MCI_SEQ_STATUS_PORT = unchecked((int)(0x4003)); + public const int MCI_SEQ_STATUS_SLAVE = unchecked((int)(0x4007)); + public const int MCI_SEQ_STATUS_MASTER = unchecked((int)(0x4008)); + public const int MCI_SEQ_STATUS_OFFSET = unchecked((int)(0x4009)); + public const int MCI_SEQ_STATUS_DIVTYPE = unchecked((int)(0x400A)); // flags for the dwFlags parameter of MCI_SET command message - public const int MCI_SEQ_SET_TEMPO = unchecked( (int)( 0x10000 ) ); - public const int MCI_SEQ_SET_PORT = unchecked( (int)( 0x20000 ) ); - public const int MCI_SEQ_SET_SLAVE = unchecked( (int)( 0x40000 ) ); - public const int MCI_SEQ_SET_MASTER = unchecked( (int)( 0x80000 ) ); - public const int MCI_SEQ_SET_OFFSET = unchecked( (int)( 0x1000000 ) ); + public const int MCI_SEQ_SET_TEMPO = unchecked((int)(0x10000)); + public const int MCI_SEQ_SET_PORT = unchecked((int)(0x20000)); + public const int MCI_SEQ_SET_SLAVE = unchecked((int)(0x40000)); + public const int MCI_SEQ_SET_MASTER = unchecked((int)(0x80000)); + public const int MCI_SEQ_SET_OFFSET = unchecked((int)(0x1000000)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_SEQ_SET_PARMS { public int dwCallback; @@ -15365,68 +15365,68 @@ public struct MCI_SEQ_SET_PARMS } // flags for dwFlags parameter of MCI_OPEN command message - public const int MCI_ANIM_OPEN_WS = unchecked( (int)( 0x10000 ) ); - public const int MCI_ANIM_OPEN_PARENT = unchecked( (int)( 0x20000 ) ); - public const int MCI_ANIM_OPEN_NOSTATIC = unchecked( (int)( 0x40000 ) ); + public const int MCI_ANIM_OPEN_WS = unchecked((int)(0x10000)); + public const int MCI_ANIM_OPEN_PARENT = unchecked((int)(0x20000)); + public const int MCI_ANIM_OPEN_NOSTATIC = unchecked((int)(0x40000)); // flags for dwFlags parameter of MCI_PLAY command message - public const int MCI_ANIM_PLAY_SPEED = unchecked( (int)( 0x10000 ) ); - public const int MCI_ANIM_PLAY_REVERSE = unchecked( (int)( 0x20000 ) ); - public const int MCI_ANIM_PLAY_FAST = unchecked( (int)( 0x40000 ) ); - public const int MCI_ANIM_PLAY_SLOW = unchecked( (int)( 0x80000 ) ); - public const int MCI_ANIM_PLAY_SCAN = unchecked( (int)( 0x100000 ) ); + public const int MCI_ANIM_PLAY_SPEED = unchecked((int)(0x10000)); + public const int MCI_ANIM_PLAY_REVERSE = unchecked((int)(0x20000)); + public const int MCI_ANIM_PLAY_FAST = unchecked((int)(0x40000)); + public const int MCI_ANIM_PLAY_SLOW = unchecked((int)(0x80000)); + public const int MCI_ANIM_PLAY_SCAN = unchecked((int)(0x100000)); // flags for dwFlags parameter of MCI_STEP command message - public const int MCI_ANIM_STEP_REVERSE = unchecked( (int)( 0x10000 ) ); - public const int MCI_ANIM_STEP_FRAMES = unchecked( (int)( 0x20000 ) ); + public const int MCI_ANIM_STEP_REVERSE = unchecked((int)(0x10000)); + public const int MCI_ANIM_STEP_FRAMES = unchecked((int)(0x20000)); // flags for dwItem field of MCI_STATUS_PARMS parameter block - public const int MCI_ANIM_STATUS_SPEED = unchecked( (int)( 0x4001 ) ); - public const int MCI_ANIM_STATUS_FORWARD = unchecked( (int)( 0x4002 ) ); - public const int MCI_ANIM_STATUS_HWND = unchecked( (int)( 0x4003 ) ); - public const int MCI_ANIM_STATUS_HPAL = unchecked( (int)( 0x4004 ) ); - public const int MCI_ANIM_STATUS_STRETCH = unchecked( (int)( 0x4005 ) ); + public const int MCI_ANIM_STATUS_SPEED = unchecked((int)(0x4001)); + public const int MCI_ANIM_STATUS_FORWARD = unchecked((int)(0x4002)); + public const int MCI_ANIM_STATUS_HWND = unchecked((int)(0x4003)); + public const int MCI_ANIM_STATUS_HPAL = unchecked((int)(0x4004)); + public const int MCI_ANIM_STATUS_STRETCH = unchecked((int)(0x4005)); // flags for the dwFlags parameter of MCI_INFO command message - public const int MCI_ANIM_INFO_TEXT = unchecked( (int)( 0x10000 ) ); + public const int MCI_ANIM_INFO_TEXT = unchecked((int)(0x10000)); // flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block - public const int MCI_ANIM_GETDEVCAPS_CAN_REVERSE = unchecked( (int)( 0x4001 ) ); - public const int MCI_ANIM_GETDEVCAPS_FAST_RATE = unchecked( (int)( 0x4002 ) ); - public const int MCI_ANIM_GETDEVCAPS_SLOW_RATE = unchecked( (int)( 0x4003 ) ); - public const int MCI_ANIM_GETDEVCAPS_NORMAL_RATE = unchecked( (int)( 0x4004 ) ); - public const int MCI_ANIM_GETDEVCAPS_PALETTES = unchecked( (int)( 0x4006 ) ); - public const int MCI_ANIM_GETDEVCAPS_CAN_STRETCH = unchecked( (int)( 0x4007 ) ); - public const int MCI_ANIM_GETDEVCAPS_MAX_WINDOWS = unchecked( (int)( 0x4008 ) ); + public const int MCI_ANIM_GETDEVCAPS_CAN_REVERSE = unchecked((int)(0x4001)); + public const int MCI_ANIM_GETDEVCAPS_FAST_RATE = unchecked((int)(0x4002)); + public const int MCI_ANIM_GETDEVCAPS_SLOW_RATE = unchecked((int)(0x4003)); + public const int MCI_ANIM_GETDEVCAPS_NORMAL_RATE = unchecked((int)(0x4004)); + public const int MCI_ANIM_GETDEVCAPS_PALETTES = unchecked((int)(0x4006)); + public const int MCI_ANIM_GETDEVCAPS_CAN_STRETCH = unchecked((int)(0x4007)); + public const int MCI_ANIM_GETDEVCAPS_MAX_WINDOWS = unchecked((int)(0x4008)); // flags for the MCI_REALIZE command message - public const int MCI_ANIM_REALIZE_NORM = unchecked( (int)( 0x10000 ) ); - public const int MCI_ANIM_REALIZE_BKGD = unchecked( (int)( 0x20000 ) ); + public const int MCI_ANIM_REALIZE_NORM = unchecked((int)(0x10000)); + public const int MCI_ANIM_REALIZE_BKGD = unchecked((int)(0x20000)); // flags for dwFlags parameter of MCI_WINDOW command message - public const int MCI_ANIM_WINDOW_HWND = unchecked( (int)( 0x10000 ) ); - public const int MCI_ANIM_WINDOW_STATE = unchecked( (int)( 0x40000 ) ); - public const int MCI_ANIM_WINDOW_TEXT = unchecked( (int)( 0x80000 ) ); - public const int MCI_ANIM_WINDOW_ENABLE_STRETCH = unchecked( (int)( 0x100000 ) ); - public const int MCI_ANIM_WINDOW_DISABLE_STRETCH = unchecked( (int)( 0x200000 ) ); + public const int MCI_ANIM_WINDOW_HWND = unchecked((int)(0x10000)); + public const int MCI_ANIM_WINDOW_STATE = unchecked((int)(0x40000)); + public const int MCI_ANIM_WINDOW_TEXT = unchecked((int)(0x80000)); + public const int MCI_ANIM_WINDOW_ENABLE_STRETCH = unchecked((int)(0x100000)); + public const int MCI_ANIM_WINDOW_DISABLE_STRETCH = unchecked((int)(0x200000)); // flags for hWnd field of MCI_ANIM_WINDOW_PARMS parameter block // MCI_WINDOW command message, (dwFlags == MCI_ANIM_WINDOW_HWND) - public const int MCI_ANIM_WINDOW_DEFAULT = unchecked( (int)( 0x0 ) ); + public const int MCI_ANIM_WINDOW_DEFAULT = unchecked((int)(0x0)); // flags for dwFlags parameter of MCI_PUT command message - public const int MCI_ANIM_RECT = unchecked( (int)( 0x10000 ) ); - public const int MCI_ANIM_PUT_SOURCE = unchecked( (int)( 0x20000 ) );// also MCI_WHERE - public const int MCI_ANIM_PUT_DESTINATION = unchecked( (int)( 0x40000 ) );// also MCI_WHERE + public const int MCI_ANIM_RECT = unchecked((int)(0x10000)); + public const int MCI_ANIM_PUT_SOURCE = unchecked((int)(0x20000));// also MCI_WHERE + public const int MCI_ANIM_PUT_DESTINATION = unchecked((int)(0x40000));// also MCI_WHERE // flags for dwFlags parameter of MCI_WHERE command message - public const int MCI_ANIM_WHERE_SOURCE = unchecked( (int)( 0x20000 ) ); - public const int MCI_ANIM_WHERE_DESTINATION = unchecked( (int)( 0x40000 ) ); + public const int MCI_ANIM_WHERE_SOURCE = unchecked((int)(0x20000)); + public const int MCI_ANIM_WHERE_DESTINATION = unchecked((int)(0x40000)); // flags for dwFlags parameter of MCI_UPDATE command message - public const int MCI_ANIM_UPDATE_HDC = unchecked( (int)( 0x20000 ) ); + public const int MCI_ANIM_UPDATE_HDC = unchecked((int)(0x20000)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_ANIM_OPEN_PARMS { public int dwCallback; @@ -15438,7 +15438,7 @@ public struct MCI_ANIM_OPEN_PARMS public IntPtr hWndParent; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_ANIM_PLAY_PARMS { public int dwCallback; @@ -15447,14 +15447,14 @@ public struct MCI_ANIM_PLAY_PARMS public int dwSpeed; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_ANIM_STEP_PARMS { public int dwCallback; public int dwFrames; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_ANIM_WINDOW_PARMS { public int dwCallback; @@ -15463,14 +15463,14 @@ public struct MCI_ANIM_WINDOW_PARMS public string lpstrText; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_ANIM_RECT_PARMS { public int dwCallback; public RECT rc; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_ANIM_UPDATE_PARMS { public int dwCallback; @@ -15479,45 +15479,45 @@ public struct MCI_ANIM_UPDATE_PARMS } // flags for dwFlags parameter of MCI_OPEN command message - public const int MCI_OVLY_OPEN_WS = unchecked( (int)( 0x10000 ) ); - public const int MCI_OVLY_OPEN_PARENT = unchecked( (int)( 0x20000 ) ); + public const int MCI_OVLY_OPEN_WS = unchecked((int)(0x10000)); + public const int MCI_OVLY_OPEN_PARENT = unchecked((int)(0x20000)); // flags for dwFlags parameter of MCI_STATUS command message - public const int MCI_OVLY_STATUS_HWND = unchecked( (int)( 0x4001 ) ); - public const int MCI_OVLY_STATUS_STRETCH = unchecked( (int)( 0x4002 ) ); + public const int MCI_OVLY_STATUS_HWND = unchecked((int)(0x4001)); + public const int MCI_OVLY_STATUS_STRETCH = unchecked((int)(0x4002)); // flags for dwFlags parameter of MCI_INFO command message - public const int MCI_OVLY_INFO_TEXT = unchecked( (int)( 0x10000 ) ); + public const int MCI_OVLY_INFO_TEXT = unchecked((int)(0x10000)); // flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block - public const int MCI_OVLY_GETDEVCAPS_CAN_STRETCH = unchecked( (int)( 0x4001 ) ); - public const int MCI_OVLY_GETDEVCAPS_CAN_FREEZE = unchecked( (int)( 0x4002 ) ); - public const int MCI_OVLY_GETDEVCAPS_MAX_WINDOWS = unchecked( (int)( 0x4003 ) ); + public const int MCI_OVLY_GETDEVCAPS_CAN_STRETCH = unchecked((int)(0x4001)); + public const int MCI_OVLY_GETDEVCAPS_CAN_FREEZE = unchecked((int)(0x4002)); + public const int MCI_OVLY_GETDEVCAPS_MAX_WINDOWS = unchecked((int)(0x4003)); // flags for dwFlags parameter of MCI_WINDOW command message - public const int MCI_OVLY_WINDOW_HWND = unchecked( (int)( 0x10000 ) ); - public const int MCI_OVLY_WINDOW_STATE = unchecked( (int)( 0x40000 ) ); - public const int MCI_OVLY_WINDOW_TEXT = unchecked( (int)( 0x80000 ) ); - public const int MCI_OVLY_WINDOW_ENABLE_STRETCH = unchecked( (int)( 0x100000 ) ); - public const int MCI_OVLY_WINDOW_DISABLE_STRETCH = unchecked( (int)( 0x200000 ) ); + public const int MCI_OVLY_WINDOW_HWND = unchecked((int)(0x10000)); + public const int MCI_OVLY_WINDOW_STATE = unchecked((int)(0x40000)); + public const int MCI_OVLY_WINDOW_TEXT = unchecked((int)(0x80000)); + public const int MCI_OVLY_WINDOW_ENABLE_STRETCH = unchecked((int)(0x100000)); + public const int MCI_OVLY_WINDOW_DISABLE_STRETCH = unchecked((int)(0x200000)); // flags for hWnd parameter of MCI_OVLY_WINDOW_PARMS parameter block - public const int MCI_OVLY_WINDOW_DEFAULT = unchecked( (int)( 0x0 ) ); + public const int MCI_OVLY_WINDOW_DEFAULT = unchecked((int)(0x0)); // flags for dwFlags parameter of MCI_PUT command message - public const int MCI_OVLY_RECT = unchecked( (int)( 0x10000 ) ); - public const int MCI_OVLY_PUT_SOURCE = unchecked( (int)( 0x20000 ) ); - public const int MCI_OVLY_PUT_DESTINATION = unchecked( (int)( 0x40000 ) ); - public const int MCI_OVLY_PUT_FRAME = unchecked( (int)( 0x80000 ) ); - public const int MCI_OVLY_PUT_VIDEO = unchecked( (int)( 0x100000 ) ); + public const int MCI_OVLY_RECT = unchecked((int)(0x10000)); + public const int MCI_OVLY_PUT_SOURCE = unchecked((int)(0x20000)); + public const int MCI_OVLY_PUT_DESTINATION = unchecked((int)(0x40000)); + public const int MCI_OVLY_PUT_FRAME = unchecked((int)(0x80000)); + public const int MCI_OVLY_PUT_VIDEO = unchecked((int)(0x100000)); // flags for dwFlags parameter of MCI_WHERE command message - public const int MCI_OVLY_WHERE_SOURCE = unchecked( (int)( 0x20000 ) ); - public const int MCI_OVLY_WHERE_DESTINATION = unchecked( (int)( 0x40000 ) ); - public const int MCI_OVLY_WHERE_FRAME = unchecked( (int)( 0x80000 ) ); - public const int MCI_OVLY_WHERE_VIDEO = unchecked( (int)( 0x100000 ) ); + public const int MCI_OVLY_WHERE_SOURCE = unchecked((int)(0x20000)); + public const int MCI_OVLY_WHERE_DESTINATION = unchecked((int)(0x40000)); + public const int MCI_OVLY_WHERE_FRAME = unchecked((int)(0x80000)); + public const int MCI_OVLY_WHERE_VIDEO = unchecked((int)(0x100000)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_OVLY_OPEN_PARMS { public int dwCallback; @@ -15529,7 +15529,7 @@ public struct MCI_OVLY_OPEN_PARMS public IntPtr hWndParent; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_OVLY_WINDOW_PARMS { public int dwCallback; @@ -15538,14 +15538,14 @@ public struct MCI_OVLY_WINDOW_PARMS public string lpstrText; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_OVLY_RECT_PARMS { public int dwCallback; public RECT rc; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_OVLY_SAVE_PARMS { public int dwCallback; @@ -15553,7 +15553,7 @@ public struct MCI_OVLY_SAVE_PARMS public RECT rc; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MCI_OVLY_LOAD_PARMS { public int dwCallback; @@ -15561,31 +15561,31 @@ public struct MCI_OVLY_LOAD_PARMS public RECT rc; } - public const int CAPS1 = unchecked( (int)( 94 ) );// other caps - public const int C1_TRANSPARENT = unchecked( (int)( 0x1 ) );// new raster cap - public const int NEWTRANSPARENT = unchecked( (int)( 3 ) );// use with SetBkMode() + public const int CAPS1 = unchecked((int)(94));// other caps + public const int C1_TRANSPARENT = unchecked((int)(0x1));// new raster cap + public const int NEWTRANSPARENT = unchecked((int)(3));// use with SetBkMode() - public const int QUERYROPSUPPORT = unchecked( (int)( 40 ) );// use to determine ROP support + public const int QUERYROPSUPPORT = unchecked((int)(40));// use to determine ROP support - public const int SELECTDIB = unchecked( (int)( 41 ) );// DIB.DRV select dib escape + public const int SELECTDIB = unchecked((int)(41));// DIB.DRV select dib escape // ---------------- // shell association database management functions // ----------------- // error values for ShellExecute() beyond the regular WinExec() codes - public const int SE_ERR_SHARE = unchecked( (int)( 26 ) ); - public const int SE_ERR_ASSOCINCOMPLETE = unchecked( (int)( 27 ) ); - public const int SE_ERR_DDETIMEOUT = unchecked( (int)( 28 ) ); - public const int SE_ERR_DDEFAIL = unchecked( (int)( 29 ) ); - public const int SE_ERR_DDEBUSY = unchecked( (int)( 30 ) ); - public const int SE_ERR_NOASSOC = unchecked( (int)( 31 ) ); + public const int SE_ERR_SHARE = unchecked((int)(26)); + public const int SE_ERR_ASSOCINCOMPLETE = unchecked((int)(27)); + public const int SE_ERR_DDETIMEOUT = unchecked((int)(28)); + public const int SE_ERR_DDEFAIL = unchecked((int)(29)); + public const int SE_ERR_DDEBUSY = unchecked((int)(30)); + public const int SE_ERR_NOASSOC = unchecked((int)(31)); // ------------- // Print APIs // ------------- - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PRINTER_INFO_1 { public int flags; @@ -15594,7 +15594,7 @@ public struct PRINTER_INFO_1 public string pComment; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PRINTER_INFO_2 { public string pServerName; @@ -15620,54 +15620,54 @@ public struct PRINTER_INFO_2 public int AveragePPM; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PRINTER_INFO_3 { public SECURITY_DESCRIPTOR pSecurityDescriptor; } - public const int PRINTER_CONTROL_PAUSE = unchecked( (int)( 1 ) ); - public const int PRINTER_CONTROL_RESUME = unchecked( (int)( 2 ) ); - public const int PRINTER_CONTROL_PURGE = unchecked( (int)( 3 ) ); - - public const int PRINTER_STATUS_PAUSED = unchecked( (int)( 0x1 ) ); - public const int PRINTER_STATUS_ERROR = unchecked( (int)( 0x2 ) ); - public const int PRINTER_STATUS_PENDING_DELETION = unchecked( (int)( 0x4 ) ); - public const int PRINTER_STATUS_PAPER_JAM = unchecked( (int)( 0x8 ) ); - public const int PRINTER_STATUS_PAPER_OUT = unchecked( (int)( 0x10 ) ); - public const int PRINTER_STATUS_MANUAL_FEED = unchecked( (int)( 0x20 ) ); - public const int PRINTER_STATUS_PAPER_PROBLEM = unchecked( (int)( 0x40 ) ); - public const int PRINTER_STATUS_OFFLINE = unchecked( (int)( 0x80 ) ); - public const int PRINTER_STATUS_IO_ACTIVE = unchecked( (int)( 0x100 ) ); - public const int PRINTER_STATUS_BUSY = unchecked( (int)( 0x200 ) ); - public const int PRINTER_STATUS_PRINTING = unchecked( (int)( 0x400 ) ); - public const int PRINTER_STATUS_OUTPUT_BIN_FULL = unchecked( (int)( 0x800 ) ); - public const int PRINTER_STATUS_NOT_AVAILABLE = unchecked( (int)( 0x1000 ) ); - public const int PRINTER_STATUS_WAITING = unchecked( (int)( 0x2000 ) ); - public const int PRINTER_STATUS_PROCESSING = unchecked( (int)( 0x4000 ) ); - public const int PRINTER_STATUS_INITIALIZING = unchecked( (int)( 0x8000 ) ); - public const int PRINTER_STATUS_WARMING_UP = unchecked( (int)( 0x10000 ) ); - public const int PRINTER_STATUS_TONER_LOW = unchecked( (int)( 0x20000 ) ); - public const int PRINTER_STATUS_NO_TONER = unchecked( (int)( 0x40000 ) ); - public const int PRINTER_STATUS_PAGE_PUNT = unchecked( (int)( 0x80000 ) ); - public const int PRINTER_STATUS_USER_INTERVENTION = unchecked( (int)( 0x100000 ) ); - public const int PRINTER_STATUS_OUT_OF_MEMORY = unchecked( (int)( 0x200000 ) ); - public const int PRINTER_STATUS_DOOR_OPEN = unchecked( (int)( 0x400000 ) ); - - public const int PRINTER_ATTRIBUTE_QUEUED = unchecked( (int)( 0x1 ) ); - public const int PRINTER_ATTRIBUTE_DIRECT = unchecked( (int)( 0x2 ) ); - public const int PRINTER_ATTRIBUTE_DEFAULT = unchecked( (int)( 0x4 ) ); - public const int PRINTER_ATTRIBUTE_SHARED = unchecked( (int)( 0x8 ) ); - public const int PRINTER_ATTRIBUTE_NETWORK = unchecked( (int)( 0x10 ) ); - public const int PRINTER_ATTRIBUTE_HIDDEN = unchecked( (int)( 0x20 ) ); - public const int PRINTER_ATTRIBUTE_LOCAL = unchecked( (int)( 0x40 ) ); - - public const int NO_PRIORITY = unchecked( (int)( 0 ) ); - public const int MAX_PRIORITY = unchecked( (int)( 99 ) ); - public const int MIN_PRIORITY = unchecked( (int)( 1 ) ); - public const int DEF_PRIORITY = unchecked( (int)( 1 ) ); - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int PRINTER_CONTROL_PAUSE = unchecked((int)(1)); + public const int PRINTER_CONTROL_RESUME = unchecked((int)(2)); + public const int PRINTER_CONTROL_PURGE = unchecked((int)(3)); + + public const int PRINTER_STATUS_PAUSED = unchecked((int)(0x1)); + public const int PRINTER_STATUS_ERROR = unchecked((int)(0x2)); + public const int PRINTER_STATUS_PENDING_DELETION = unchecked((int)(0x4)); + public const int PRINTER_STATUS_PAPER_JAM = unchecked((int)(0x8)); + public const int PRINTER_STATUS_PAPER_OUT = unchecked((int)(0x10)); + public const int PRINTER_STATUS_MANUAL_FEED = unchecked((int)(0x20)); + public const int PRINTER_STATUS_PAPER_PROBLEM = unchecked((int)(0x40)); + public const int PRINTER_STATUS_OFFLINE = unchecked((int)(0x80)); + public const int PRINTER_STATUS_IO_ACTIVE = unchecked((int)(0x100)); + public const int PRINTER_STATUS_BUSY = unchecked((int)(0x200)); + public const int PRINTER_STATUS_PRINTING = unchecked((int)(0x400)); + public const int PRINTER_STATUS_OUTPUT_BIN_FULL = unchecked((int)(0x800)); + public const int PRINTER_STATUS_NOT_AVAILABLE = unchecked((int)(0x1000)); + public const int PRINTER_STATUS_WAITING = unchecked((int)(0x2000)); + public const int PRINTER_STATUS_PROCESSING = unchecked((int)(0x4000)); + public const int PRINTER_STATUS_INITIALIZING = unchecked((int)(0x8000)); + public const int PRINTER_STATUS_WARMING_UP = unchecked((int)(0x10000)); + public const int PRINTER_STATUS_TONER_LOW = unchecked((int)(0x20000)); + public const int PRINTER_STATUS_NO_TONER = unchecked((int)(0x40000)); + public const int PRINTER_STATUS_PAGE_PUNT = unchecked((int)(0x80000)); + public const int PRINTER_STATUS_USER_INTERVENTION = unchecked((int)(0x100000)); + public const int PRINTER_STATUS_OUT_OF_MEMORY = unchecked((int)(0x200000)); + public const int PRINTER_STATUS_DOOR_OPEN = unchecked((int)(0x400000)); + + public const int PRINTER_ATTRIBUTE_QUEUED = unchecked((int)(0x1)); + public const int PRINTER_ATTRIBUTE_DIRECT = unchecked((int)(0x2)); + public const int PRINTER_ATTRIBUTE_DEFAULT = unchecked((int)(0x4)); + public const int PRINTER_ATTRIBUTE_SHARED = unchecked((int)(0x8)); + public const int PRINTER_ATTRIBUTE_NETWORK = unchecked((int)(0x10)); + public const int PRINTER_ATTRIBUTE_HIDDEN = unchecked((int)(0x20)); + public const int PRINTER_ATTRIBUTE_LOCAL = unchecked((int)(0x40)); + + public const int NO_PRIORITY = unchecked((int)(0)); + public const int MAX_PRIORITY = unchecked((int)(99)); + public const int MIN_PRIORITY = unchecked((int)(1)); + public const int DEF_PRIORITY = unchecked((int)(1)); + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct JOB_INFO_1 { public int JobId; @@ -15685,7 +15685,7 @@ public struct JOB_INFO_1 public SYSTEMTIME Submitted; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct JOB_INFO_2 { public int JobId; @@ -15713,36 +15713,36 @@ public struct JOB_INFO_2 public int PagesPrinted; } - public const int JOB_CONTROL_PAUSE = unchecked( (int)( 1 ) ); - public const int JOB_CONTROL_RESUME = unchecked( (int)( 2 ) ); - public const int JOB_CONTROL_CANCEL = unchecked( (int)( 3 ) ); - public const int JOB_CONTROL_RESTART = unchecked( (int)( 4 ) ); + public const int JOB_CONTROL_PAUSE = unchecked((int)(1)); + public const int JOB_CONTROL_RESUME = unchecked((int)(2)); + public const int JOB_CONTROL_CANCEL = unchecked((int)(3)); + public const int JOB_CONTROL_RESTART = unchecked((int)(4)); - public const int JOB_STATUS_PAUSED = unchecked( (int)( 0x1 ) ); - public const int JOB_STATUS_ERROR = unchecked( (int)( 0x2 ) ); - public const int JOB_STATUS_DELETING = unchecked( (int)( 0x4 ) ); - public const int JOB_STATUS_SPOOLING = unchecked( (int)( 0x8 ) ); - public const int JOB_STATUS_PRINTING = unchecked( (int)( 0x10 ) ); - public const int JOB_STATUS_OFFLINE = unchecked( (int)( 0x20 ) ); - public const int JOB_STATUS_PAPEROUT = unchecked( (int)( 0x40 ) ); - public const int JOB_STATUS_PRINTED = unchecked( (int)( 0x80 ) ); + public const int JOB_STATUS_PAUSED = unchecked((int)(0x1)); + public const int JOB_STATUS_ERROR = unchecked((int)(0x2)); + public const int JOB_STATUS_DELETING = unchecked((int)(0x4)); + public const int JOB_STATUS_SPOOLING = unchecked((int)(0x8)); + public const int JOB_STATUS_PRINTING = unchecked((int)(0x10)); + public const int JOB_STATUS_OFFLINE = unchecked((int)(0x20)); + public const int JOB_STATUS_PAPEROUT = unchecked((int)(0x40)); + public const int JOB_STATUS_PRINTED = unchecked((int)(0x80)); - public const int JOB_POSITION_UNSPECIFIED = unchecked( (int)( 0 ) ); + public const int JOB_POSITION_UNSPECIFIED = unchecked((int)(0)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ADDJOB_INFO_1 { public string Path; public int JobId; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DRIVER_INFO_1 { public string pName; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DRIVER_INFO_2 { public int cVersion; @@ -15753,7 +15753,7 @@ public struct DRIVER_INFO_2 public string pConfigFile; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DOC_INFO_1 { public string pDocName; @@ -15761,7 +15761,7 @@ public struct DOC_INFO_1 public string pDatatype; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct FORM_INFO_1 { public string pName; @@ -15769,27 +15769,27 @@ public struct FORM_INFO_1 public RECTL ImageableArea; } - public const int FORM_BUILTIN = unchecked( (int)( 0x1 ) ); + public const int FORM_BUILTIN = unchecked((int)(0x1)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PRINTPROCESSOR_INFO_1 { public string pName; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PORT_INFO_1 { public string pName; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MONITOR_INFO_1 { public string pName; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MONITOR_INFO_2 { public string pName; @@ -15797,13 +15797,13 @@ public struct MONITOR_INFO_2 public string pDLLName; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DATATYPES_INFO_1 { public string pName; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PRINTER_DEFAULTS { public string pDatatype; @@ -15811,7 +15811,7 @@ public struct PRINTER_DEFAULTS public int DesiredAccess; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PRINTER_INFO_4 { public string pPrinterName; @@ -15819,7 +15819,7 @@ public struct PRINTER_INFO_4 public int Attributes; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PRINTER_INFO_5 { public string pPrinterName; @@ -15829,13 +15829,13 @@ public struct PRINTER_INFO_5 public int TransmissionRetryTimeout; } - public const int PRINTER_CONTROL_SET_STATUS = unchecked( (int)( 4 ) ); - public const int PRINTER_ATTRIBUTE_WORK_OFFLINE = unchecked( (int)( 0x400 ) ); - public const int PRINTER_ATTRIBUTE_ENABLE_BIDI = unchecked( (int)( 0x800 ) ); - public const int JOB_CONTROL_DELETE = unchecked( (int)( 5 ) ); - public const int JOB_STATUS_USER_INTERVENTION = unchecked( (int)( 0x10000 ) ); + public const int PRINTER_CONTROL_SET_STATUS = unchecked((int)(4)); + public const int PRINTER_ATTRIBUTE_WORK_OFFLINE = unchecked((int)(0x400)); + public const int PRINTER_ATTRIBUTE_ENABLE_BIDI = unchecked((int)(0x800)); + public const int JOB_CONTROL_DELETE = unchecked((int)(5)); + public const int JOB_STATUS_USER_INTERVENTION = unchecked((int)(0x10000)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DRIVER_INFO_3 { public int cVersion; @@ -15850,7 +15850,7 @@ public struct DRIVER_INFO_3 public string pDefaultDataType;// "EMF" } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DOC_INFO_2 { public string pDocName; @@ -15860,10 +15860,10 @@ public struct DOC_INFO_2 public int JobId; } - public const int DI_CHANNEL = unchecked( (int)( 1 ) );// start direct read/write channel, - public const int DI_READ_SPOOL_JOB = unchecked( (int)( 3 ) ); + public const int DI_CHANNEL = unchecked((int)(1));// start direct read/write channel, + public const int DI_READ_SPOOL_JOB = unchecked((int)(3)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PORT_INFO_2 { public string pPortName; @@ -15873,233 +15873,233 @@ public struct PORT_INFO_2 public int Reserved; } - public const int PORT_TYPE_WRITE = unchecked( (int)( 0x1 ) ); - public const int PORT_TYPE_READ = unchecked( (int)( 0x2 ) ); - public const int PORT_TYPE_REDIRECTED = unchecked( (int)( 0x4 ) ); - public const int PORT_TYPE_NET_ATTACHED = unchecked( (int)( 0x8 ) ); + public const int PORT_TYPE_WRITE = unchecked((int)(0x1)); + public const int PORT_TYPE_READ = unchecked((int)(0x2)); + public const int PORT_TYPE_REDIRECTED = unchecked((int)(0x4)); + public const int PORT_TYPE_NET_ATTACHED = unchecked((int)(0x8)); - [DllImport( "winspool.drv", EntryPoint = "EnumPrinters", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumPrinters( int flags, string name, int Level, byte pPrinterEnum, int cdBuf, int pcbNeeded, int pcReturned ); + [DllImport("winspool.drv", EntryPoint = "EnumPrinters", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumPrinters(int flags, string name, int Level, byte pPrinterEnum, int cdBuf, int pcbNeeded, int pcReturned); - [DllImport( "winspool.drv", EntryPoint = "EnumPrinterPropertySheets", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumPrinterPropertySheets( IntPtr hPrinter, IntPtr hWnd, IntPtr lpfnAdd, int lParam ); + [DllImport("winspool.drv", EntryPoint = "EnumPrinterPropertySheets", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumPrinterPropertySheets(IntPtr hPrinter, IntPtr hWnd, IntPtr lpfnAdd, int lParam); - public const int PRINTER_ENUM_DEFAULT = unchecked( (int)( 0x1 ) ); - public const int PRINTER_ENUM_LOCAL = unchecked( (int)( 0x2 ) ); - public const int PRINTER_ENUM_CONNECTIONS = unchecked( (int)( 0x4 ) ); - public const int PRINTER_ENUM_FAVORITE = unchecked( (int)( 0x4 ) ); - public const int PRINTER_ENUM_NAME = unchecked( (int)( 0x8 ) ); - public const int PRINTER_ENUM_REMOTE = unchecked( (int)( 0x10 ) ); - public const int PRINTER_ENUM_SHARED = unchecked( (int)( 0x20 ) ); - public const int PRINTER_ENUM_NETWORK = unchecked( (int)( 0x40 ) ); + public const int PRINTER_ENUM_DEFAULT = unchecked((int)(0x1)); + public const int PRINTER_ENUM_LOCAL = unchecked((int)(0x2)); + public const int PRINTER_ENUM_CONNECTIONS = unchecked((int)(0x4)); + public const int PRINTER_ENUM_FAVORITE = unchecked((int)(0x4)); + public const int PRINTER_ENUM_NAME = unchecked((int)(0x8)); + public const int PRINTER_ENUM_REMOTE = unchecked((int)(0x10)); + public const int PRINTER_ENUM_SHARED = unchecked((int)(0x20)); + public const int PRINTER_ENUM_NETWORK = unchecked((int)(0x40)); - public const int PRINTER_ENUM_EXPAND = unchecked( (int)( 0x4000 ) ); - public const int PRINTER_ENUM_CONTAINER = unchecked( (int)( 0x8000 ) ); + public const int PRINTER_ENUM_EXPAND = unchecked((int)(0x4000)); + public const int PRINTER_ENUM_CONTAINER = unchecked((int)(0x8000)); - public const int PRINTER_ENUM_ICONMASK = unchecked( (int)( 0xFF0000 ) ); - public const int PRINTER_ENUM_ICON1 = unchecked( (int)( 0x10000 ) ); - public const int PRINTER_ENUM_ICON2 = unchecked( (int)( 0x20000 ) ); - public const int PRINTER_ENUM_ICON3 = unchecked( (int)( 0x40000 ) ); - public const int PRINTER_ENUM_ICON4 = unchecked( (int)( 0x80000 ) ); - public const int PRINTER_ENUM_ICON5 = unchecked( (int)( 0x100000 ) ); - public const int PRINTER_ENUM_ICON6 = unchecked( (int)( 0x200000 ) ); - public const int PRINTER_ENUM_ICON7 = unchecked( (int)( 0x400000 ) ); - public const int PRINTER_ENUM_ICON8 = unchecked( (int)( 0x800000 ) ); + public const int PRINTER_ENUM_ICONMASK = unchecked((int)(0xFF0000)); + public const int PRINTER_ENUM_ICON1 = unchecked((int)(0x10000)); + public const int PRINTER_ENUM_ICON2 = unchecked((int)(0x20000)); + public const int PRINTER_ENUM_ICON3 = unchecked((int)(0x40000)); + public const int PRINTER_ENUM_ICON4 = unchecked((int)(0x80000)); + public const int PRINTER_ENUM_ICON5 = unchecked((int)(0x100000)); + public const int PRINTER_ENUM_ICON6 = unchecked((int)(0x200000)); + public const int PRINTER_ENUM_ICON7 = unchecked((int)(0x400000)); + public const int PRINTER_ENUM_ICON8 = unchecked((int)(0x800000)); - [DllImport( "winspool.drv", EntryPoint = "OpenPrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenPrinter( string pPrinterName, int phPrinter, PRINTER_DEFAULTS pDefault ); + [DllImport("winspool.drv", EntryPoint = "OpenPrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenPrinter(string pPrinterName, int phPrinter, PRINTER_DEFAULTS pDefault); - [DllImport( "winspool.drv", EntryPoint = "ResetPrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ResetPrinter( IntPtr hPrinter, PRINTER_DEFAULTS pDefault ); + [DllImport("winspool.drv", EntryPoint = "ResetPrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ResetPrinter(IntPtr hPrinter, PRINTER_DEFAULTS pDefault); - [DllImport( "winspool.drv", EntryPoint = "SetJob", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetJob( IntPtr hPrinter, int JobId, int Level, byte pJob, int Command ); + [DllImport("winspool.drv", EntryPoint = "SetJob", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetJob(IntPtr hPrinter, int JobId, int Level, byte pJob, int Command); - [DllImport( "winspool.drv", EntryPoint = "GetJob", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetJob( IntPtr hPrinter, int JobId, int Level, byte pJob, int cdBuf, int pcbNeeded ); + [DllImport("winspool.drv", EntryPoint = "GetJob", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetJob(IntPtr hPrinter, int JobId, int Level, byte pJob, int cdBuf, int pcbNeeded); - [DllImport( "winspool.drv", EntryPoint = "EnumJobs", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumJobs( IntPtr hPrinter, int FirstJob, int NoJobs, int Level, byte pJob, int cdBuf, int pcbNeeded, int pcReturned ); + [DllImport("winspool.drv", EntryPoint = "EnumJobs", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumJobs(IntPtr hPrinter, int FirstJob, int NoJobs, int Level, byte pJob, int cdBuf, int pcbNeeded, int pcReturned); - [DllImport( "winspool.drv", EntryPoint = "AddPrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AddPrinter( string pName, int Level, object pPrinter ); + [DllImport("winspool.drv", EntryPoint = "AddPrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AddPrinter(string pName, int Level, object pPrinter); - [DllImport( "winspool.drv", EntryPoint = "AddPrinterDriver", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AddPrinterDriver( string pName, int Level, object pDriverInfo ); + [DllImport("winspool.drv", EntryPoint = "AddPrinterDriver", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AddPrinterDriver(string pName, int Level, object pDriverInfo); - [DllImport( "winspool.drv", EntryPoint = "EnumPrinterDrivers", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumPrinterDrivers( string pName, string pEnvironment, int Level, byte pDriverInfo, int cdBuf, int pcbNeeded, int pcRetruned ); + [DllImport("winspool.drv", EntryPoint = "EnumPrinterDrivers", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumPrinterDrivers(string pName, string pEnvironment, int Level, byte pDriverInfo, int cdBuf, int pcbNeeded, int pcRetruned); - [DllImport( "winspool.drv", EntryPoint = "GetPrinterDriver", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetPrinterDriver( IntPtr hPrinter, string pEnvironment, int Level, byte pDriverInfo, int cdBuf, int pcbNeeded ); + [DllImport("winspool.drv", EntryPoint = "GetPrinterDriver", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetPrinterDriver(IntPtr hPrinter, string pEnvironment, int Level, byte pDriverInfo, int cdBuf, int pcbNeeded); - [DllImport( "winspool.drv", EntryPoint = "GetPrinterDriverDirectory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetPrinterDriverDirectory( string pName, string pEnvironment, int Level, byte pDriverDirectory, int cdBuf, int pcbNeeded ); + [DllImport("winspool.drv", EntryPoint = "GetPrinterDriverDirectory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetPrinterDriverDirectory(string pName, string pEnvironment, int Level, byte pDriverDirectory, int cdBuf, int pcbNeeded); - [DllImport( "winspool.drv", EntryPoint = "DeletePrinterDriver", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeletePrinterDriver( string pName, string pEnvironment, string pDriverName ); + [DllImport("winspool.drv", EntryPoint = "DeletePrinterDriver", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeletePrinterDriver(string pName, string pEnvironment, string pDriverName); - [DllImport( "winspool.drv", EntryPoint = "AddPrintProcessor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AddPrintProcessor( string pName, string pEnvironment, string pPathName, string pPrintProcessorName ); + [DllImport("winspool.drv", EntryPoint = "AddPrintProcessor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AddPrintProcessor(string pName, string pEnvironment, string pPathName, string pPrintProcessorName); - [DllImport( "winspool.drv", EntryPoint = "EnumPrintProcessors", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumPrintProcessors( string pName, string pEnvironment, int Level, byte pPrintProcessorInfo, int cdBuf, int pcbNeeded, int pcReturned ); + [DllImport("winspool.drv", EntryPoint = "EnumPrintProcessors", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumPrintProcessors(string pName, string pEnvironment, int Level, byte pPrintProcessorInfo, int cdBuf, int pcbNeeded, int pcReturned); - [DllImport( "winspool.drv", EntryPoint = "GetPrintProcessorDirectory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetPrintProcessorDirectory( string pName, string pEnvironment, int Level, string pPrintProcessorInfo, int cdBuf, int pcbNeeded ); + [DllImport("winspool.drv", EntryPoint = "GetPrintProcessorDirectory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetPrintProcessorDirectory(string pName, string pEnvironment, int Level, string pPrintProcessorInfo, int cdBuf, int pcbNeeded); - [DllImport( "winspool.drv", EntryPoint = "EnumPrintProcessorDatatypes", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumPrintProcessorDatatypes( string pName, string pPrintProcessorName, int Level, byte pDatatypes, int cdBuf, int pcbNeeded, int pcRetruned ); + [DllImport("winspool.drv", EntryPoint = "EnumPrintProcessorDatatypes", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumPrintProcessorDatatypes(string pName, string pPrintProcessorName, int Level, byte pDatatypes, int cdBuf, int pcbNeeded, int pcRetruned); - [DllImport( "winspool.drv", EntryPoint = "DeletePrintProcessor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeletePrintProcessor( string pName, string pEnvironment, string pPrintProcessorName ); + [DllImport("winspool.drv", EntryPoint = "DeletePrintProcessor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeletePrintProcessor(string pName, string pEnvironment, string pPrintProcessorName); - [DllImport( "winspool.drv", EntryPoint = "StartDocPrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int StartDocPrinter( IntPtr hPrinter, int Level, byte pDocInfo ); + [DllImport("winspool.drv", EntryPoint = "StartDocPrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int StartDocPrinter(IntPtr hPrinter, int Level, byte pDocInfo); - [DllImport( "winspool.drv", EntryPoint = "StartPagePrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int StartPagePrinter( IntPtr hPrinter ); + [DllImport("winspool.drv", EntryPoint = "StartPagePrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int StartPagePrinter(IntPtr hPrinter); - [DllImport( "winspool.drv", EntryPoint = "WritePrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WritePrinter( IntPtr hPrinter, object pBuf, int cdBuf, int pcWritten ); + [DllImport("winspool.drv", EntryPoint = "WritePrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WritePrinter(IntPtr hPrinter, object pBuf, int cdBuf, int pcWritten); - [DllImport( "winspool.drv", EntryPoint = "EndPagePrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EndPagePrinter( IntPtr hPrinter ); + [DllImport("winspool.drv", EntryPoint = "EndPagePrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EndPagePrinter(IntPtr hPrinter); - [DllImport( "winspool.drv", EntryPoint = "AbortPrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AbortPrinter( IntPtr hPrinter ); + [DllImport("winspool.drv", EntryPoint = "AbortPrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AbortPrinter(IntPtr hPrinter); - [DllImport( "winspool.drv", EntryPoint = "ReadPrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ReadPrinter( IntPtr hPrinter, object pBuf, int cdBuf, int pNoBytesRead ); + [DllImport("winspool.drv", EntryPoint = "ReadPrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ReadPrinter(IntPtr hPrinter, object pBuf, int cdBuf, int pNoBytesRead); - [DllImport( "winspool.drv", EntryPoint = "EndDocPrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EndDocPrinter( IntPtr hPrinter ); + [DllImport("winspool.drv", EntryPoint = "EndDocPrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EndDocPrinter(IntPtr hPrinter); - [DllImport( "winspool.drv", EntryPoint = "AddJob", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AddJob( IntPtr hPrinter, int Level, byte pData, int cdBuf, int pcbNeeded ); + [DllImport("winspool.drv", EntryPoint = "AddJob", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AddJob(IntPtr hPrinter, int Level, byte pData, int cdBuf, int pcbNeeded); - [DllImport( "winspool.drv", EntryPoint = "ScheduleJob", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ScheduleJob( IntPtr hPrinter, int JobId ); + [DllImport("winspool.drv", EntryPoint = "ScheduleJob", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ScheduleJob(IntPtr hPrinter, int JobId); - [DllImport( "winspool.drv", EntryPoint = "PrinterProperties", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PrinterProperties( IntPtr hWnd, IntPtr hPrinter ); + [DllImport("winspool.drv", EntryPoint = "PrinterProperties", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PrinterProperties(IntPtr hWnd, IntPtr hPrinter); - [DllImport( "winspool.drv", EntryPoint = "DocumentProperties", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DocumentProperties( IntPtr hWnd, IntPtr hPrinter, string pDeviceName, DEVMODE pDevModeOutput, DEVMODE pDevModeInput, int fMode ); + [DllImport("winspool.drv", EntryPoint = "DocumentProperties", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DocumentProperties(IntPtr hWnd, IntPtr hPrinter, string pDeviceName, DEVMODE pDevModeOutput, DEVMODE pDevModeInput, int fMode); - [DllImport( "winspool.drv", EntryPoint = "AdvancedDocumentProperties", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AdvancedDocumentProperties( IntPtr hWnd, IntPtr hPrinter, string pDeviceName, DEVMODE pDevModeOutput, DEVMODE pDevModeInput ); + [DllImport("winspool.drv", EntryPoint = "AdvancedDocumentProperties", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AdvancedDocumentProperties(IntPtr hWnd, IntPtr hPrinter, string pDeviceName, DEVMODE pDevModeOutput, DEVMODE pDevModeInput); - [DllImport( "winspool.drv", EntryPoint = "GetPrinterData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetPrinterData( IntPtr hPrinter, string pValueName, int pType, byte pData, int nSize, int pcbNeeded ); + [DllImport("winspool.drv", EntryPoint = "GetPrinterData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetPrinterData(IntPtr hPrinter, string pValueName, int pType, byte pData, int nSize, int pcbNeeded); - [DllImport( "winspool.drv", EntryPoint = "SetPrinterData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetPrinterData( IntPtr hPrinter, string pValueName, int dwType, byte pData, int cbData ); + [DllImport("winspool.drv", EntryPoint = "SetPrinterData", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetPrinterData(IntPtr hPrinter, string pValueName, int dwType, byte pData, int cbData); - [DllImport( "winspool.drv", EntryPoint = "WaitForPrinterChange", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WaitForPrinterChange( IntPtr hPrinter, int flags ); + [DllImport("winspool.drv", EntryPoint = "WaitForPrinterChange", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WaitForPrinterChange(IntPtr hPrinter, int flags); - public const int PRINTER_CHANGE_ADD_PRINTER = unchecked( (int)( 0x1 ) ); - public const int PRINTER_CHANGE_SET_PRINTER = unchecked( (int)( 0x2 ) ); - public const int PRINTER_CHANGE_DELETE_PRINTER = unchecked( (int)( 0x4 ) ); - public const int PRINTER_CHANGE_PRINTER = unchecked( (int)( 0xFF ) ); - public const int PRINTER_CHANGE_ADD_JOB = unchecked( (int)( 0x100 ) ); - public const int PRINTER_CHANGE_SET_JOB = unchecked( (int)( 0x200 ) ); - public const int PRINTER_CHANGE_DELETE_JOB = unchecked( (int)( 0x400 ) ); - public const int PRINTER_CHANGE_WRITE_JOB = unchecked( (int)( 0x800 ) ); - public const int PRINTER_CHANGE_JOB = unchecked( (int)( 0xFF00 ) ); - public const int PRINTER_CHANGE_ADD_FORM = unchecked( (int)( 0x10000 ) ); - public const int PRINTER_CHANGE_SET_FORM = unchecked( (int)( 0x20000 ) ); - public const int PRINTER_CHANGE_DELETE_FORM = unchecked( (int)( 0x40000 ) ); - public const int PRINTER_CHANGE_FORM = unchecked( (int)( 0x70000 ) ); - public const int PRINTER_CHANGE_ADD_PORT = unchecked( (int)( 0x100000 ) ); - public const int PRINTER_CHANGE_CONFIGURE_PORT = unchecked( (int)( 0x200000 ) ); - public const int PRINTER_CHANGE_DELETE_PORT = unchecked( (int)( 0x400000 ) ); - public const int PRINTER_CHANGE_PORT = unchecked( (int)( 0x700000 ) ); - public const int PRINTER_CHANGE_ADD_PRINT_PROCESSOR = unchecked( (int)( 0x1000000 ) ); - public const int PRINTER_CHANGE_DELETE_PRINT_PROCESSOR = unchecked( (int)( 0x4000000 ) ); - public const int PRINTER_CHANGE_PRINT_PROCESSOR = unchecked( (int)( 0x7000000 ) ); - public const int PRINTER_CHANGE_ADD_PRINTER_DRIVER = unchecked( (int)( 0x10000000 ) ); - public const int PRINTER_CHANGE_DELETE_PRINTER_DRIVER = unchecked( (int)( 0x40000000 ) ); - public const int PRINTER_CHANGE_PRINTER_DRIVER = unchecked( (int)( 0x70000000 ) ); - public const int PRINTER_CHANGE_TIMEOUT = unchecked( (int)( 0x80000000 ) ); - public const int PRINTER_CHANGE_ALL = unchecked( (int)( 0x7777FFFF ) ); + public const int PRINTER_CHANGE_ADD_PRINTER = unchecked((int)(0x1)); + public const int PRINTER_CHANGE_SET_PRINTER = unchecked((int)(0x2)); + public const int PRINTER_CHANGE_DELETE_PRINTER = unchecked((int)(0x4)); + public const int PRINTER_CHANGE_PRINTER = unchecked((int)(0xFF)); + public const int PRINTER_CHANGE_ADD_JOB = unchecked((int)(0x100)); + public const int PRINTER_CHANGE_SET_JOB = unchecked((int)(0x200)); + public const int PRINTER_CHANGE_DELETE_JOB = unchecked((int)(0x400)); + public const int PRINTER_CHANGE_WRITE_JOB = unchecked((int)(0x800)); + public const int PRINTER_CHANGE_JOB = unchecked((int)(0xFF00)); + public const int PRINTER_CHANGE_ADD_FORM = unchecked((int)(0x10000)); + public const int PRINTER_CHANGE_SET_FORM = unchecked((int)(0x20000)); + public const int PRINTER_CHANGE_DELETE_FORM = unchecked((int)(0x40000)); + public const int PRINTER_CHANGE_FORM = unchecked((int)(0x70000)); + public const int PRINTER_CHANGE_ADD_PORT = unchecked((int)(0x100000)); + public const int PRINTER_CHANGE_CONFIGURE_PORT = unchecked((int)(0x200000)); + public const int PRINTER_CHANGE_DELETE_PORT = unchecked((int)(0x400000)); + public const int PRINTER_CHANGE_PORT = unchecked((int)(0x700000)); + public const int PRINTER_CHANGE_ADD_PRINT_PROCESSOR = unchecked((int)(0x1000000)); + public const int PRINTER_CHANGE_DELETE_PRINT_PROCESSOR = unchecked((int)(0x4000000)); + public const int PRINTER_CHANGE_PRINT_PROCESSOR = unchecked((int)(0x7000000)); + public const int PRINTER_CHANGE_ADD_PRINTER_DRIVER = unchecked((int)(0x10000000)); + public const int PRINTER_CHANGE_DELETE_PRINTER_DRIVER = unchecked((int)(0x40000000)); + public const int PRINTER_CHANGE_PRINTER_DRIVER = unchecked((int)(0x70000000)); + public const int PRINTER_CHANGE_TIMEOUT = unchecked((int)(0x80000000)); + public const int PRINTER_CHANGE_ALL = unchecked((int)(0x7777FFFF)); - [DllImport( "winspool.drv", EntryPoint = "PrinterMessageBox", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PrinterMessageBox( IntPtr hPrinter, int error, IntPtr hWnd, string pText, string pCaption, int dwType ); + [DllImport("winspool.drv", EntryPoint = "PrinterMessageBox", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PrinterMessageBox(IntPtr hPrinter, int error, IntPtr hWnd, string pText, string pCaption, int dwType); - public const int PRINTER_ERROR_INFORMATION = unchecked( (int)( 0x80000000 ) ); - public const int PRINTER_ERROR_WARNING = unchecked( (int)( 0x40000000 ) ); - public const int PRINTER_ERROR_SEVERE = unchecked( (int)( 0x20000000 ) ); + public const int PRINTER_ERROR_INFORMATION = unchecked((int)(0x80000000)); + public const int PRINTER_ERROR_WARNING = unchecked((int)(0x40000000)); + public const int PRINTER_ERROR_SEVERE = unchecked((int)(0x20000000)); - public const int PRINTER_ERROR_OUTOFPAPER = unchecked( (int)( 0x1 ) ); - public const int PRINTER_ERROR_JAM = unchecked( (int)( 0x2 ) ); - public const int PRINTER_ERROR_OUTOFTONER = unchecked( (int)( 0x4 ) ); + public const int PRINTER_ERROR_OUTOFPAPER = unchecked((int)(0x1)); + public const int PRINTER_ERROR_JAM = unchecked((int)(0x2)); + public const int PRINTER_ERROR_OUTOFTONER = unchecked((int)(0x4)); - [DllImport( "winspool.drv", EntryPoint = "ClosePrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ClosePrinter( IntPtr hPrinter ); + [DllImport("winspool.drv", EntryPoint = "ClosePrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ClosePrinter(IntPtr hPrinter); - [DllImport( "winspool.drv", EntryPoint = "AddForm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AddForm( IntPtr hPrinter, int Level, byte pForm ); + [DllImport("winspool.drv", EntryPoint = "AddForm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AddForm(IntPtr hPrinter, int Level, byte pForm); - [DllImport( "winspool.drv", EntryPoint = "DeleteForm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeleteForm( IntPtr hPrinter, string pFormName ); + [DllImport("winspool.drv", EntryPoint = "DeleteForm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeleteForm(IntPtr hPrinter, string pFormName); - [DllImport( "winspool.drv", EntryPoint = "GetForm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetForm( IntPtr hPrinter, string pFormName, int Level, byte pForm, int cbBuf, int pcbNeeded ); + [DllImport("winspool.drv", EntryPoint = "GetForm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetForm(IntPtr hPrinter, string pFormName, int Level, byte pForm, int cbBuf, int pcbNeeded); - [DllImport( "winspool.drv", EntryPoint = "SetForm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetForm( IntPtr hPrinter, string pFormName, int Level, byte pForm ); + [DllImport("winspool.drv", EntryPoint = "SetForm", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetForm(IntPtr hPrinter, string pFormName, int Level, byte pForm); - [DllImport( "winspool.drv", EntryPoint = "EnumForms", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumForms( IntPtr hPrinter, int Level, byte pForm, int cbBuf, int pcbNeeded, int pcReturned ); + [DllImport("winspool.drv", EntryPoint = "EnumForms", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumForms(IntPtr hPrinter, int Level, byte pForm, int cbBuf, int pcbNeeded, int pcReturned); - [DllImport( "winspool.drv", EntryPoint = "EnumMonitors", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumMonitors( string pName, int Level, byte pMonitors, int cbBuf, int pcbNeeded, int pcReturned ); + [DllImport("winspool.drv", EntryPoint = "EnumMonitors", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumMonitors(string pName, int Level, byte pMonitors, int cbBuf, int pcbNeeded, int pcReturned); - [DllImport( "winspool.drv", EntryPoint = "AddMonitor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AddMonitor( string pName, int Level, byte pMonitors ); + [DllImport("winspool.drv", EntryPoint = "AddMonitor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AddMonitor(string pName, int Level, byte pMonitors); - [DllImport( "winspool.drv", EntryPoint = "DeleteMonitor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeleteMonitor( string pName, string pEnvironment, string pMonitorName ); + [DllImport("winspool.drv", EntryPoint = "DeleteMonitor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeleteMonitor(string pName, string pEnvironment, string pMonitorName); - [DllImport( "winspool.drv", EntryPoint = "EnumPorts", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumPorts( string pName, int Level, IntPtr lpbPorts, int cbBuf, int pcbNeeded, int pcReturned ); + [DllImport("winspool.drv", EntryPoint = "EnumPorts", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumPorts(string pName, int Level, IntPtr lpbPorts, int cbBuf, int pcbNeeded, int pcReturned); - [DllImport( "winspool.drv", EntryPoint = "AddPort", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AddPort( string pName, IntPtr hWnd, string pMonitorName ); + [DllImport("winspool.drv", EntryPoint = "AddPort", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AddPort(string pName, IntPtr hWnd, string pMonitorName); - [DllImport( "winspool.drv", EntryPoint = "ConfigurePort", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ConfigurePort( string pName, IntPtr hWnd, string pPortName ); + [DllImport("winspool.drv", EntryPoint = "ConfigurePort", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ConfigurePort(string pName, IntPtr hWnd, string pPortName); - [DllImport( "winspool.drv", EntryPoint = "DeletePort", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeletePort( string pName, IntPtr hWnd, string pPortName ); + [DllImport("winspool.drv", EntryPoint = "DeletePort", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeletePort(string pName, IntPtr hWnd, string pPortName); - [DllImport( "winspool.drv", EntryPoint = "AddPrinterConnection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AddPrinterConnection( string pName ); + [DllImport("winspool.drv", EntryPoint = "AddPrinterConnection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AddPrinterConnection(string pName); - [DllImport( "winspool.drv", EntryPoint = "DeletePrinterConnection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeletePrinterConnection( string pName ); + [DllImport("winspool.drv", EntryPoint = "DeletePrinterConnection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeletePrinterConnection(string pName); - [DllImport( "winspool.drv", EntryPoint = "ConnectToPrinterDlg", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ConnectToPrinterDlg( IntPtr hWnd, int flags ); + [DllImport("winspool.drv", EntryPoint = "ConnectToPrinterDlg", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ConnectToPrinterDlg(IntPtr hWnd, int flags); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PROVIDOR_INFO_1 { public string pName; @@ -16108,64 +16108,64 @@ public struct PROVIDOR_INFO_1 } - [DllImport( "winspool.drv", EntryPoint = "AddPrintProvidor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AddPrintProvidor( string pName, int Level, byte pProvidorInfo ); + [DllImport("winspool.drv", EntryPoint = "AddPrintProvidor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AddPrintProvidor(string pName, int Level, byte pProvidorInfo); - [DllImport( "winspool.drv", EntryPoint = "DeletePrintProvidor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeletePrintProvidor( string pName, string pEnvironment, string pPrintProvidorName ); + [DllImport("winspool.drv", EntryPoint = "DeletePrintProvidor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeletePrintProvidor(string pName, string pEnvironment, string pPrintProvidorName); - public const int SERVER_ACCESS_ADMINISTER = unchecked( (int)( 0x1 ) ); - public const int SERVER_ACCESS_ENUMERATE = unchecked( (int)( 0x2 ) ); + public const int SERVER_ACCESS_ADMINISTER = unchecked((int)(0x1)); + public const int SERVER_ACCESS_ENUMERATE = unchecked((int)(0x2)); - public const int PRINTER_ACCESS_ADMINISTER = unchecked( (int)( 0x4 ) ); - public const int PRINTER_ACCESS_USE = unchecked( (int)( 0x8 ) ); + public const int PRINTER_ACCESS_ADMINISTER = unchecked((int)(0x4)); + public const int PRINTER_ACCESS_USE = unchecked((int)(0x8)); - public const int JOB_ACCESS_ADMINISTER = unchecked( (int)( 0x10 ) ); + public const int JOB_ACCESS_ADMINISTER = unchecked((int)(0x10)); // Access rights for print servers - public const int SERVER_ALL_ACCESS = unchecked( (int)( ( STANDARD_RIGHTS_REQUIRED | SERVER_ACCESS_ADMINISTER | SERVER_ACCESS_ENUMERATE ) ) ); - public const int SERVER_READ = unchecked( (int)( ( STANDARD_RIGHTS_READ | SERVER_ACCESS_ENUMERATE ) ) ); - public const int SERVER_WRITE = unchecked( (int)( ( STANDARD_RIGHTS_WRITE | SERVER_ACCESS_ADMINISTER | SERVER_ACCESS_ENUMERATE ) ) ); - public const int SERVER_EXECUTE = unchecked( (int)( ( STANDARD_RIGHTS_EXECUTE | SERVER_ACCESS_ENUMERATE ) ) ); + public const int SERVER_ALL_ACCESS = unchecked((int)((STANDARD_RIGHTS_REQUIRED | SERVER_ACCESS_ADMINISTER | SERVER_ACCESS_ENUMERATE))); + public const int SERVER_READ = unchecked((int)((STANDARD_RIGHTS_READ | SERVER_ACCESS_ENUMERATE))); + public const int SERVER_WRITE = unchecked((int)((STANDARD_RIGHTS_WRITE | SERVER_ACCESS_ADMINISTER | SERVER_ACCESS_ENUMERATE))); + public const int SERVER_EXECUTE = unchecked((int)((STANDARD_RIGHTS_EXECUTE | SERVER_ACCESS_ENUMERATE))); // Access rights for printers - public const int PRINTER_ALL_ACCESS = unchecked( (int)( ( STANDARD_RIGHTS_REQUIRED | PRINTER_ACCESS_ADMINISTER | PRINTER_ACCESS_USE ) ) ); - public const int PRINTER_READ = unchecked( (int)( ( STANDARD_RIGHTS_READ | PRINTER_ACCESS_USE ) ) ); - public const int PRINTER_WRITE = unchecked( (int)( ( STANDARD_RIGHTS_WRITE | PRINTER_ACCESS_USE ) ) ); - public const int PRINTER_EXECUTE = unchecked( (int)( ( STANDARD_RIGHTS_EXECUTE | PRINTER_ACCESS_USE ) ) ); + public const int PRINTER_ALL_ACCESS = unchecked((int)((STANDARD_RIGHTS_REQUIRED | PRINTER_ACCESS_ADMINISTER | PRINTER_ACCESS_USE))); + public const int PRINTER_READ = unchecked((int)((STANDARD_RIGHTS_READ | PRINTER_ACCESS_USE))); + public const int PRINTER_WRITE = unchecked((int)((STANDARD_RIGHTS_WRITE | PRINTER_ACCESS_USE))); + public const int PRINTER_EXECUTE = unchecked((int)((STANDARD_RIGHTS_EXECUTE | PRINTER_ACCESS_USE))); // Access rights for jobs - public const int JOB_ALL_ACCESS = unchecked( (int)( ( STANDARD_RIGHTS_REQUIRED | JOB_ACCESS_ADMINISTER ) ) ); - public const int JOB_READ = unchecked( (int)( ( STANDARD_RIGHTS_READ | JOB_ACCESS_ADMINISTER ) ) ); - public const int JOB_WRITE = unchecked( (int)( ( STANDARD_RIGHTS_WRITE | JOB_ACCESS_ADMINISTER ) ) ); - public const int JOB_EXECUTE = unchecked( (int)( ( STANDARD_RIGHTS_EXECUTE | JOB_ACCESS_ADMINISTER ) ) ); + public const int JOB_ALL_ACCESS = unchecked((int)((STANDARD_RIGHTS_REQUIRED | JOB_ACCESS_ADMINISTER))); + public const int JOB_READ = unchecked((int)((STANDARD_RIGHTS_READ | JOB_ACCESS_ADMINISTER))); + public const int JOB_WRITE = unchecked((int)((STANDARD_RIGHTS_WRITE | JOB_ACCESS_ADMINISTER))); + public const int JOB_EXECUTE = unchecked((int)((STANDARD_RIGHTS_EXECUTE | JOB_ACCESS_ADMINISTER))); // Windows Network support // RESOURCE ENUMERATION - public const int RESOURCE_CONNECTED = unchecked( (int)( 0x1 ) ); - public const int RESOURCE_PUBLICNET = unchecked( (int)( 0x2 ) ); - public const int RESOURCE_REMEMBERED = unchecked( (int)( 0x3 ) ); + public const int RESOURCE_CONNECTED = unchecked((int)(0x1)); + public const int RESOURCE_PUBLICNET = unchecked((int)(0x2)); + public const int RESOURCE_REMEMBERED = unchecked((int)(0x3)); - public const int RESOURCETYPE_ANY = unchecked( (int)( 0x0 ) ); - public const int RESOURCETYPE_DISK = unchecked( (int)( 0x1 ) ); - public const int RESOURCETYPE_PRINT = unchecked( (int)( 0x2 ) ); - public const int RESOURCETYPE_UNKNOWN = unchecked( (int)( 0xFFFF ) ); + public const int RESOURCETYPE_ANY = unchecked((int)(0x0)); + public const int RESOURCETYPE_DISK = unchecked((int)(0x1)); + public const int RESOURCETYPE_PRINT = unchecked((int)(0x2)); + public const int RESOURCETYPE_UNKNOWN = unchecked((int)(0xFFFF)); - public const int RESOURCEUSAGE_CONNECTABLE = unchecked( (int)( 0x1 ) ); - public const int RESOURCEUSAGE_CONTAINER = unchecked( (int)( 0x2 ) ); - public const int RESOURCEUSAGE_RESERVED = unchecked( (int)( 0x80000000 ) ); + public const int RESOURCEUSAGE_CONNECTABLE = unchecked((int)(0x1)); + public const int RESOURCEUSAGE_CONTAINER = unchecked((int)(0x2)); + public const int RESOURCEUSAGE_RESERVED = unchecked((int)(0x80000000)); - public const int RESOURCEDISPLAYTYPE_GENERIC = unchecked( (int)( 0x0 ) ); - public const int RESOURCEDISPLAYTYPE_DOMAIN = unchecked( (int)( 0x1 ) ); - public const int RESOURCEDISPLAYTYPE_SERVER = unchecked( (int)( 0x2 ) ); - public const int RESOURCEDISPLAYTYPE_SHARE = unchecked( (int)( 0x3 ) ); - public const int RESOURCEDISPLAYTYPE_FILE = unchecked( (int)( 0x4 ) ); - public const int RESOURCEDISPLAYTYPE_GROUP = unchecked( (int)( 0x5 ) ); + public const int RESOURCEDISPLAYTYPE_GENERIC = unchecked((int)(0x0)); + public const int RESOURCEDISPLAYTYPE_DOMAIN = unchecked((int)(0x1)); + public const int RESOURCEDISPLAYTYPE_SERVER = unchecked((int)(0x2)); + public const int RESOURCEDISPLAYTYPE_SHARE = unchecked((int)(0x3)); + public const int RESOURCEDISPLAYTYPE_FILE = unchecked((int)(0x4)); + public const int RESOURCEDISPLAYTYPE_GROUP = unchecked((int)(0x5)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct NETRESOURCE { public int dwScope; @@ -16178,46 +16178,46 @@ public struct NETRESOURCE public string lpProvider; } - public const int CONNECT_UPDATE_PROFILE = unchecked( (int)( 0x1 ) ); + public const int CONNECT_UPDATE_PROFILE = unchecked((int)(0x1)); - [DllImport( "mpr.dll", EntryPoint = "WNetAddConnection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WNetAddConnection( string lpszNetPath, string lpszPassword, string lpszLocalName ); + [DllImport("mpr.dll", EntryPoint = "WNetAddConnection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WNetAddConnection(string lpszNetPath, string lpszPassword, string lpszLocalName); - [DllImport( "mpr.dll", EntryPoint = "WNetAddConnection2", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WNetAddConnection2( ref NETRESOURCE lpNetResource, string lpPassword, string lpUserName, int dwFlags ); + [DllImport("mpr.dll", EntryPoint = "WNetAddConnection2", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WNetAddConnection2(ref NETRESOURCE lpNetResource, string lpPassword, string lpUserName, int dwFlags); - [DllImport( "mpr.dll", EntryPoint = "WNetCancelConnection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WNetCancelConnection( string lpszName, int bForce ); + [DllImport("mpr.dll", EntryPoint = "WNetCancelConnection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WNetCancelConnection(string lpszName, int bForce); - [DllImport( "mpr.dll", EntryPoint = "WNetCancelConnection2", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WNetCancelConnection2( string lpName, int dwFlags, int fForce ); + [DllImport("mpr.dll", EntryPoint = "WNetCancelConnection2", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WNetCancelConnection2(string lpName, int dwFlags, int fForce); - [DllImport( "mpr.dll", EntryPoint = "WNetGetConnection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WNetGetConnection( string lpszLocalName, string lpszRemoteName, int cbRemoteName ); + [DllImport("mpr.dll", EntryPoint = "WNetGetConnection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WNetGetConnection(string lpszLocalName, string lpszRemoteName, int cbRemoteName); - [DllImport( "mpr.dll", EntryPoint = "WNetOpenEnum", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WNetOpenEnum( int dwScope, int dwType, int dwUsage, ref NETRESOURCE lpNetResource, IntPtr lphEnum ); + [DllImport("mpr.dll", EntryPoint = "WNetOpenEnum", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WNetOpenEnum(int dwScope, int dwType, int dwUsage, ref NETRESOURCE lpNetResource, IntPtr lphEnum); - [DllImport( "mpr.dll", EntryPoint = "WNetEnumResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WNetEnumResource( IntPtr hEnum, IntPtr lpcCount, IntPtr lpBuffer, IntPtr lpBufferSize ); + [DllImport("mpr.dll", EntryPoint = "WNetEnumResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WNetEnumResource(IntPtr hEnum, IntPtr lpcCount, IntPtr lpBuffer, IntPtr lpBufferSize); - [DllImport( "mpr.dll", EntryPoint = "WNetCloseEnum", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WNetCloseEnum( IntPtr hEnum ); + [DllImport("mpr.dll", EntryPoint = "WNetCloseEnum", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WNetCloseEnum(IntPtr hEnum); - [DllImport( "mpr.dll", EntryPoint = "WNetGetUser", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WNetGetUser( string lpName, string lpUserName, IntPtr lpnLength ); + [DllImport("mpr.dll", EntryPoint = "WNetGetUser", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WNetGetUser(string lpName, string lpUserName, IntPtr lpnLength); - [DllImport( "mpr.dll", EntryPoint = "WNetConnectionDialog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WNetConnectionDialog( IntPtr hWnd, int dwType ); + [DllImport("mpr.dll", EntryPoint = "WNetConnectionDialog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WNetConnectionDialog(IntPtr hWnd, int dwType); - [DllImport( "mpr.dll", EntryPoint = "WNetDisconnectDialog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WNetDisconnectDialog( IntPtr hWnd, int dwType ); + [DllImport("mpr.dll", EntryPoint = "WNetDisconnectDialog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WNetDisconnectDialog(IntPtr hWnd, int dwType); - [DllImport( "mpr.dll", EntryPoint = "WNetGetLastError", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WNetGetLastError( IntPtr lpError, string lpErrorBuf, int nErrorBufSize, string lpNameBuf, int nNameBufSize ); + [DllImport("mpr.dll", EntryPoint = "WNetGetLastError", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WNetGetLastError(IntPtr lpError, string lpErrorBuf, int nErrorBufSize, string lpNameBuf, int nNameBufSize); // Status Codes @@ -16227,51 +16227,51 @@ public struct NETRESOURCE // General - public const int WN_SUCCESS = unchecked( (int)( NO_ERROR ) ); - public const int WN_NOT_SUPPORTED = unchecked( (int)( ERROR_NOT_SUPPORTED ) ); - public const int WN_NET_ERROR = unchecked( (int)( ERROR_UNEXP_NET_ERR ) ); - public const int WN_MORE_DATA = unchecked( (int)( ERROR_MORE_DATA ) ); - public const int WN_BAD_POINTER = unchecked( (int)( ERROR_INVALID_ADDRESS ) ); - public const int WN_BAD_VALUE = unchecked( (int)( ERROR_INVALID_PARAMETER ) ); - public const int WN_BAD_PASSWORD = unchecked( (int)( ERROR_INVALID_PASSWORD ) ); - public const int WN_ACCESS_DENIED = unchecked( (int)( ERROR_ACCESS_DENIED ) ); - public const int WN_FUNCTION_BUSY = unchecked( (int)( ERROR_BUSY ) ); - public const int WN_WINDOWS_ERROR = unchecked( (int)( ERROR_UNEXP_NET_ERR ) ); - public const int WN_BAD_USER = unchecked( (int)( ERROR_BAD_USERNAME ) ); - public const int WN_OUT_OF_MEMORY = unchecked( (int)( ERROR_NOT_ENOUGH_MEMORY ) ); - public const int WN_NO_NETWORK = unchecked( (int)( ERROR_NO_NETWORK ) ); - public const int WN_EXTENDED_ERROR = unchecked( (int)( ERROR_EXTENDED_ERROR ) ); + public const int WN_SUCCESS = unchecked((int)(NO_ERROR)); + public const int WN_NOT_SUPPORTED = unchecked((int)(ERROR_NOT_SUPPORTED)); + public const int WN_NET_ERROR = unchecked((int)(ERROR_UNEXP_NET_ERR)); + public const int WN_MORE_DATA = unchecked((int)(ERROR_MORE_DATA)); + public const int WN_BAD_POINTER = unchecked((int)(ERROR_INVALID_ADDRESS)); + public const int WN_BAD_VALUE = unchecked((int)(ERROR_INVALID_PARAMETER)); + public const int WN_BAD_PASSWORD = unchecked((int)(ERROR_INVALID_PASSWORD)); + public const int WN_ACCESS_DENIED = unchecked((int)(ERROR_ACCESS_DENIED)); + public const int WN_FUNCTION_BUSY = unchecked((int)(ERROR_BUSY)); + public const int WN_WINDOWS_ERROR = unchecked((int)(ERROR_UNEXP_NET_ERR)); + public const int WN_BAD_USER = unchecked((int)(ERROR_BAD_USERNAME)); + public const int WN_OUT_OF_MEMORY = unchecked((int)(ERROR_NOT_ENOUGH_MEMORY)); + public const int WN_NO_NETWORK = unchecked((int)(ERROR_NO_NETWORK)); + public const int WN_EXTENDED_ERROR = unchecked((int)(ERROR_EXTENDED_ERROR)); // Connection - public const int WN_NOT_CONNECTED = unchecked( (int)( ERROR_NOT_CONNECTED ) ); - public const int WN_OPEN_FILES = unchecked( (int)( ERROR_OPEN_FILES ) ); - public const int WN_DEVICE_IN_USE = unchecked( (int)( ERROR_DEVICE_IN_USE ) ); - public const int WN_BAD_NETNAME = unchecked( (int)( ERROR_BAD_NET_NAME ) ); - public const int WN_BAD_LOCALNAME = unchecked( (int)( ERROR_BAD_DEVICE ) ); - public const int WN_ALREADY_CONNECTED = unchecked( (int)( ERROR_ALREADY_ASSIGNED ) ); - public const int WN_DEVICE_ERROR = unchecked( (int)( ERROR_GEN_FAILURE ) ); - public const int WN_CONNECTION_CLOSED = unchecked( (int)( ERROR_CONNECTION_UNAVAIL ) ); - public const int WN_NO_NET_OR_BAD_PATH = unchecked( (int)( ERROR_NO_NET_OR_BAD_PATH ) ); - public const int WN_BAD_PROVIDER = unchecked( (int)( ERROR_BAD_PROVIDER ) ); - public const int WN_CANNOT_OPEN_PROFILE = unchecked( (int)( ERROR_CANNOT_OPEN_PROFILE ) ); - public const int WN_BAD_PROFILE = unchecked( (int)( ERROR_BAD_PROFILE ) ); + public const int WN_NOT_CONNECTED = unchecked((int)(ERROR_NOT_CONNECTED)); + public const int WN_OPEN_FILES = unchecked((int)(ERROR_OPEN_FILES)); + public const int WN_DEVICE_IN_USE = unchecked((int)(ERROR_DEVICE_IN_USE)); + public const int WN_BAD_NETNAME = unchecked((int)(ERROR_BAD_NET_NAME)); + public const int WN_BAD_LOCALNAME = unchecked((int)(ERROR_BAD_DEVICE)); + public const int WN_ALREADY_CONNECTED = unchecked((int)(ERROR_ALREADY_ASSIGNED)); + public const int WN_DEVICE_ERROR = unchecked((int)(ERROR_GEN_FAILURE)); + public const int WN_CONNECTION_CLOSED = unchecked((int)(ERROR_CONNECTION_UNAVAIL)); + public const int WN_NO_NET_OR_BAD_PATH = unchecked((int)(ERROR_NO_NET_OR_BAD_PATH)); + public const int WN_BAD_PROVIDER = unchecked((int)(ERROR_BAD_PROVIDER)); + public const int WN_CANNOT_OPEN_PROFILE = unchecked((int)(ERROR_CANNOT_OPEN_PROFILE)); + public const int WN_BAD_PROFILE = unchecked((int)(ERROR_BAD_PROFILE)); // Enumeration - public const int WN_BAD_HANDLE = unchecked( (int)( ERROR_INVALID_HANDLE ) ); - public const int WN_NO_MORE_ENTRIES = unchecked( (int)( ERROR_NO_MORE_ITEMS ) ); - public const int WN_NOT_CONTAINER = unchecked( (int)( ERROR_NOT_CONTAINER ) ); + public const int WN_BAD_HANDLE = unchecked((int)(ERROR_INVALID_HANDLE)); + public const int WN_NO_MORE_ENTRIES = unchecked((int)(ERROR_NO_MORE_ITEMS)); + public const int WN_NOT_CONTAINER = unchecked((int)(ERROR_NOT_CONTAINER)); - public const int WN_NO_ERROR = unchecked( (int)( NO_ERROR ) ); + public const int WN_NO_ERROR = unchecked((int)(NO_ERROR)); // This section contains the definitions // for portable NetBIOS 3.0 support. - public const int NCBNAMSZ = unchecked( (int)( 16 ) );// absolute length of a net name - public const int MAX_LANA = unchecked( (int)( 254 ) );// lana's in range 0 to MAX_LANA + public const int NCBNAMSZ = unchecked((int)(16));// absolute length of a net name + public const int MAX_LANA = unchecked((int)(254));// lana's in range 0 to MAX_LANA - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct NCB { public int ncb_command; @@ -16280,9 +16280,9 @@ public struct NCB public int ncb_num; public string ncb_buffer; public int ncb_length; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = NCBNAMSZ )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = NCBNAMSZ)] public string ncb_callname; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = NCBNAMSZ )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = NCBNAMSZ)] public string ncb_name; public int ncb_rto; public int ncb_sto; @@ -16293,10 +16293,10 @@ public struct NCB public int ncb_event; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ADAPTER_STATUS { - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = 6 )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 6)] public string adapter_address; public int rev_major; public int reserved0; @@ -16326,10 +16326,10 @@ public struct ADAPTER_STATUS public int name_count; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct NAME_BUFFER { - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = NCBNAMSZ )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = NCBNAMSZ)] public string name; public int name_num; public int name_flags; @@ -16337,18 +16337,18 @@ public struct NAME_BUFFER // values for name_flags bits. - public const int NAME_FLAGS_MASK = unchecked( (int)( 0x87 ) ); + public const int NAME_FLAGS_MASK = unchecked((int)(0x87)); - public const int GROUP_NAME = unchecked( (int)( 0x80 ) ); - public const int UNIQUE_NAME = unchecked( (int)( 0x0 ) ); + public const int GROUP_NAME = unchecked((int)(0x80)); + public const int UNIQUE_NAME = unchecked((int)(0x0)); - public const int REGISTERING = unchecked( (int)( 0x0 ) ); - public const int REGISTERED = unchecked( (int)( 0x4 ) ); - public const int DEREGISTERED = unchecked( (int)( 0x5 ) ); - public const int DUPLICATE = unchecked( (int)( 0x6 ) ); - public const int DUPLICATE_DEREG = unchecked( (int)( 0x7 ) ); + public const int REGISTERING = unchecked((int)(0x0)); + public const int REGISTERED = unchecked((int)(0x4)); + public const int DEREGISTERED = unchecked((int)(0x5)); + public const int DUPLICATE = unchecked((int)(0x6)); + public const int DUPLICATE_DEREG = unchecked((int)(0x7)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SESSION_HEADER { public int sess_name; @@ -16357,35 +16357,35 @@ public struct SESSION_HEADER public int rcv_any_outstanding; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SESSION_BUFFER { public int lsn; public int State; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = NCBNAMSZ )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = NCBNAMSZ)] public string local_name; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = NCBNAMSZ )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = NCBNAMSZ)] public string remote_name; public int rcvs_outstanding; public int sends_outstanding; } // Values for state - public const int LISTEN_OUTSTANDING = unchecked( (int)( 0x1 ) ); - public const int CALL_PENDING = unchecked( (int)( 0x2 ) ); - public const int SESSION_ESTABLISHED = unchecked( (int)( 0x3 ) ); - public const int HANGUP_PENDING = unchecked( (int)( 0x4 ) ); - public const int HANGUP_COMPLETE = unchecked( (int)( 0x5 ) ); - public const int SESSION_ABORTED = unchecked( (int)( 0x6 ) ); - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int LISTEN_OUTSTANDING = unchecked((int)(0x1)); + public const int CALL_PENDING = unchecked((int)(0x2)); + public const int SESSION_ESTABLISHED = unchecked((int)(0x3)); + public const int HANGUP_PENDING = unchecked((int)(0x4)); + public const int HANGUP_COMPLETE = unchecked((int)(0x5)); + public const int SESSION_ABORTED = unchecked((int)(0x6)); + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct LANA_ENUM { public int Length; public int lana; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct FIND_NAME_HEADER { public int node_count; @@ -16393,7 +16393,7 @@ public struct FIND_NAME_HEADER public int unique_group; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct FIND_NAME_BUFFER { public int Length; @@ -16404,7 +16404,7 @@ public struct FIND_NAME_BUFFER public int routing_info; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ACTION_HEADER { public int transport_id; @@ -16413,144 +16413,144 @@ public struct ACTION_HEADER } // Values for transport_id - public const string ALL_TRANSPORTS = unchecked( (string)( "M\0\0\0" ) ); - public const string MS_NBF = unchecked( (string)( "MNBF" ) ); + public const string ALL_TRANSPORTS = unchecked((string)("M\0\0\0")); + public const string MS_NBF = unchecked((string)("MNBF")); // NCB Command codes - public const int NCBCALL = unchecked( (int)( 0x10 ) );// NCB CALL - public const int NCBLISTEN = unchecked( (int)( 0x11 ) );// NCB LISTEN - public const int NCBHANGUP = unchecked( (int)( 0x12 ) );// NCB HANG UP - public const int NCBSEND = unchecked( (int)( 0x14 ) );// NCB SEND - public const int NCBRECV = unchecked( (int)( 0x15 ) );// NCB RECEIVE - public const int NCBRECVANY = unchecked( (int)( 0x16 ) );// NCB RECEIVE ANY - public const int NCBCHAINSEND = unchecked( (int)( 0x17 ) );// NCB CHAIN SEND - public const int NCBDGSEND = unchecked( (int)( 0x20 ) );// NCB SEND DATAGRAM - public const int NCBDGRECV = unchecked( (int)( 0x21 ) );// NCB RECEIVE DATAGRAM - public const int NCBDGSENDBC = unchecked( (int)( 0x22 ) );// NCB SEND BROADCAST DATAGRAM - public const int NCBDGRECVBC = unchecked( (int)( 0x23 ) );// NCB RECEIVE BROADCAST DATAGRAM - public const int NCBADDNAME = unchecked( (int)( 0x30 ) );// NCB ADD NAME - public const int NCBDELNAME = unchecked( (int)( 0x31 ) );// NCB DELETE NAME - public const int NCBRESET = unchecked( (int)( 0x32 ) );// NCB RESET - public const int NCBASTAT = unchecked( (int)( 0x33 ) );// NCB ADAPTER STATUS - public const int NCBSSTAT = unchecked( (int)( 0x34 ) );// NCB SESSION STATUS - public const int NCBCANCEL = unchecked( (int)( 0x35 ) );// NCB CANCEL - public const int NCBADDGRNAME = unchecked( (int)( 0x36 ) );// NCB ADD GROUP NAME - public const int NCBENUM = unchecked( (int)( 0x37 ) );// NCB ENUMERATE LANA NUMBERS - public const int NCBUNLINK = unchecked( (int)( 0x70 ) );// NCB UNLINK - public const int NCBSENDNA = unchecked( (int)( 0x71 ) );// NCB SEND NO ACK - public const int NCBCHAINSENDNA = unchecked( (int)( 0x72 ) );// NCB CHAIN SEND NO ACK - public const int NCBLANSTALERT = unchecked( (int)( 0x73 ) );// NCB LAN STATUS ALERT - public const int NCBACTION = unchecked( (int)( 0x77 ) );// NCB ACTION - public const int NCBFINDNAME = unchecked( (int)( 0x78 ) );// NCB FIND NAME - public const int NCBTRACE = unchecked( (int)( 0x79 ) );// NCB TRACE - - public const int ASYNCH = unchecked( (int)( 0x80 ) );// high bit set == asynchronous + public const int NCBCALL = unchecked((int)(0x10));// NCB CALL + public const int NCBLISTEN = unchecked((int)(0x11));// NCB LISTEN + public const int NCBHANGUP = unchecked((int)(0x12));// NCB HANG UP + public const int NCBSEND = unchecked((int)(0x14));// NCB SEND + public const int NCBRECV = unchecked((int)(0x15));// NCB RECEIVE + public const int NCBRECVANY = unchecked((int)(0x16));// NCB RECEIVE ANY + public const int NCBCHAINSEND = unchecked((int)(0x17));// NCB CHAIN SEND + public const int NCBDGSEND = unchecked((int)(0x20));// NCB SEND DATAGRAM + public const int NCBDGRECV = unchecked((int)(0x21));// NCB RECEIVE DATAGRAM + public const int NCBDGSENDBC = unchecked((int)(0x22));// NCB SEND BROADCAST DATAGRAM + public const int NCBDGRECVBC = unchecked((int)(0x23));// NCB RECEIVE BROADCAST DATAGRAM + public const int NCBADDNAME = unchecked((int)(0x30));// NCB ADD NAME + public const int NCBDELNAME = unchecked((int)(0x31));// NCB DELETE NAME + public const int NCBRESET = unchecked((int)(0x32));// NCB RESET + public const int NCBASTAT = unchecked((int)(0x33));// NCB ADAPTER STATUS + public const int NCBSSTAT = unchecked((int)(0x34));// NCB SESSION STATUS + public const int NCBCANCEL = unchecked((int)(0x35));// NCB CANCEL + public const int NCBADDGRNAME = unchecked((int)(0x36));// NCB ADD GROUP NAME + public const int NCBENUM = unchecked((int)(0x37));// NCB ENUMERATE LANA NUMBERS + public const int NCBUNLINK = unchecked((int)(0x70));// NCB UNLINK + public const int NCBSENDNA = unchecked((int)(0x71));// NCB SEND NO ACK + public const int NCBCHAINSENDNA = unchecked((int)(0x72));// NCB CHAIN SEND NO ACK + public const int NCBLANSTALERT = unchecked((int)(0x73));// NCB LAN STATUS ALERT + public const int NCBACTION = unchecked((int)(0x77));// NCB ACTION + public const int NCBFINDNAME = unchecked((int)(0x78));// NCB FIND NAME + public const int NCBTRACE = unchecked((int)(0x79));// NCB TRACE + + public const int ASYNCH = unchecked((int)(0x80));// high bit set == asynchronous // NCB Return codes - public const int NRC_GOODRET = unchecked( (int)( 0x0 ) );// good return + public const int NRC_GOODRET = unchecked((int)(0x0));// good return // also returned when ASYNCH request accepted - public const int NRC_BUFLEN = unchecked( (int)( 0x1 ) );// illegal buffer length - public const int NRC_ILLCMD = unchecked( (int)( 0x3 ) );// illegal command - public const int NRC_CMDTMO = unchecked( (int)( 0x5 ) );// command timed out - public const int NRC_INCOMP = unchecked( (int)( 0x6 ) );// message incomplete, issue another command - public const int NRC_BADDR = unchecked( (int)( 0x7 ) );// illegal buffer address - public const int NRC_SNUMOUT = unchecked( (int)( 0x8 ) );// session number out of range - public const int NRC_NORES = unchecked( (int)( 0x9 ) );// no resource available - public const int NRC_SCLOSED = unchecked( (int)( 0xA ) );// session closed - public const int NRC_CMDCAN = unchecked( (int)( 0xB ) );// command cancelled - public const int NRC_DUPNAME = unchecked( (int)( 0xD ) );// duplicate name - public const int NRC_NAMTFUL = unchecked( (int)( 0xE ) );// name table full - public const int NRC_ACTSES = unchecked( (int)( 0xF ) );// no deletions, name has active sessions - public const int NRC_LOCTFUL = unchecked( (int)( 0x11 ) );// local session table full - public const int NRC_REMTFUL = unchecked( (int)( 0x12 ) );// remote session table full - public const int NRC_ILLNN = unchecked( (int)( 0x13 ) );// illegal name number - public const int NRC_NOCALL = unchecked( (int)( 0x14 ) );// no callname - public const int NRC_NOWILD = unchecked( (int)( 0x15 ) );// cannot put in NCB_NAME - public const int NRC_INUSE = unchecked( (int)( 0x16 ) );// name in use on remote adapter - public const int NRC_NAMERR = unchecked( (int)( 0x17 ) );// name deleted - public const int NRC_SABORT = unchecked( (int)( 0x18 ) );// session ended abnormally - public const int NRC_NAMCONF = unchecked( (int)( 0x19 ) );// name conflict detected - public const int NRC_IFBUSY = unchecked( (int)( 0x21 ) );// interface busy, IRET before retrying - public const int NRC_TOOMANY = unchecked( (int)( 0x22 ) );// too many commands outstanding, retry later - public const int NRC_BRIDGE = unchecked( (int)( 0x23 ) );// ncb_lana_num field invalid - public const int NRC_CANOCCR = unchecked( (int)( 0x24 ) );// command completed while cancel occurring - public const int NRC_CANCEL = unchecked( (int)( 0x26 ) );// command not valid to cancel - public const int NRC_DUPENV = unchecked( (int)( 0x30 ) );// name defined by anther local process - public const int NRC_ENVNOTDEF = unchecked( (int)( 0x34 ) );// environment undefined. RESET required - public const int NRC_OSRESNOTAV = unchecked( (int)( 0x35 ) );// required OS resources exhausted - public const int NRC_MAXAPPS = unchecked( (int)( 0x36 ) );// max number of applications exceeded - public const int NRC_NOSAPS = unchecked( (int)( 0x37 ) );// no saps available for netbios - public const int NRC_NORESOURCES = unchecked( (int)( 0x38 ) );// requested resources are not available - public const int NRC_INVADDRESS = unchecked( (int)( 0x39 ) );// invalid ncb address or length > segment - public const int NRC_INVDDID = unchecked( (int)( 0x3B ) );// invalid NCB DDID - public const int NRC_LOCKFAIL = unchecked( (int)( 0x3C ) );// lock of user area failed - public const int NRC_OPENERR = unchecked( (int)( 0x3F ) );// NETBIOS not loaded - public const int NRC_SYSTEM = unchecked( (int)( 0x40 ) );// system error - - public const int NRC_PENDING = unchecked( (int)( 0xFF ) );// asynchronous command is not yet finished + public const int NRC_BUFLEN = unchecked((int)(0x1));// illegal buffer length + public const int NRC_ILLCMD = unchecked((int)(0x3));// illegal command + public const int NRC_CMDTMO = unchecked((int)(0x5));// command timed out + public const int NRC_INCOMP = unchecked((int)(0x6));// message incomplete, issue another command + public const int NRC_BADDR = unchecked((int)(0x7));// illegal buffer address + public const int NRC_SNUMOUT = unchecked((int)(0x8));// session number out of range + public const int NRC_NORES = unchecked((int)(0x9));// no resource available + public const int NRC_SCLOSED = unchecked((int)(0xA));// session closed + public const int NRC_CMDCAN = unchecked((int)(0xB));// command cancelled + public const int NRC_DUPNAME = unchecked((int)(0xD));// duplicate name + public const int NRC_NAMTFUL = unchecked((int)(0xE));// name table full + public const int NRC_ACTSES = unchecked((int)(0xF));// no deletions, name has active sessions + public const int NRC_LOCTFUL = unchecked((int)(0x11));// local session table full + public const int NRC_REMTFUL = unchecked((int)(0x12));// remote session table full + public const int NRC_ILLNN = unchecked((int)(0x13));// illegal name number + public const int NRC_NOCALL = unchecked((int)(0x14));// no callname + public const int NRC_NOWILD = unchecked((int)(0x15));// cannot put in NCB_NAME + public const int NRC_INUSE = unchecked((int)(0x16));// name in use on remote adapter + public const int NRC_NAMERR = unchecked((int)(0x17));// name deleted + public const int NRC_SABORT = unchecked((int)(0x18));// session ended abnormally + public const int NRC_NAMCONF = unchecked((int)(0x19));// name conflict detected + public const int NRC_IFBUSY = unchecked((int)(0x21));// interface busy, IRET before retrying + public const int NRC_TOOMANY = unchecked((int)(0x22));// too many commands outstanding, retry later + public const int NRC_BRIDGE = unchecked((int)(0x23));// ncb_lana_num field invalid + public const int NRC_CANOCCR = unchecked((int)(0x24));// command completed while cancel occurring + public const int NRC_CANCEL = unchecked((int)(0x26));// command not valid to cancel + public const int NRC_DUPENV = unchecked((int)(0x30));// name defined by anther local process + public const int NRC_ENVNOTDEF = unchecked((int)(0x34));// environment undefined. RESET required + public const int NRC_OSRESNOTAV = unchecked((int)(0x35));// required OS resources exhausted + public const int NRC_MAXAPPS = unchecked((int)(0x36));// max number of applications exceeded + public const int NRC_NOSAPS = unchecked((int)(0x37));// no saps available for netbios + public const int NRC_NORESOURCES = unchecked((int)(0x38));// requested resources are not available + public const int NRC_INVADDRESS = unchecked((int)(0x39));// invalid ncb address or length > segment + public const int NRC_INVDDID = unchecked((int)(0x3B));// invalid NCB DDID + public const int NRC_LOCKFAIL = unchecked((int)(0x3C));// lock of user area failed + public const int NRC_OPENERR = unchecked((int)(0x3F));// NETBIOS not loaded + public const int NRC_SYSTEM = unchecked((int)(0x40));// system error + + public const int NRC_PENDING = unchecked((int)(0xFF));// asynchronous command is not yet finished // // Win32 NetAPIs. // - [DllImport( "Netapi32.dll", EntryPoint = "NetUserChangePassword", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int NetUserChangePassword( object Domain, object User, byte OldPass, byte NewPass ); + [DllImport("Netapi32.dll", EntryPoint = "NetUserChangePassword", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int NetUserChangePassword(object Domain, object User, byte OldPass, byte NewPass); - [DllImport( "Netapi32.dll", EntryPoint = "NetUserGetInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int NetUserGetInfo( IntPtr lpServer, byte UserName, int Level, IntPtr lpBuffer ); + [DllImport("Netapi32.dll", EntryPoint = "NetUserGetInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int NetUserGetInfo(IntPtr lpServer, byte UserName, int Level, IntPtr lpBuffer); - [DllImport( "Netapi32.dll", EntryPoint = "NetUserGetGroups", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int NetUserGetGroups( IntPtr lpServer, byte UserName, int Level, IntPtr lpBuffer, int PrefMaxLen, IntPtr lpEntriesRead, IntPtr lpTotalEntries ); + [DllImport("Netapi32.dll", EntryPoint = "NetUserGetGroups", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int NetUserGetGroups(IntPtr lpServer, byte UserName, int Level, IntPtr lpBuffer, int PrefMaxLen, IntPtr lpEntriesRead, IntPtr lpTotalEntries); - [DllImport( "Netapi32.dll", EntryPoint = "NetUserGetLocalGroups", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int NetUserGetLocalGroups( IntPtr lpServer, byte UserName, int Level, int Flags, IntPtr lpBuffer, int MaxLen, IntPtr lpEntriesRead, IntPtr lpTotalEntries ); + [DllImport("Netapi32.dll", EntryPoint = "NetUserGetLocalGroups", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int NetUserGetLocalGroups(IntPtr lpServer, byte UserName, int Level, int Flags, IntPtr lpBuffer, int MaxLen, IntPtr lpEntriesRead, IntPtr lpTotalEntries); - [DllImport( "netapi32", EntryPoint = "NetUserAdd", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int NetUserAdd( IntPtr lpServer, int Level, ref USER_INFO_3 lpUser, IntPtr lpError ); + [DllImport("netapi32", EntryPoint = "NetUserAdd", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int NetUserAdd(IntPtr lpServer, int Level, ref USER_INFO_3 lpUser, IntPtr lpError); - [DllImport( "Netapi32.dll", EntryPoint = "NetWkstaGetInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int NetWkstaGetInfo( IntPtr lpServer, int Level, IntPtr lpBuffer ); + [DllImport("Netapi32.dll", EntryPoint = "NetWkstaGetInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int NetWkstaGetInfo(IntPtr lpServer, int Level, IntPtr lpBuffer); - [DllImport( "Netapi32.dll", EntryPoint = "NetWkstaUserGetInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int NetWkstaUserGetInfo( object reserved, int Level, IntPtr lpBuffer ); + [DllImport("Netapi32.dll", EntryPoint = "NetWkstaUserGetInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int NetWkstaUserGetInfo(object reserved, int Level, IntPtr lpBuffer); - [DllImport( "Netapi32.dll", EntryPoint = "NetApiBufferFree", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int NetApiBufferFree( IntPtr lpBuffer ); + [DllImport("Netapi32.dll", EntryPoint = "NetApiBufferFree", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int NetApiBufferFree(IntPtr lpBuffer); - [DllImport( "Netapi32.dll", EntryPoint = "NetRemoteTOD", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int NetRemoteTOD( object yServer, int pBuffer ); + [DllImport("Netapi32.dll", EntryPoint = "NetRemoteTOD", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int NetRemoteTOD(object yServer, int pBuffer); - [DllImport( "advapi32.dll", EntryPoint = "GetUserNameW", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.Winapi )] - public static extern int GetUserNameW( ref byte lpBuffer, int nSize ); + [DllImport("advapi32.dll", EntryPoint = "GetUserNameW", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)] + public static extern int GetUserNameW(ref byte lpBuffer, int nSize); - [DllImport( "kernel32", EntryPoint = "GetComputerNameW", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.Winapi )] - public static extern int GetComputerNameW( IntPtr lpBuffer, int nSize ); + [DllImport("kernel32", EntryPoint = "GetComputerNameW", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)] + public static extern int GetComputerNameW(IntPtr lpBuffer, int nSize); - [DllImport( "advapi32.dll", EntryPoint = "LookupAccountSid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LookupAccountSid( IntPtr lpSystemName, object Sid, object Name, int cbName, object ReferencedDomainName, int cbReferencedDomainName, int peUse ); + [DllImport("advapi32.dll", EntryPoint = "LookupAccountSid", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LookupAccountSid(IntPtr lpSystemName, object Sid, object Name, int cbName, object ReferencedDomainName, int cbReferencedDomainName, int peUse); - [DllImport( "netapi32.dll", EntryPoint = "NetLocalGroupDelMembers", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int NetLocalGroupDelMembers( int psServer, int psLocalGroup, int lLevel, LOCALGROUP_MEMBERS_INFO_0 uMember, int lMemberCount ); + [DllImport("netapi32.dll", EntryPoint = "NetLocalGroupDelMembers", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int NetLocalGroupDelMembers(int psServer, int psLocalGroup, int lLevel, LOCALGROUP_MEMBERS_INFO_0 uMember, int lMemberCount); - [DllImport( "netapi32.dll", EntryPoint = "NetLocalGroupGetMembers", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int NetLocalGroupGetMembers( int psServer, int psLocalGroup, int lLevel, int pBuffer, int lMaxLength, int plEntriesRead, int plTotalEntries, int phResume ); + [DllImport("netapi32.dll", EntryPoint = "NetLocalGroupGetMembers", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int NetLocalGroupGetMembers(int psServer, int psLocalGroup, int lLevel, int pBuffer, int lMaxLength, int plEntriesRead, int plTotalEntries, int phResume); - [DllImport( "mpr.dll", EntryPoint = "WNetOpenEnum", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WNetOpenEnum( int dwScope, int dwType, int dwUsage, IntPtr lpNetResource, IntPtr lphEnum ); + [DllImport("mpr.dll", EntryPoint = "WNetOpenEnum", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WNetOpenEnum(int dwScope, int dwType, int dwUsage, IntPtr lpNetResource, IntPtr lphEnum); - [DllImport( "mpr.dll", EntryPoint = "WNetEnumResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WNetEnumResource( IntPtr hEnum, IntPtr lpcCount, ref NETRESOURCE lpBuffer, IntPtr lpBufferSize ); + [DllImport("mpr.dll", EntryPoint = "WNetEnumResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WNetEnumResource(IntPtr hEnum, IntPtr lpcCount, ref NETRESOURCE lpBuffer, IntPtr lpBufferSize); - [DllImport( "netapi32.dll", EntryPoint = "Netbios", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern byte Netbios( NCB pncb ); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [DllImport("netapi32.dll", EntryPoint = "Netbios", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern byte Netbios(NCB pncb); + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct USER_INFO_3 { // Level 0 starts here @@ -16588,7 +16588,7 @@ public struct USER_INFO_3 public int PasswordExpired; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct GROUP_INFO_2 { public int Name; @@ -16597,13 +16597,13 @@ public struct GROUP_INFO_2 public int Attributes; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct LOCALGROUP_MEMBERS_INFO_0 { public int pSID; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct LOCALGROUP_MEMBERS_INFO_1 { //Level 0 Starts Here @@ -16613,7 +16613,7 @@ public struct LOCALGROUP_MEMBERS_INFO_1 public int psName; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct WKSTA_INFO_102 { public int wki102_platform_id; @@ -16625,7 +16625,7 @@ public struct WKSTA_INFO_102 public int wki102_logged_on_users; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct WKSTA_USER_INFO_1 { public int wkui1_username; @@ -16657,53 +16657,53 @@ public enum G_NETSID_NAME_USE SidTypeUnknown = 8 } - public const int FILTER_TEMP_DUPLICATE_ACCOUNT = unchecked( (int)( 0x1 ) ); - public const int FILTER_NORMAL_ACCOUNT = unchecked( (int)( 0x2 ) ); - public const int FILTER_PROXY_ACCOUNT = unchecked( (int)( 0x4 ) ); - public const int FILTER_INTERDOMAIN_TRUST_ACCOUNT = unchecked( (int)( 0x8 ) ); - public const int FILTER_WORKSTATION_TRUST_ACCOUNT = unchecked( (int)( 0x10 ) ); - public const int FILTER_SERVER_TRUST_ACCOUNT = unchecked( (int)( 0x20 ) ); + public const int FILTER_TEMP_DUPLICATE_ACCOUNT = unchecked((int)(0x1)); + public const int FILTER_NORMAL_ACCOUNT = unchecked((int)(0x2)); + public const int FILTER_PROXY_ACCOUNT = unchecked((int)(0x4)); + public const int FILTER_INTERDOMAIN_TRUST_ACCOUNT = unchecked((int)(0x8)); + public const int FILTER_WORKSTATION_TRUST_ACCOUNT = unchecked((int)(0x10)); + public const int FILTER_SERVER_TRUST_ACCOUNT = unchecked((int)(0x20)); - public const int TIMEQ_FOREVER = unchecked( (int)( -1 ) );//((unsigned long) -1L) - public const int USER_MAXSTORAGE_UNLIMITED = unchecked( (int)( -1 ) );//((unsigned long) -1L) - public const int USER_NO_LOGOFF = unchecked( (int)( -1 ) );//((unsigned long) -1L) - public const int UNITS_PER_DAY = unchecked( (int)( 24 ) ); - public const int UNITS_PER_WEEK = unchecked( (int)( UNITS_PER_DAY * 7 ) ); + public const int TIMEQ_FOREVER = unchecked((int)(-1));//((unsigned long) -1L) + public const int USER_MAXSTORAGE_UNLIMITED = unchecked((int)(-1));//((unsigned long) -1L) + public const int USER_NO_LOGOFF = unchecked((int)(-1));//((unsigned long) -1L) + public const int UNITS_PER_DAY = unchecked((int)(24)); + public const int UNITS_PER_WEEK = unchecked((int)(UNITS_PER_DAY * 7)); - public const int USER_PRIV_MASK = unchecked( (int)( 3 ) ); - public const int USER_PRIV_GUEST = unchecked( (int)( 0 ) ); - public const int USER_PRIV_USER = unchecked( (int)( 1 ) ); - public const int USER_PRIV_ADMIN = unchecked( (int)( 2 ) ); + public const int USER_PRIV_MASK = unchecked((int)(3)); + public const int USER_PRIV_GUEST = unchecked((int)(0)); + public const int USER_PRIV_USER = unchecked((int)(1)); + public const int USER_PRIV_ADMIN = unchecked((int)(2)); - public const int UNLEN = unchecked( (int)( 256 ) );// Maximum username length - public const int GNLEN = unchecked( (int)( UNLEN ) );// Maximum groupname length - public const int CNLEN = unchecked( (int)( 15 ) );// Maximum computer name length - public const int PWLEN = unchecked( (int)( 256 ) );// Maximum password length - public const int LM20_PWLEN = unchecked( (int)( 14 ) );// LM 2.0 Maximum password length - public const int MAXCOMMENTSZ = unchecked( (int)( 256 ) );// Multipurpose comment length - public const int LG_INCLUDE_INDIRECT = unchecked( (int)( 0x1 ) ); + public const int UNLEN = unchecked((int)(256));// Maximum username length + public const int GNLEN = unchecked((int)(UNLEN));// Maximum groupname length + public const int CNLEN = unchecked((int)(15));// Maximum computer name length + public const int PWLEN = unchecked((int)(256));// Maximum password length + public const int LM20_PWLEN = unchecked((int)(14));// LM 2.0 Maximum password length + public const int MAXCOMMENTSZ = unchecked((int)(256));// Multipurpose comment length + public const int LG_INCLUDE_INDIRECT = unchecked((int)(0x1)); - public const int UF_SCRIPT = unchecked( (int)( 0x1 ) ); - public const int UF_ACCOUNTDISABLE = unchecked( (int)( 0x2 ) ); - public const int UF_HOMEDIR_REQUIRED = unchecked( (int)( 0x8 ) ); - public const int UF_LOCKOUT = unchecked( (int)( 0x10 ) ); - public const int UF_PASSWD_NOTREQD = unchecked( (int)( 0x20 ) ); - public const int UF_PASSWD_CANT_CHANGE = unchecked( (int)( 0x40 ) ); + public const int UF_SCRIPT = unchecked((int)(0x1)); + public const int UF_ACCOUNTDISABLE = unchecked((int)(0x2)); + public const int UF_HOMEDIR_REQUIRED = unchecked((int)(0x8)); + public const int UF_LOCKOUT = unchecked((int)(0x10)); + public const int UF_PASSWD_NOTREQD = unchecked((int)(0x20)); + public const int UF_PASSWD_CANT_CHANGE = unchecked((int)(0x40)); - public const int NERR_SUCCESS = unchecked( (int)( 0 ) ); - public const int NERR_BASE = unchecked( (int)( 2100 ) ); - public const int NERR_INVALIDCOMPUTER = unchecked( (int)( ( NERR_BASE + 251 ) ) ); - public const int NERR_NOTPRIMARY = unchecked( (int)( ( NERR_BASE + 126 ) ) ); - public const int NERR_GROUPEXISTS = unchecked( (int)( ( NERR_BASE + 123 ) ) ); - public const int NERR_USEREXISTS = unchecked( (int)( ( NERR_BASE + 124 ) ) ); - public const int NERR_PASSWORDTOOSHORT = unchecked( (int)( ( NERR_BASE + 145 ) ) ); + public const int NERR_SUCCESS = unchecked((int)(0)); + public const int NERR_BASE = unchecked((int)(2100)); + public const int NERR_INVALIDCOMPUTER = unchecked((int)((NERR_BASE + 251))); + public const int NERR_NOTPRIMARY = unchecked((int)((NERR_BASE + 126))); + public const int NERR_GROUPEXISTS = unchecked((int)((NERR_BASE + 123))); + public const int NERR_USEREXISTS = unchecked((int)((NERR_BASE + 124))); + public const int NERR_PASSWORDTOOSHORT = unchecked((int)((NERR_BASE + 145))); - public const int RESOURCE_GLOBALNET = unchecked( (int)( 0x2 ) ); + public const int RESOURCE_GLOBALNET = unchecked((int)(0x2)); - public const int RESOURCE_ENUM_ALL = unchecked( (int)( 0xFFFF ) ); + public const int RESOURCE_ENUM_ALL = unchecked((int)(0xFFFF)); @@ -16714,195 +16714,195 @@ public enum G_NETSID_NAME_USE - public const int RESOURCEUSAGE_ALL = unchecked( (int)( 0x0 ) ); + public const int RESOURCEUSAGE_ALL = unchecked((int)(0x0)); // Legal values for expression in except(). - public const int EXCEPTION_EXECUTE_HANDLER = unchecked( (int)( 1 ) ); - public const int EXCEPTION_CONTINUE_SEARCH = unchecked( (int)( 0 ) ); - public const int EXCEPTION_CONTINUE_EXECUTION = unchecked( (int)( -1 ) ); + public const int EXCEPTION_EXECUTE_HANDLER = unchecked((int)(1)); + public const int EXCEPTION_CONTINUE_SEARCH = unchecked((int)(0)); + public const int EXCEPTION_CONTINUE_EXECUTION = unchecked((int)(-1)); // UI dialog constants and types // ----Constants-------------------------------------------------------------- - public const int CTLFIRST = unchecked( (int)( 0x400 ) ); - public const int CTLLAST = unchecked( (int)( 0x4FF ) ); + public const int CTLFIRST = unchecked((int)(0x400)); + public const int CTLLAST = unchecked((int)(0x4FF)); // Push buttons - public const int PSH1 = unchecked( (int)( 0x400 ) ); - public const int PSH2 = unchecked( (int)( 0x401 ) ); - public const int PSH3 = unchecked( (int)( 0x402 ) ); - public const int PSH4 = unchecked( (int)( 0x403 ) ); - public const int PSH5 = unchecked( (int)( 0x404 ) ); - public const int PSH6 = unchecked( (int)( 0x405 ) ); - public const int PSH7 = unchecked( (int)( 0x406 ) ); - public const int PSH8 = unchecked( (int)( 0x407 ) ); - public const int PSH9 = unchecked( (int)( 0x408 ) ); - public const int PSH10 = unchecked( (int)( 0x409 ) ); - public const int PSH11 = unchecked( (int)( 0x40A ) ); - public const int PSH12 = unchecked( (int)( 0x40B ) ); - public const int PSH13 = unchecked( (int)( 0x40C ) ); - public const int PSH14 = unchecked( (int)( 0x40D ) ); - public const int PSH15 = unchecked( (int)( 0x40E ) ); - public const int PSHHELP = unchecked( (int)( PSH15 ) ); - public const int PSH16 = unchecked( (int)( 0x40F ) ); + public const int PSH1 = unchecked((int)(0x400)); + public const int PSH2 = unchecked((int)(0x401)); + public const int PSH3 = unchecked((int)(0x402)); + public const int PSH4 = unchecked((int)(0x403)); + public const int PSH5 = unchecked((int)(0x404)); + public const int PSH6 = unchecked((int)(0x405)); + public const int PSH7 = unchecked((int)(0x406)); + public const int PSH8 = unchecked((int)(0x407)); + public const int PSH9 = unchecked((int)(0x408)); + public const int PSH10 = unchecked((int)(0x409)); + public const int PSH11 = unchecked((int)(0x40A)); + public const int PSH12 = unchecked((int)(0x40B)); + public const int PSH13 = unchecked((int)(0x40C)); + public const int PSH14 = unchecked((int)(0x40D)); + public const int PSH15 = unchecked((int)(0x40E)); + public const int PSHHELP = unchecked((int)(PSH15)); + public const int PSH16 = unchecked((int)(0x40F)); // Checkboxes - public const int CHX1 = unchecked( (int)( 0x410 ) ); - public const int CHX2 = unchecked( (int)( 0x411 ) ); - public const int CHX3 = unchecked( (int)( 0x412 ) ); - public const int CHX4 = unchecked( (int)( 0x413 ) ); - public const int CHX5 = unchecked( (int)( 0x414 ) ); - public const int CHX6 = unchecked( (int)( 0x415 ) ); - public const int CHX7 = unchecked( (int)( 0x416 ) ); - public const int CHX8 = unchecked( (int)( 0x417 ) ); - public const int CHX9 = unchecked( (int)( 0x418 ) ); - public const int CHX10 = unchecked( (int)( 0x419 ) ); - public const int CHX11 = unchecked( (int)( 0x41A ) ); - public const int CHX12 = unchecked( (int)( 0x41B ) ); - public const int CHX13 = unchecked( (int)( 0x41C ) ); - public const int CHX14 = unchecked( (int)( 0x41D ) ); - public const int CHX15 = unchecked( (int)( 0x41E ) ); - public const int CHX16 = unchecked( (int)( 0x41D ) ); + public const int CHX1 = unchecked((int)(0x410)); + public const int CHX2 = unchecked((int)(0x411)); + public const int CHX3 = unchecked((int)(0x412)); + public const int CHX4 = unchecked((int)(0x413)); + public const int CHX5 = unchecked((int)(0x414)); + public const int CHX6 = unchecked((int)(0x415)); + public const int CHX7 = unchecked((int)(0x416)); + public const int CHX8 = unchecked((int)(0x417)); + public const int CHX9 = unchecked((int)(0x418)); + public const int CHX10 = unchecked((int)(0x419)); + public const int CHX11 = unchecked((int)(0x41A)); + public const int CHX12 = unchecked((int)(0x41B)); + public const int CHX13 = unchecked((int)(0x41C)); + public const int CHX14 = unchecked((int)(0x41D)); + public const int CHX15 = unchecked((int)(0x41E)); + public const int CHX16 = unchecked((int)(0x41D)); // Radio buttons - public const int RAD1 = unchecked( (int)( 0x420 ) ); - public const int RAD2 = unchecked( (int)( 0x421 ) ); - public const int RAD3 = unchecked( (int)( 0x422 ) ); - public const int RAD4 = unchecked( (int)( 0x423 ) ); - public const int RAD5 = unchecked( (int)( 0x424 ) ); - public const int RAD6 = unchecked( (int)( 0x425 ) ); - public const int RAD7 = unchecked( (int)( 0x426 ) ); - public const int RAD8 = unchecked( (int)( 0x427 ) ); - public const int RAD9 = unchecked( (int)( 0x428 ) ); - public const int RAD10 = unchecked( (int)( 0x429 ) ); - public const int RAD11 = unchecked( (int)( 0x42A ) ); - public const int RAD12 = unchecked( (int)( 0x42B ) ); - public const int RAD13 = unchecked( (int)( 0x42C ) ); - public const int RAD14 = unchecked( (int)( 0x42D ) ); - public const int RAD15 = unchecked( (int)( 0x42E ) ); - public const int RAD16 = unchecked( (int)( 0x42F ) ); + public const int RAD1 = unchecked((int)(0x420)); + public const int RAD2 = unchecked((int)(0x421)); + public const int RAD3 = unchecked((int)(0x422)); + public const int RAD4 = unchecked((int)(0x423)); + public const int RAD5 = unchecked((int)(0x424)); + public const int RAD6 = unchecked((int)(0x425)); + public const int RAD7 = unchecked((int)(0x426)); + public const int RAD8 = unchecked((int)(0x427)); + public const int RAD9 = unchecked((int)(0x428)); + public const int RAD10 = unchecked((int)(0x429)); + public const int RAD11 = unchecked((int)(0x42A)); + public const int RAD12 = unchecked((int)(0x42B)); + public const int RAD13 = unchecked((int)(0x42C)); + public const int RAD14 = unchecked((int)(0x42D)); + public const int RAD15 = unchecked((int)(0x42E)); + public const int RAD16 = unchecked((int)(0x42F)); // Groups, frames, rectangles, and icons - public const int GRP1 = unchecked( (int)( 0x430 ) ); - public const int GRP2 = unchecked( (int)( 0x431 ) ); - public const int GRP3 = unchecked( (int)( 0x432 ) ); - public const int GRP4 = unchecked( (int)( 0x433 ) ); - public const int FRM1 = unchecked( (int)( 0x434 ) ); - public const int FRM2 = unchecked( (int)( 0x435 ) ); - public const int FRM3 = unchecked( (int)( 0x436 ) ); - public const int FRM4 = unchecked( (int)( 0x437 ) ); - public const int RCT1 = unchecked( (int)( 0x438 ) ); - public const int RCT2 = unchecked( (int)( 0x439 ) ); - public const int RCT3 = unchecked( (int)( 0x43A ) ); - public const int RCT4 = unchecked( (int)( 0x43B ) ); - public const int ICO1 = unchecked( (int)( 0x43C ) ); - public const int ICO2 = unchecked( (int)( 0x43D ) ); - public const int ICO3 = unchecked( (int)( 0x43E ) ); - public const int ICO4 = unchecked( (int)( 0x43F ) ); + public const int GRP1 = unchecked((int)(0x430)); + public const int GRP2 = unchecked((int)(0x431)); + public const int GRP3 = unchecked((int)(0x432)); + public const int GRP4 = unchecked((int)(0x433)); + public const int FRM1 = unchecked((int)(0x434)); + public const int FRM2 = unchecked((int)(0x435)); + public const int FRM3 = unchecked((int)(0x436)); + public const int FRM4 = unchecked((int)(0x437)); + public const int RCT1 = unchecked((int)(0x438)); + public const int RCT2 = unchecked((int)(0x439)); + public const int RCT3 = unchecked((int)(0x43A)); + public const int RCT4 = unchecked((int)(0x43B)); + public const int ICO1 = unchecked((int)(0x43C)); + public const int ICO2 = unchecked((int)(0x43D)); + public const int ICO3 = unchecked((int)(0x43E)); + public const int ICO4 = unchecked((int)(0x43F)); // Static text - public const int STC1 = unchecked( (int)( 0x440 ) ); - public const int STC2 = unchecked( (int)( 0x441 ) ); - public const int STC3 = unchecked( (int)( 0x442 ) ); - public const int STC4 = unchecked( (int)( 0x443 ) ); - public const int STC5 = unchecked( (int)( 0x444 ) ); - public const int STC6 = unchecked( (int)( 0x445 ) ); - public const int STC7 = unchecked( (int)( 0x446 ) ); - public const int STC8 = unchecked( (int)( 0x447 ) ); - public const int STC9 = unchecked( (int)( 0x448 ) ); - public const int STC10 = unchecked( (int)( 0x449 ) ); - public const int STC11 = unchecked( (int)( 0x44A ) ); - public const int STC12 = unchecked( (int)( 0x44B ) ); - public const int STC13 = unchecked( (int)( 0x44C ) ); - public const int STC14 = unchecked( (int)( 0x44D ) ); - public const int STC15 = unchecked( (int)( 0x44E ) ); - public const int STC16 = unchecked( (int)( 0x44F ) ); - public const int STC17 = unchecked( (int)( 0x450 ) ); - public const int STC18 = unchecked( (int)( 0x451 ) ); - public const int STC19 = unchecked( (int)( 0x452 ) ); - public const int STC20 = unchecked( (int)( 0x453 ) ); - public const int STC21 = unchecked( (int)( 0x454 ) ); - public const int STC22 = unchecked( (int)( 0x455 ) ); - public const int STC23 = unchecked( (int)( 0x456 ) ); - public const int STC24 = unchecked( (int)( 0x457 ) ); - public const int STC25 = unchecked( (int)( 0x458 ) ); - public const int STC26 = unchecked( (int)( 0x459 ) ); - public const int STC27 = unchecked( (int)( 0x45A ) ); - public const int STC28 = unchecked( (int)( 0x45B ) ); - public const int STC29 = unchecked( (int)( 0x45C ) ); - public const int STC30 = unchecked( (int)( 0x45D ) ); - public const int STC31 = unchecked( (int)( 0x45E ) ); - public const int STC32 = unchecked( (int)( 0x45F ) ); + public const int STC1 = unchecked((int)(0x440)); + public const int STC2 = unchecked((int)(0x441)); + public const int STC3 = unchecked((int)(0x442)); + public const int STC4 = unchecked((int)(0x443)); + public const int STC5 = unchecked((int)(0x444)); + public const int STC6 = unchecked((int)(0x445)); + public const int STC7 = unchecked((int)(0x446)); + public const int STC8 = unchecked((int)(0x447)); + public const int STC9 = unchecked((int)(0x448)); + public const int STC10 = unchecked((int)(0x449)); + public const int STC11 = unchecked((int)(0x44A)); + public const int STC12 = unchecked((int)(0x44B)); + public const int STC13 = unchecked((int)(0x44C)); + public const int STC14 = unchecked((int)(0x44D)); + public const int STC15 = unchecked((int)(0x44E)); + public const int STC16 = unchecked((int)(0x44F)); + public const int STC17 = unchecked((int)(0x450)); + public const int STC18 = unchecked((int)(0x451)); + public const int STC19 = unchecked((int)(0x452)); + public const int STC20 = unchecked((int)(0x453)); + public const int STC21 = unchecked((int)(0x454)); + public const int STC22 = unchecked((int)(0x455)); + public const int STC23 = unchecked((int)(0x456)); + public const int STC24 = unchecked((int)(0x457)); + public const int STC25 = unchecked((int)(0x458)); + public const int STC26 = unchecked((int)(0x459)); + public const int STC27 = unchecked((int)(0x45A)); + public const int STC28 = unchecked((int)(0x45B)); + public const int STC29 = unchecked((int)(0x45C)); + public const int STC30 = unchecked((int)(0x45D)); + public const int STC31 = unchecked((int)(0x45E)); + public const int STC32 = unchecked((int)(0x45F)); // Listboxes - public const int LST1 = unchecked( (int)( 0x460 ) ); - public const int LST2 = unchecked( (int)( 0x461 ) ); - public const int LST3 = unchecked( (int)( 0x462 ) ); - public const int LST4 = unchecked( (int)( 0x463 ) ); - public const int LST5 = unchecked( (int)( 0x464 ) ); - public const int LST6 = unchecked( (int)( 0x465 ) ); - public const int LST7 = unchecked( (int)( 0x466 ) ); - public const int LST8 = unchecked( (int)( 0x467 ) ); - public const int LST9 = unchecked( (int)( 0x468 ) ); - public const int LST10 = unchecked( (int)( 0x469 ) ); - public const int LST11 = unchecked( (int)( 0x46A ) ); - public const int LST12 = unchecked( (int)( 0x46B ) ); - public const int LST13 = unchecked( (int)( 0x46C ) ); - public const int LST14 = unchecked( (int)( 0x46D ) ); - public const int LST15 = unchecked( (int)( 0x46E ) ); - public const int LST16 = unchecked( (int)( 0x46F ) ); + public const int LST1 = unchecked((int)(0x460)); + public const int LST2 = unchecked((int)(0x461)); + public const int LST3 = unchecked((int)(0x462)); + public const int LST4 = unchecked((int)(0x463)); + public const int LST5 = unchecked((int)(0x464)); + public const int LST6 = unchecked((int)(0x465)); + public const int LST7 = unchecked((int)(0x466)); + public const int LST8 = unchecked((int)(0x467)); + public const int LST9 = unchecked((int)(0x468)); + public const int LST10 = unchecked((int)(0x469)); + public const int LST11 = unchecked((int)(0x46A)); + public const int LST12 = unchecked((int)(0x46B)); + public const int LST13 = unchecked((int)(0x46C)); + public const int LST14 = unchecked((int)(0x46D)); + public const int LST15 = unchecked((int)(0x46E)); + public const int LST16 = unchecked((int)(0x46F)); // Combo boxes - public const int CMB1 = unchecked( (int)( 0x470 ) ); - public const int CMB2 = unchecked( (int)( 0x471 ) ); - public const int CMB3 = unchecked( (int)( 0x472 ) ); - public const int CMB4 = unchecked( (int)( 0x473 ) ); - public const int CMB5 = unchecked( (int)( 0x474 ) ); - public const int CMB6 = unchecked( (int)( 0x475 ) ); - public const int CMB7 = unchecked( (int)( 0x476 ) ); - public const int CMB8 = unchecked( (int)( 0x477 ) ); - public const int CMB9 = unchecked( (int)( 0x478 ) ); - public const int CMB10 = unchecked( (int)( 0x479 ) ); - public const int CMB11 = unchecked( (int)( 0x47A ) ); - public const int CMB12 = unchecked( (int)( 0x47B ) ); - public const int CMB13 = unchecked( (int)( 0x47C ) ); - public const int CMB14 = unchecked( (int)( 0x47D ) ); - public const int CMB15 = unchecked( (int)( 0x47E ) ); - public const int CMB16 = unchecked( (int)( 0x47F ) ); + public const int CMB1 = unchecked((int)(0x470)); + public const int CMB2 = unchecked((int)(0x471)); + public const int CMB3 = unchecked((int)(0x472)); + public const int CMB4 = unchecked((int)(0x473)); + public const int CMB5 = unchecked((int)(0x474)); + public const int CMB6 = unchecked((int)(0x475)); + public const int CMB7 = unchecked((int)(0x476)); + public const int CMB8 = unchecked((int)(0x477)); + public const int CMB9 = unchecked((int)(0x478)); + public const int CMB10 = unchecked((int)(0x479)); + public const int CMB11 = unchecked((int)(0x47A)); + public const int CMB12 = unchecked((int)(0x47B)); + public const int CMB13 = unchecked((int)(0x47C)); + public const int CMB14 = unchecked((int)(0x47D)); + public const int CMB15 = unchecked((int)(0x47E)); + public const int CMB16 = unchecked((int)(0x47F)); // Edit controls - public const int EDT1 = unchecked( (int)( 0x480 ) ); - public const int EDT2 = unchecked( (int)( 0x481 ) ); - public const int EDT3 = unchecked( (int)( 0x482 ) ); - public const int EDT4 = unchecked( (int)( 0x483 ) ); - public const int EDT5 = unchecked( (int)( 0x484 ) ); - public const int EDT6 = unchecked( (int)( 0x485 ) ); - public const int EDT7 = unchecked( (int)( 0x486 ) ); - public const int EDT8 = unchecked( (int)( 0x487 ) ); - public const int EDT9 = unchecked( (int)( 0x488 ) ); - public const int EDT10 = unchecked( (int)( 0x489 ) ); - public const int EDT11 = unchecked( (int)( 0x48A ) ); - public const int EDT12 = unchecked( (int)( 0x48B ) ); - public const int EDT13 = unchecked( (int)( 0x48C ) ); - public const int EDT14 = unchecked( (int)( 0x48D ) ); - public const int EDT15 = unchecked( (int)( 0x48E ) ); - public const int EDT16 = unchecked( (int)( 0x48F ) ); + public const int EDT1 = unchecked((int)(0x480)); + public const int EDT2 = unchecked((int)(0x481)); + public const int EDT3 = unchecked((int)(0x482)); + public const int EDT4 = unchecked((int)(0x483)); + public const int EDT5 = unchecked((int)(0x484)); + public const int EDT6 = unchecked((int)(0x485)); + public const int EDT7 = unchecked((int)(0x486)); + public const int EDT8 = unchecked((int)(0x487)); + public const int EDT9 = unchecked((int)(0x488)); + public const int EDT10 = unchecked((int)(0x489)); + public const int EDT11 = unchecked((int)(0x48A)); + public const int EDT12 = unchecked((int)(0x48B)); + public const int EDT13 = unchecked((int)(0x48C)); + public const int EDT14 = unchecked((int)(0x48D)); + public const int EDT15 = unchecked((int)(0x48E)); + public const int EDT16 = unchecked((int)(0x48F)); // Scroll bars - public const int SCR1 = unchecked( (int)( 0x490 ) ); - public const int SCR2 = unchecked( (int)( 0x491 ) ); - public const int SCR3 = unchecked( (int)( 0x492 ) ); - public const int SCR4 = unchecked( (int)( 0x493 ) ); - public const int SCR5 = unchecked( (int)( 0x494 ) ); - public const int SCR6 = unchecked( (int)( 0x495 ) ); - public const int SCR7 = unchecked( (int)( 0x496 ) ); - public const int SCR8 = unchecked( (int)( 0x497 ) ); - - public const int FILEOPENORD = unchecked( (int)( 1536 ) ); - public const int MULTIFILEOPENORD = unchecked( (int)( 1537 ) ); - public const int PRINTDLGORD = unchecked( (int)( 1538 ) ); - public const int PRNSETUPDLGORD = unchecked( (int)( 1539 ) ); - public const int FINDDLGORD = unchecked( (int)( 1540 ) ); - public const int REPLACEDLGORD = unchecked( (int)( 1541 ) ); - public const int FONTDLGORD = unchecked( (int)( 1542 ) ); - public const int FORMATDLGORD31 = unchecked( (int)( 1543 ) ); - public const int FORMATDLGORD30 = unchecked( (int)( 1544 ) ); - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int SCR1 = unchecked((int)(0x490)); + public const int SCR2 = unchecked((int)(0x491)); + public const int SCR3 = unchecked((int)(0x492)); + public const int SCR4 = unchecked((int)(0x493)); + public const int SCR5 = unchecked((int)(0x494)); + public const int SCR6 = unchecked((int)(0x495)); + public const int SCR7 = unchecked((int)(0x496)); + public const int SCR8 = unchecked((int)(0x497)); + + public const int FILEOPENORD = unchecked((int)(1536)); + public const int MULTIFILEOPENORD = unchecked((int)(1537)); + public const int PRINTDLGORD = unchecked((int)(1538)); + public const int PRNSETUPDLGORD = unchecked((int)(1539)); + public const int FINDDLGORD = unchecked((int)(1540)); + public const int REPLACEDLGORD = unchecked((int)(1541)); + public const int FONTDLGORD = unchecked((int)(1542)); + public const int FORMATDLGORD31 = unchecked((int)(1543)); + public const int FORMATDLGORD30 = unchecked((int)(1544)); + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CRGB { public byte bRed; @@ -16918,156 +16918,156 @@ public struct CRGB // function prototypes, constants, and type definitions // for Windows 32-bit Registry API - public const int HKEY_CLASSES_ROOT = unchecked( (int)( 0x80000000 ) ); - public const int HKEY_CURRENT_USER = unchecked( (int)( 0x80000001 ) ); - public const int HKEY_LOCAL_MACHINE = unchecked( (int)( 0x80000002 ) ); - public const int HKEY_USERS = unchecked( (int)( 0x80000003 ) ); - public const int HKEY_PERFORMANCE_DATA = unchecked( (int)( 0x80000004 ) ); - public const int HKEY_CURRENT_CONFIG = unchecked( (int)( 0x80000005 ) ); - public const int HKEY_DYN_DATA = unchecked( (int)( 0x80000006 ) ); + public const int HKEY_CLASSES_ROOT = unchecked((int)(0x80000000)); + public const int HKEY_CURRENT_USER = unchecked((int)(0x80000001)); + public const int HKEY_LOCAL_MACHINE = unchecked((int)(0x80000002)); + public const int HKEY_USERS = unchecked((int)(0x80000003)); + public const int HKEY_PERFORMANCE_DATA = unchecked((int)(0x80000004)); + public const int HKEY_CURRENT_CONFIG = unchecked((int)(0x80000005)); + public const int HKEY_DYN_DATA = unchecked((int)(0x80000006)); // Registry API prototypes - [DllImport( "advapi32.dll", EntryPoint = "RegCloseKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegCloseKey( IntPtr hKey ); + [DllImport("advapi32.dll", EntryPoint = "RegCloseKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegCloseKey(IntPtr hKey); - [DllImport( "advapi32.dll", EntryPoint = "RegConnectRegistry", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegConnectRegistry( string lpMachineName, IntPtr hKey, int phkResult ); + [DllImport("advapi32.dll", EntryPoint = "RegConnectRegistry", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegConnectRegistry(string lpMachineName, IntPtr hKey, int phkResult); - [DllImport( "advapi32.dll", EntryPoint = "RegCreateKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegCreateKey( IntPtr hKey, string lpSubKey, int phkResult ); + [DllImport("advapi32.dll", EntryPoint = "RegCreateKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegCreateKey(IntPtr hKey, string lpSubKey, int phkResult); - [DllImport( "advapi32.dll", EntryPoint = "RegCreateKeyEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegCreateKeyEx( IntPtr hKey, string lpSubKey, int Reserved, string lpClass, int dwOptions, int samDesired, ref SECURITY_ATTRIBUTES lpSecurityAttributes, int phkResult, IntPtr lpdwDisposition ); + [DllImport("advapi32.dll", EntryPoint = "RegCreateKeyEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegCreateKeyEx(IntPtr hKey, string lpSubKey, int Reserved, string lpClass, int dwOptions, int samDesired, ref SECURITY_ATTRIBUTES lpSecurityAttributes, int phkResult, IntPtr lpdwDisposition); - [DllImport( "advapi32.dll", EntryPoint = "RegDeleteKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegDeleteKey( IntPtr hKey, string lpSubKey ); + [DllImport("advapi32.dll", EntryPoint = "RegDeleteKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegDeleteKey(IntPtr hKey, string lpSubKey); - [DllImport( "advapi32.dll", EntryPoint = "RegDeleteValue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegDeleteValue( IntPtr hKey, string lpValueName ); + [DllImport("advapi32.dll", EntryPoint = "RegDeleteValue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegDeleteValue(IntPtr hKey, string lpValueName); - [DllImport( "advapi32.dll", EntryPoint = "RegEnumKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegEnumKey( IntPtr hKey, int dwIndex, string lpName, int cbName ); + [DllImport("advapi32.dll", EntryPoint = "RegEnumKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegEnumKey(IntPtr hKey, int dwIndex, string lpName, int cbName); - [DllImport( "advapi32.dll", EntryPoint = "RegEnumKeyEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegEnumKeyEx( IntPtr hKey, int dwIndex, string lpName, IntPtr lpcbName, IntPtr lpReserved, string lpClass, IntPtr lpcbClass, ref FILETIME lpftLastWriteTime ); + [DllImport("advapi32.dll", EntryPoint = "RegEnumKeyEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegEnumKeyEx(IntPtr hKey, int dwIndex, string lpName, IntPtr lpcbName, IntPtr lpReserved, string lpClass, IntPtr lpcbClass, ref FILETIME lpftLastWriteTime); - [DllImport( "advapi32.dll", EntryPoint = "RegEnumValue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegEnumValue( IntPtr hKey, int dwIndex, string lpValueName, IntPtr lpcbValueName, IntPtr lpReserved, IntPtr lpType, ref byte lpData, IntPtr lpcbData ); + [DllImport("advapi32.dll", EntryPoint = "RegEnumValue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegEnumValue(IntPtr hKey, int dwIndex, string lpValueName, IntPtr lpcbValueName, IntPtr lpReserved, IntPtr lpType, ref byte lpData, IntPtr lpcbData); - [DllImport( "advapi32.dll", EntryPoint = "RegFlushKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegFlushKey( IntPtr hKey ); + [DllImport("advapi32.dll", EntryPoint = "RegFlushKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegFlushKey(IntPtr hKey); - [DllImport( "advapi32.dll", EntryPoint = "RegGetKeySecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegGetKeySecurity( IntPtr hKey, int SecurityInformation, SECURITY_DESCRIPTOR pSecurityDescriptor, IntPtr lpcbSecurityDescriptor ); + [DllImport("advapi32.dll", EntryPoint = "RegGetKeySecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegGetKeySecurity(IntPtr hKey, int SecurityInformation, SECURITY_DESCRIPTOR pSecurityDescriptor, IntPtr lpcbSecurityDescriptor); - [DllImport( "advapi32.dll", EntryPoint = "RegLoadKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegLoadKey( IntPtr hKey, string lpSubKey, string lpFile ); + [DllImport("advapi32.dll", EntryPoint = "RegLoadKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegLoadKey(IntPtr hKey, string lpSubKey, string lpFile); - [DllImport( "advapi32.dll", EntryPoint = "RegNotifyChangeKeyValue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegNotifyChangeKeyValue( IntPtr hKey, int bWatchSubtree, int dwNotifyFilter, IntPtr hEvent, int fAsynchronus ); + [DllImport("advapi32.dll", EntryPoint = "RegNotifyChangeKeyValue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegNotifyChangeKeyValue(IntPtr hKey, int bWatchSubtree, int dwNotifyFilter, IntPtr hEvent, int fAsynchronus); - [DllImport( "advapi32.dll", EntryPoint = "RegOpenKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegOpenKey( IntPtr hKey, string lpSubKey, int phkResult ); + [DllImport("advapi32.dll", EntryPoint = "RegOpenKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegOpenKey(IntPtr hKey, string lpSubKey, int phkResult); - [DllImport( "advapi32.dll", EntryPoint = "RegOpenKeyEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegOpenKeyEx( IntPtr hKey, string lpSubKey, int ulOptions, int samDesired, int phkResult ); + [DllImport("advapi32.dll", EntryPoint = "RegOpenKeyEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegOpenKeyEx(IntPtr hKey, string lpSubKey, int ulOptions, int samDesired, int phkResult); - [DllImport( "advapi32.dll", EntryPoint = "RegQueryInfoKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegQueryInfoKey( IntPtr hKey, string lpClass, IntPtr lpcbClass, IntPtr lpReserved, IntPtr lpcSubKeys, IntPtr lpcbMaxSubKeyLen, IntPtr lpcbMaxClassLen, IntPtr lpcValues, IntPtr lpcbMaxValueNameLen, IntPtr lpcbMaxValueLen, IntPtr lpcbSecurityDescriptor, ref FILETIME lpftLastWriteTime ); + [DllImport("advapi32.dll", EntryPoint = "RegQueryInfoKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegQueryInfoKey(IntPtr hKey, string lpClass, IntPtr lpcbClass, IntPtr lpReserved, IntPtr lpcSubKeys, IntPtr lpcbMaxSubKeyLen, IntPtr lpcbMaxClassLen, IntPtr lpcValues, IntPtr lpcbMaxValueNameLen, IntPtr lpcbMaxValueLen, IntPtr lpcbSecurityDescriptor, ref FILETIME lpftLastWriteTime); - [DllImport( "advapi32.dll", EntryPoint = "RegQueryValue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegQueryValue( IntPtr hKey, string lpSubKey, string lpValue, IntPtr lpcbValue ); + [DllImport("advapi32.dll", EntryPoint = "RegQueryValue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegQueryValue(IntPtr hKey, string lpSubKey, string lpValue, IntPtr lpcbValue); - [DllImport( "advapi32.dll", EntryPoint = "RegQueryValueEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegQueryValueEx( IntPtr hKey, string lpValueName, IntPtr lpReserved, IntPtr lpType, IntPtr lpData, IntPtr lpcbData );// Note that if you declare the lpData parameter as String, you must pass it By Value. + [DllImport("advapi32.dll", EntryPoint = "RegQueryValueEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegQueryValueEx(IntPtr hKey, string lpValueName, IntPtr lpReserved, IntPtr lpType, IntPtr lpData, IntPtr lpcbData);// Note that if you declare the lpData parameter as String, you must pass it By Value. - [DllImport( "advapi32.dll", EntryPoint = "RegReplaceKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegReplaceKey( IntPtr hKey, string lpSubKey, string lpNewFile, string lpOldFile ); + [DllImport("advapi32.dll", EntryPoint = "RegReplaceKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegReplaceKey(IntPtr hKey, string lpSubKey, string lpNewFile, string lpOldFile); - [DllImport( "advapi32.dll", EntryPoint = "RegRestoreKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegRestoreKey( IntPtr hKey, string lpFile, int dwFlags ); + [DllImport("advapi32.dll", EntryPoint = "RegRestoreKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegRestoreKey(IntPtr hKey, string lpFile, int dwFlags); - [DllImport( "advapi32.dll", EntryPoint = "RegSaveKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegSaveKey( IntPtr hKey, string lpFile, ref SECURITY_ATTRIBUTES lpSecurityAttributes ); + [DllImport("advapi32.dll", EntryPoint = "RegSaveKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegSaveKey(IntPtr hKey, string lpFile, ref SECURITY_ATTRIBUTES lpSecurityAttributes); - [DllImport( "advapi32.dll", EntryPoint = "RegSetKeySecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegSetKeySecurity( IntPtr hKey, int SecurityInformation, SECURITY_DESCRIPTOR pSecurityDescriptor ); + [DllImport("advapi32.dll", EntryPoint = "RegSetKeySecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegSetKeySecurity(IntPtr hKey, int SecurityInformation, SECURITY_DESCRIPTOR pSecurityDescriptor); - [DllImport( "advapi32.dll", EntryPoint = "RegSetValue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegSetValue( IntPtr hKey, string lpSubKey, int dwType, string lpData, int cbData ); + [DllImport("advapi32.dll", EntryPoint = "RegSetValue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegSetValue(IntPtr hKey, string lpSubKey, int dwType, string lpData, int cbData); - [DllImport( "advapi32.dll", EntryPoint = "RegSetValueEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegSetValueEx( IntPtr hKey, string lpValueName, int Reserved, int dwType, IntPtr lpData, int cbData );// Note that if you declare the lpData parameter as String, you must pass it By Value. + [DllImport("advapi32.dll", EntryPoint = "RegSetValueEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegSetValueEx(IntPtr hKey, string lpValueName, int Reserved, int dwType, IntPtr lpData, int cbData);// Note that if you declare the lpData parameter as String, you must pass it By Value. - [DllImport( "advapi32.dll", EntryPoint = "RegUnLoadKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegUnLoadKey( IntPtr hKey, string lpSubKey ); + [DllImport("advapi32.dll", EntryPoint = "RegUnLoadKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegUnLoadKey(IntPtr hKey, string lpSubKey); - [DllImport( "advapi32.dll", EntryPoint = "InitiateSystemShutdown", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int InitiateSystemShutdown( string lpMachineName, string lpMessage, int dwTimeout, int bForceAppsClosed, int bRebootAfterShutdown ); + [DllImport("advapi32.dll", EntryPoint = "InitiateSystemShutdown", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int InitiateSystemShutdown(string lpMachineName, string lpMessage, int dwTimeout, int bForceAppsClosed, int bRebootAfterShutdown); - [DllImport( "advapi32.dll", EntryPoint = "AbortSystemShutdown", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int AbortSystemShutdown( string lpMachineName ); + [DllImport("advapi32.dll", EntryPoint = "AbortSystemShutdown", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int AbortSystemShutdown(string lpMachineName); // Service database names - public const string SERVICES_ACTIVE_DATABASE = unchecked( (string)( "SERVICESACTIVE" ) ); - public const string SERVICES_FAILED_DATABASE = unchecked( (string)( "SERVICESFAILED" ) ); + public const string SERVICES_ACTIVE_DATABASE = unchecked((string)("SERVICESACTIVE")); + public const string SERVICES_FAILED_DATABASE = unchecked((string)("SERVICESFAILED")); // Value to indicate no change to an optional parameter - public const int SERVICE_NO_CHANGE = unchecked( (int)( 0xFFFF ) ); + public const int SERVICE_NO_CHANGE = unchecked((int)(0xFFFF)); // Service State -- for Enum Requests (Bit Mask) - public const int SERVICE_ACTIVE = unchecked( (int)( 0x1 ) ); - public const int SERVICE_INACTIVE = unchecked( (int)( 0x2 ) ); - public const int SERVICE_STATE_ALL = unchecked( (int)( ( SERVICE_ACTIVE | SERVICE_INACTIVE ) ) ); + public const int SERVICE_ACTIVE = unchecked((int)(0x1)); + public const int SERVICE_INACTIVE = unchecked((int)(0x2)); + public const int SERVICE_STATE_ALL = unchecked((int)((SERVICE_ACTIVE | SERVICE_INACTIVE))); // Controls - public const int SERVICE_CONTROL_STOP = unchecked( (int)( 0x1 ) ); - public const int SERVICE_CONTROL_PAUSE = unchecked( (int)( 0x2 ) ); - public const int SERVICE_CONTROL_CONTINUE = unchecked( (int)( 0x3 ) ); - public const int SERVICE_CONTROL_INTERROGATE = unchecked( (int)( 0x4 ) ); - public const int SERVICE_CONTROL_SHUTDOWN = unchecked( (int)( 0x5 ) ); + public const int SERVICE_CONTROL_STOP = unchecked((int)(0x1)); + public const int SERVICE_CONTROL_PAUSE = unchecked((int)(0x2)); + public const int SERVICE_CONTROL_CONTINUE = unchecked((int)(0x3)); + public const int SERVICE_CONTROL_INTERROGATE = unchecked((int)(0x4)); + public const int SERVICE_CONTROL_SHUTDOWN = unchecked((int)(0x5)); // Service State -- for CurrentState - public const int SERVICE_STOPPED = unchecked( (int)( 0x1 ) ); - public const int SERVICE_START_PENDING = unchecked( (int)( 0x2 ) ); - public const int SERVICE_STOP_PENDING = unchecked( (int)( 0x3 ) ); - public const int SERVICE_RUNNING = unchecked( (int)( 0x4 ) ); - public const int SERVICE_CONTINUE_PENDING = unchecked( (int)( 0x5 ) ); - public const int SERVICE_PAUSE_PENDING = unchecked( (int)( 0x6 ) ); - public const int SERVICE_PAUSED = unchecked( (int)( 0x7 ) ); + public const int SERVICE_STOPPED = unchecked((int)(0x1)); + public const int SERVICE_START_PENDING = unchecked((int)(0x2)); + public const int SERVICE_STOP_PENDING = unchecked((int)(0x3)); + public const int SERVICE_RUNNING = unchecked((int)(0x4)); + public const int SERVICE_CONTINUE_PENDING = unchecked((int)(0x5)); + public const int SERVICE_PAUSE_PENDING = unchecked((int)(0x6)); + public const int SERVICE_PAUSED = unchecked((int)(0x7)); // Controls Accepted (Bit Mask) - public const int SERVICE_ACCEPT_STOP = unchecked( (int)( 0x1 ) ); - public const int SERVICE_ACCEPT_PAUSE_CONTINUE = unchecked( (int)( 0x2 ) ); - public const int SERVICE_ACCEPT_SHUTDOWN = unchecked( (int)( 0x4 ) ); + public const int SERVICE_ACCEPT_STOP = unchecked((int)(0x1)); + public const int SERVICE_ACCEPT_PAUSE_CONTINUE = unchecked((int)(0x2)); + public const int SERVICE_ACCEPT_SHUTDOWN = unchecked((int)(0x4)); // Service Control Manager object specific access types - public const int SC_MANAGER_CONNECT = unchecked( (int)( 0x1 ) ); - public const int SC_MANAGER_CREATE_SERVICE = unchecked( (int)( 0x2 ) ); - public const int SC_MANAGER_ENUMERATE_SERVICE = unchecked( (int)( 0x4 ) ); - public const int SC_MANAGER_LOCK = unchecked( (int)( 0x8 ) ); - public const int SC_MANAGER_QUERY_LOCK_STATUS = unchecked( (int)( 0x10 ) ); - public const int SC_MANAGER_MODIFY_BOOT_CONFIG = unchecked( (int)( 0x20 ) ); + public const int SC_MANAGER_CONNECT = unchecked((int)(0x1)); + public const int SC_MANAGER_CREATE_SERVICE = unchecked((int)(0x2)); + public const int SC_MANAGER_ENUMERATE_SERVICE = unchecked((int)(0x4)); + public const int SC_MANAGER_LOCK = unchecked((int)(0x8)); + public const int SC_MANAGER_QUERY_LOCK_STATUS = unchecked((int)(0x10)); + public const int SC_MANAGER_MODIFY_BOOT_CONFIG = unchecked((int)(0x20)); - public const int SC_MANAGER_ALL_ACCESS = unchecked( (int)( ( STANDARD_RIGHTS_REQUIRED | SC_MANAGER_CONNECT | SC_MANAGER_CREATE_SERVICE | SC_MANAGER_ENUMERATE_SERVICE | SC_MANAGER_LOCK | SC_MANAGER_QUERY_LOCK_STATUS | SC_MANAGER_MODIFY_BOOT_CONFIG ) ) ); + public const int SC_MANAGER_ALL_ACCESS = unchecked((int)((STANDARD_RIGHTS_REQUIRED | SC_MANAGER_CONNECT | SC_MANAGER_CREATE_SERVICE | SC_MANAGER_ENUMERATE_SERVICE | SC_MANAGER_LOCK | SC_MANAGER_QUERY_LOCK_STATUS | SC_MANAGER_MODIFY_BOOT_CONFIG))); // Service object specific access type - public const int SERVICE_QUERY_CONFIG = unchecked( (int)( 0x1 ) ); - public const int SERVICE_CHANGE_CONFIG = unchecked( (int)( 0x2 ) ); - public const int SERVICE_QUERY_STATUS = unchecked( (int)( 0x4 ) ); - public const int SERVICE_ENUMERATE_DEPENDENTS = unchecked( (int)( 0x8 ) ); - public const int SERVICE_START = unchecked( (int)( 0x10 ) ); - public const int SERVICE_STOP = unchecked( (int)( 0x20 ) ); - public const int SERVICE_PAUSE_CONTINUE = unchecked( (int)( 0x40 ) ); - public const int SERVICE_INTERROGATE = unchecked( (int)( 0x80 ) ); - public const int SERVICE_USER_DEFINED_CONTROL = unchecked( (int)( 0x100 ) ); + public const int SERVICE_QUERY_CONFIG = unchecked((int)(0x1)); + public const int SERVICE_CHANGE_CONFIG = unchecked((int)(0x2)); + public const int SERVICE_QUERY_STATUS = unchecked((int)(0x4)); + public const int SERVICE_ENUMERATE_DEPENDENTS = unchecked((int)(0x8)); + public const int SERVICE_START = unchecked((int)(0x10)); + public const int SERVICE_STOP = unchecked((int)(0x20)); + public const int SERVICE_PAUSE_CONTINUE = unchecked((int)(0x40)); + public const int SERVICE_INTERROGATE = unchecked((int)(0x80)); + public const int SERVICE_USER_DEFINED_CONTROL = unchecked((int)(0x100)); - public const int SERVICE_ALL_ACCESS = unchecked( (int)( ( STANDARD_RIGHTS_REQUIRED | SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG | SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_START | SERVICE_STOP | SERVICE_PAUSE_CONTINUE | SERVICE_INTERROGATE | SERVICE_USER_DEFINED_CONTROL ) ) ); + public const int SERVICE_ALL_ACCESS = unchecked((int)((STANDARD_RIGHTS_REQUIRED | SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG | SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_START | SERVICE_STOP | SERVICE_PAUSE_CONTINUE | SERVICE_INTERROGATE | SERVICE_USER_DEFINED_CONTROL))); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SERVICE_STATUS { public int dwServiceType; @@ -17079,7 +17079,7 @@ public struct SERVICE_STATUS public int dwWaitHint; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ENUM_SERVICE_STATUS { public string lpServiceName; @@ -17087,7 +17087,7 @@ public struct ENUM_SERVICE_STATUS public SERVICE_STATUS ServiceStatus; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct QUERY_SERVICE_LOCK_STATUS { public int fIsLocked; @@ -17095,7 +17095,7 @@ public struct QUERY_SERVICE_LOCK_STATUS public int dwLockDuration; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct QUERY_SERVICE_CONFIG { public int dwServiceType; @@ -17109,7 +17109,7 @@ public struct QUERY_SERVICE_CONFIG public string lpDisplayName; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SERVICE_TABLE_ENTRY { public string lpServiceName; @@ -17131,7 +17131,7 @@ public struct SERVICE_TABLE_ENTRY // Character to designate that a name is a group // - public const string SC_GROUP_IDENTIFIER = unchecked( (string)( "+" ) ); + public const string SC_GROUP_IDENTIFIER = unchecked((string)("+")); // Prototype for the Service Control Handler Function @@ -17140,76 +17140,76 @@ public struct SERVICE_TABLE_ENTRY // ///////////////////////////////////////////////////////////////////////// - [DllImport( "advapi32.dll", EntryPoint = "ChangeServiceConfig", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ChangeServiceConfig( IntPtr hService, int dwServiceType, int dwStartType, int dwErrorControl, string lpBinaryPathName, string lpLoadOrderGroup, IntPtr lpdwTagId, string lpDependencies, string lpServiceStartName, string lpPassword, string lpDisplayName ); + [DllImport("advapi32.dll", EntryPoint = "ChangeServiceConfig", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ChangeServiceConfig(IntPtr hService, int dwServiceType, int dwStartType, int dwErrorControl, string lpBinaryPathName, string lpLoadOrderGroup, IntPtr lpdwTagId, string lpDependencies, string lpServiceStartName, string lpPassword, string lpDisplayName); - [DllImport( "advapi32.dll", EntryPoint = "CloseServiceHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CloseServiceHandle( IntPtr hSCObject ); + [DllImport("advapi32.dll", EntryPoint = "CloseServiceHandle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CloseServiceHandle(IntPtr hSCObject); - [DllImport( "advapi32.dll", EntryPoint = "ControlService", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ControlService( IntPtr hService, int dwControl, ref SERVICE_STATUS lpServiceStatus ); + [DllImport("advapi32.dll", EntryPoint = "ControlService", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ControlService(IntPtr hService, int dwControl, ref SERVICE_STATUS lpServiceStatus); - [DllImport( "advapi32.dll", EntryPoint = "CreateService", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateService( IntPtr hSCManager, string lpServiceName, string lpDisplayName, int dwDesiredAccess, int dwServiceType, int dwStartType, int dwErrorControl, string lpBinaryPathName, string lpLoadOrderGroup, IntPtr lpdwTagId, string lpDependencies, string lp, string lpPassword ); + [DllImport("advapi32.dll", EntryPoint = "CreateService", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateService(IntPtr hSCManager, string lpServiceName, string lpDisplayName, int dwDesiredAccess, int dwServiceType, int dwStartType, int dwErrorControl, string lpBinaryPathName, string lpLoadOrderGroup, IntPtr lpdwTagId, string lpDependencies, string lp, string lpPassword); - [DllImport( "advapi32.dll", EntryPoint = "DeleteService", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeleteService( IntPtr hService ); + [DllImport("advapi32.dll", EntryPoint = "DeleteService", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeleteService(IntPtr hService); - [DllImport( "advapi32.dll", EntryPoint = "EnumDependentServices", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumDependentServices( IntPtr hService, int dwServiceState, ref ENUM_SERVICE_STATUS lpServices, int cbBufSize, int pcbBytesNeeded, IntPtr lpServicesReturned ); + [DllImport("advapi32.dll", EntryPoint = "EnumDependentServices", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumDependentServices(IntPtr hService, int dwServiceState, ref ENUM_SERVICE_STATUS lpServices, int cbBufSize, int pcbBytesNeeded, IntPtr lpServicesReturned); - [DllImport( "advapi32.dll", EntryPoint = "EnumServicesStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumServicesStatus( IntPtr hSCManager, int dwServiceType, int dwServiceState, ref ENUM_SERVICE_STATUS lpServices, int cbBufSize, int pcbBytesNeeded, IntPtr lpServicesReturned, IntPtr lpResumeHandle ); + [DllImport("advapi32.dll", EntryPoint = "EnumServicesStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumServicesStatus(IntPtr hSCManager, int dwServiceType, int dwServiceState, ref ENUM_SERVICE_STATUS lpServices, int cbBufSize, int pcbBytesNeeded, IntPtr lpServicesReturned, IntPtr lpResumeHandle); - [DllImport( "advapi32.dll", EntryPoint = "GetServiceKeyName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetServiceKeyName( IntPtr hSCManager, string lpDisplayName, string lpServiceName, IntPtr lpcchBuffer ); + [DllImport("advapi32.dll", EntryPoint = "GetServiceKeyName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetServiceKeyName(IntPtr hSCManager, string lpDisplayName, string lpServiceName, IntPtr lpcchBuffer); - [DllImport( "advapi32.dll", EntryPoint = "GetServiceDisplayName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetServiceDisplayName( IntPtr hSCManager, string lpServiceName, string lpDisplayName, IntPtr lpcchBuffer ); + [DllImport("advapi32.dll", EntryPoint = "GetServiceDisplayName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetServiceDisplayName(IntPtr hSCManager, string lpServiceName, string lpDisplayName, IntPtr lpcchBuffer); - [DllImport( "advapi32.dll", EntryPoint = "LockServiceDatabase", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LockServiceDatabase( IntPtr hSCManager ); + [DllImport("advapi32.dll", EntryPoint = "LockServiceDatabase", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LockServiceDatabase(IntPtr hSCManager); - [DllImport( "advapi32.dll", EntryPoint = "NotifyBootConfigStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int NotifyBootConfigStatus( int BootAcceptable ); + [DllImport("advapi32.dll", EntryPoint = "NotifyBootConfigStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int NotifyBootConfigStatus(int BootAcceptable); - [DllImport( "advapi32.dll", EntryPoint = "OpenSCManager", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenSCManager( string lpMachineName, string lpDatabaseName, int dwDesiredAccess ); + [DllImport("advapi32.dll", EntryPoint = "OpenSCManager", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenSCManager(string lpMachineName, string lpDatabaseName, int dwDesiredAccess); - [DllImport( "advapi32.dll", EntryPoint = "OpenService", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenService( IntPtr hSCManager, string lpServiceName, int dwDesiredAccess ); + [DllImport("advapi32.dll", EntryPoint = "OpenService", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenService(IntPtr hSCManager, string lpServiceName, int dwDesiredAccess); - [DllImport( "advapi32.dll", EntryPoint = "QueryServiceConfig", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int QueryServiceConfig( IntPtr hService, ref QUERY_SERVICE_CONFIG lpServiceConfig, int cbBufSize, int pcbBytesNeeded ); + [DllImport("advapi32.dll", EntryPoint = "QueryServiceConfig", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int QueryServiceConfig(IntPtr hService, ref QUERY_SERVICE_CONFIG lpServiceConfig, int cbBufSize, int pcbBytesNeeded); - [DllImport( "advapi32.dll", EntryPoint = "QueryServiceLockStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int QueryServiceLockStatus( IntPtr hSCManager, ref QUERY_SERVICE_LOCK_STATUS lpLockStatus, int cbBufSize, int pcbBytesNeeded ); + [DllImport("advapi32.dll", EntryPoint = "QueryServiceLockStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int QueryServiceLockStatus(IntPtr hSCManager, ref QUERY_SERVICE_LOCK_STATUS lpLockStatus, int cbBufSize, int pcbBytesNeeded); - [DllImport( "advapi32.dll", EntryPoint = "QueryServiceObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int QueryServiceObjectSecurity( IntPtr hService, int dwSecurityInformation, IntPtr lpSecurityDescriptor, int cbBufSize, int pcbBytesNeeded ); + [DllImport("advapi32.dll", EntryPoint = "QueryServiceObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int QueryServiceObjectSecurity(IntPtr hService, int dwSecurityInformation, IntPtr lpSecurityDescriptor, int cbBufSize, int pcbBytesNeeded); - [DllImport( "advapi32.dll", EntryPoint = "QueryServiceStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int QueryServiceStatus( IntPtr hService, ref SERVICE_STATUS lpServiceStatus ); + [DllImport("advapi32.dll", EntryPoint = "QueryServiceStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int QueryServiceStatus(IntPtr hService, ref SERVICE_STATUS lpServiceStatus); - [DllImport( "advapi32.dll", EntryPoint = "RegisterServiceCtrlHandler", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegisterServiceCtrlHandler( string lpServiceName, IntPtr lpHandlerProc ); + [DllImport("advapi32.dll", EntryPoint = "RegisterServiceCtrlHandler", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegisterServiceCtrlHandler(string lpServiceName, IntPtr lpHandlerProc); - [DllImport( "advapi32.dll", EntryPoint = "SetServiceObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetServiceObjectSecurity( IntPtr hService, int dwSecurityInformation, IntPtr lpSecurityDescriptor ); + [DllImport("advapi32.dll", EntryPoint = "SetServiceObjectSecurity", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetServiceObjectSecurity(IntPtr hService, int dwSecurityInformation, IntPtr lpSecurityDescriptor); - [DllImport( "advapi32.dll", EntryPoint = "SetServiceStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetServiceStatus( IntPtr hServiceStatus, ref SERVICE_STATUS lpServiceStatus ); + [DllImport("advapi32.dll", EntryPoint = "SetServiceStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetServiceStatus(IntPtr hServiceStatus, ref SERVICE_STATUS lpServiceStatus); - [DllImport( "advapi32.dll", EntryPoint = "StartServiceCtrlDispatcher", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int StartServiceCtrlDispatcher( ref SERVICE_TABLE_ENTRY lpServiceStartTable ); + [DllImport("advapi32.dll", EntryPoint = "StartServiceCtrlDispatcher", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int StartServiceCtrlDispatcher(ref SERVICE_TABLE_ENTRY lpServiceStartTable); - [DllImport( "advapi32.dll", EntryPoint = "StartService", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int StartService( IntPtr hService, int dwNumServiceArgs, IntPtr lpServiceArgVectors ); + [DllImport("advapi32.dll", EntryPoint = "StartService", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int StartService(IntPtr hService, int dwNumServiceArgs, IntPtr lpServiceArgVectors); - [DllImport( "advapi32.dll", EntryPoint = "UnlockServiceDatabase", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int UnlockServiceDatabase( object ScLock ); + [DllImport("advapi32.dll", EntryPoint = "UnlockServiceDatabase", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int UnlockServiceDatabase(object ScLock); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct LARGE_INTEGER { public int lowpart; @@ -17219,13 +17219,13 @@ public struct LARGE_INTEGER // Section for Performance Monitor data - public const int PERF_DATA_VERSION = unchecked( (int)( 1 ) ); - public const int PERF_DATA_REVISION = unchecked( (int)( 1 ) ); + public const int PERF_DATA_VERSION = unchecked((int)(1)); + public const int PERF_DATA_REVISION = unchecked((int)(1)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PERF_DATA_BLOCK { - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = 4 )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)] public string Signature; public int LittleEndian; public int Version; @@ -17242,7 +17242,7 @@ public struct PERF_DATA_BLOCK public int SystemNameOffset; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PERF_OBJECT_TYPE { public int TotalByteLength; @@ -17261,162 +17261,162 @@ public struct PERF_OBJECT_TYPE public LARGE_INTEGER PerfFreq; } - public const int PERF_NO_INSTANCES = unchecked( (int)( -1 ) );// no instances + public const int PERF_NO_INSTANCES = unchecked((int)(-1));// no instances // The counter type is the "or" of the following values as described below // // select one of the following to indicate the counter's data size - public const int PERF_SIZE_DWORD = unchecked( (int)( 0x0 ) ); - public const int PERF_SIZE_LARGE = unchecked( (int)( 0x100 ) ); - public const int PERF_SIZE_ZERO = unchecked( (int)( 0x200 ) );// for Zero Length fields - public const int PERF_SIZE_VARIABLE_LEN = unchecked( (int)( 0x300 ) );// length is in CounterLength field of Counter Definition struct + public const int PERF_SIZE_DWORD = unchecked((int)(0x0)); + public const int PERF_SIZE_LARGE = unchecked((int)(0x100)); + public const int PERF_SIZE_ZERO = unchecked((int)(0x200));// for Zero Length fields + public const int PERF_SIZE_VARIABLE_LEN = unchecked((int)(0x300));// length is in CounterLength field of Counter Definition struct // select one of the following values to indicate the counter field usage - public const int PERF_TYPE_NUMBER = unchecked( (int)( 0x0 ) );// a number (not a counter) - public const int PERF_TYPE_COUNTER = unchecked( (int)( 0x400 ) );// an increasing numeric value - public const int PERF_TYPE_TEXT = unchecked( (int)( 0x800 ) );// a text field - public const int PERF_TYPE_ZERO = unchecked( (int)( 0xC00 ) );// displays a zero + public const int PERF_TYPE_NUMBER = unchecked((int)(0x0));// a number (not a counter) + public const int PERF_TYPE_COUNTER = unchecked((int)(0x400));// an increasing numeric value + public const int PERF_TYPE_TEXT = unchecked((int)(0x800));// a text field + public const int PERF_TYPE_ZERO = unchecked((int)(0xC00));// displays a zero // If the PERF_TYPE_NUMBER field was selected, then select one of the // following to describe the Number - public const int PERF_NUMBER_HEX = unchecked( (int)( 0x0 ) );// display as HEX value - public const int PERF_NUMBER_DECIMAL = unchecked( (int)( 0x10000 ) );// display as a decimal integer - public const int PERF_NUMBER_DEC_1000 = unchecked( (int)( 0x20000 ) );// display as a decimal/1000 + public const int PERF_NUMBER_HEX = unchecked((int)(0x0));// display as HEX value + public const int PERF_NUMBER_DECIMAL = unchecked((int)(0x10000));// display as a decimal integer + public const int PERF_NUMBER_DEC_1000 = unchecked((int)(0x20000));// display as a decimal/1000 // // If the PERF_TYPE_COUNTER value was selected then select one of the // following to indicate the type of counter - public const int PERF_COUNTER_VALUE = unchecked( (int)( 0x0 ) );// display counter value - public const int PERF_COUNTER_RATE = unchecked( (int)( 0x10000 ) );// divide ctr / delta time - public const int PERF_COUNTER_FRACTION = unchecked( (int)( 0x20000 ) );// divide ctr / base - public const int PERF_COUNTER_BASE = unchecked( (int)( 0x30000 ) );// base value used in fractions - public const int PERF_COUNTER_ELAPSED = unchecked( (int)( 0x40000 ) );// subtract counter from current time - public const int PERF_COUNTER_QUEUELEN = unchecked( (int)( 0x50000 ) );// Use Queuelen processing func. - public const int PERF_COUNTER_HISTOGRAM = unchecked( (int)( 0x60000 ) );// Counter begins or ends a histogram + public const int PERF_COUNTER_VALUE = unchecked((int)(0x0));// display counter value + public const int PERF_COUNTER_RATE = unchecked((int)(0x10000));// divide ctr / delta time + public const int PERF_COUNTER_FRACTION = unchecked((int)(0x20000));// divide ctr / base + public const int PERF_COUNTER_BASE = unchecked((int)(0x30000));// base value used in fractions + public const int PERF_COUNTER_ELAPSED = unchecked((int)(0x40000));// subtract counter from current time + public const int PERF_COUNTER_QUEUELEN = unchecked((int)(0x50000));// Use Queuelen processing func. + public const int PERF_COUNTER_HISTOGRAM = unchecked((int)(0x60000));// Counter begins or ends a histogram // If the PERF_TYPE_TEXT value was selected, then select one of the // following to indicate the type of TEXT data. - public const int PERF_TEXT_UNICODE = unchecked( (int)( 0x0 ) );// type of text in text field - public const int PERF_TEXT_ASCII = unchecked( (int)( 0x10000 ) );// ASCII using the CodePage field + public const int PERF_TEXT_UNICODE = unchecked((int)(0x0));// type of text in text field + public const int PERF_TEXT_ASCII = unchecked((int)(0x10000));// ASCII using the CodePage field // Timer SubTypes - public const int PERF_TIMER_TICK = unchecked( (int)( 0x0 ) );// use system perf. freq for base - public const int PERF_TIMER_100NS = unchecked( (int)( 0x100000 ) );// use 100 NS timer time base units - public const int PERF_OBJECT_TIMER = unchecked( (int)( 0x200000 ) );// use the object timer freq + public const int PERF_TIMER_TICK = unchecked((int)(0x0));// use system perf. freq for base + public const int PERF_TIMER_100NS = unchecked((int)(0x100000));// use 100 NS timer time base units + public const int PERF_OBJECT_TIMER = unchecked((int)(0x200000));// use the object timer freq // Any types that have calculations performed can use one or more of // the following calculation modification flags listed here - public const int PERF_DELTA_COUNTER = unchecked( (int)( 0x400000 ) );// compute difference first - public const int PERF_DELTA_BASE = unchecked( (int)( 0x800000 ) );// compute base diff as well - public const int PERF_INVERSE_COUNTER = unchecked( (int)( 0x1000000 ) );// show as 1.00-value (assumes: - public const int PERF_MULTI_COUNTER = unchecked( (int)( 0x2000000 ) );// sum of multiple instances + public const int PERF_DELTA_COUNTER = unchecked((int)(0x400000));// compute difference first + public const int PERF_DELTA_BASE = unchecked((int)(0x800000));// compute base diff as well + public const int PERF_INVERSE_COUNTER = unchecked((int)(0x1000000));// show as 1.00-value (assumes: + public const int PERF_MULTI_COUNTER = unchecked((int)(0x2000000));// sum of multiple instances // Select one of the following values to indicate the display suffix (if any) - public const int PERF_DISPLAY_NO_SUFFIX = unchecked( (int)( 0x0 ) );// no suffix - public const int PERF_DISPLAY_PER_SEC = unchecked( (int)( 0x10000000 ) );// "/sec" - public const int PERF_DISPLAY_PERCENT = unchecked( (int)( 0x20000000 ) );// "%" - public const int PERF_DISPLAY_SECONDS = unchecked( (int)( 0x30000000 ) );// "secs" - public const int PERF_DISPLAY_NOSHOW = unchecked( (int)( 0x40000000 ) );// value is not displayed + public const int PERF_DISPLAY_NO_SUFFIX = unchecked((int)(0x0));// no suffix + public const int PERF_DISPLAY_PER_SEC = unchecked((int)(0x10000000));// "/sec" + public const int PERF_DISPLAY_PERCENT = unchecked((int)(0x20000000));// "%" + public const int PERF_DISPLAY_SECONDS = unchecked((int)(0x30000000));// "secs" + public const int PERF_DISPLAY_NOSHOW = unchecked((int)(0x40000000));// value is not displayed // Predefined counter types // 32-bit Counter. Divide delta by delta time. Display suffix: "/sec" - public const int PERF_COUNTER_COUNTER = unchecked( (int)( ( PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_PER_SEC ) ) ); + public const int PERF_COUNTER_COUNTER = unchecked((int)((PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_PER_SEC))); // 64-bit Timer. Divide delta by delta time. Display suffix: "%" - public const int PERF_COUNTER_TIMER = unchecked( (int)( ( PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT ) ) ); + public const int PERF_COUNTER_TIMER = unchecked((int)((PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT))); // Queue Length Space-Time Product. Divide delta by delta time. No Display Suffix. - public const int PERF_COUNTER_QUEUELEN_TYPE = unchecked( (int)( ( PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_QUEUELEN | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX ) ) ); + public const int PERF_COUNTER_QUEUELEN_TYPE = unchecked((int)((PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_QUEUELEN | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX))); // 64-bit Counter. Divide delta by delta time. Display Suffix: "/sec" - public const int PERF_COUNTER_BULK_COUNT = unchecked( (int)( ( PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_PER_SEC ) ) ); + public const int PERF_COUNTER_BULK_COUNT = unchecked((int)((PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_PER_SEC))); // Indicates the counter is not a counter but rather Unicode text Display as text. - public const int PERF_COUNTER_TEXT = unchecked( (int)( ( PERF_SIZE_VARIABLE_LEN | PERF_TYPE_TEXT | PERF_TEXT_UNICODE | PERF_DISPLAY_NO_SUFFIX ) ) ); + public const int PERF_COUNTER_TEXT = unchecked((int)((PERF_SIZE_VARIABLE_LEN | PERF_TYPE_TEXT | PERF_TEXT_UNICODE | PERF_DISPLAY_NO_SUFFIX))); // Indicates the data is a counter which should not be // time averaged on display (such as an error counter on a serial line) // Display as is. No Display Suffix. - public const int PERF_COUNTER_RAWCOUNT = unchecked( (int)( ( PERF_SIZE_DWORD | PERF_TYPE_NUMBER | PERF_NUMBER_DECIMAL | PERF_DISPLAY_NO_SUFFIX ) ) ); + public const int PERF_COUNTER_RAWCOUNT = unchecked((int)((PERF_SIZE_DWORD | PERF_TYPE_NUMBER | PERF_NUMBER_DECIMAL | PERF_DISPLAY_NO_SUFFIX))); // A count which is either 1 or 0 on each sampling interrupt (% busy) // Divide delta by delta base. Display Suffix: "%" - public const int PERF_SAMPLE_FRACTION = unchecked( (int)( ( PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION | PERF_DELTA_COUNTER | PERF_DELTA_BASE | PERF_DISPLAY_PERCENT ) ) ); + public const int PERF_SAMPLE_FRACTION = unchecked((int)((PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION | PERF_DELTA_COUNTER | PERF_DELTA_BASE | PERF_DISPLAY_PERCENT))); // A count which is sampled on each sampling interrupt (queue length) // Divide delta by delta time. No Display Suffix. - public const int PERF_SAMPLE_COUNTER = unchecked( (int)( ( PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX ) ) ); + public const int PERF_SAMPLE_COUNTER = unchecked((int)((PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX))); // A label: no data is associated with this counter (it has 0 length) // Do not display. - public const int PERF_COUNTER_NODATA = unchecked( (int)( ( PERF_SIZE_ZERO | PERF_DISPLAY_NOSHOW ) ) ); + public const int PERF_COUNTER_NODATA = unchecked((int)((PERF_SIZE_ZERO | PERF_DISPLAY_NOSHOW))); // 64-bit Timer inverse (e.g., idle is measured, but display busy As Integer) // Display 100 - delta divided by delta time. Display suffix: "%" - public const int PERF_COUNTER_TIMER_INV = unchecked( (int)( ( PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_INVERSE_COUNTER | PERF_DISPLAY_PERCENT ) ) ); + public const int PERF_COUNTER_TIMER_INV = unchecked((int)((PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_INVERSE_COUNTER | PERF_DISPLAY_PERCENT))); // The divisor for a sample, used with the previous counter to form a // sampled %. You must check for >0 before dividing by this! This // counter will directly follow the numerator counter. It should not // be displayed to the user. - public const int PERF_SAMPLE_BASE = unchecked( (int)( ( PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_BASE | PERF_DISPLAY_NOSHOW | 0x1 ) ) );// for compatibility with pre-beta versions + public const int PERF_SAMPLE_BASE = unchecked((int)((PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_BASE | PERF_DISPLAY_NOSHOW | 0x1)));// for compatibility with pre-beta versions // A timer which, when divided by an average base, produces a time // in seconds which is the average time of some operation. This // timer times total operations, and the base is the number of opera- // tions. Display Suffix: "sec" - public const int PERF_AVERAGE_TIMER = unchecked( (int)( ( PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION | PERF_DISPLAY_SECONDS ) ) ); + public const int PERF_AVERAGE_TIMER = unchecked((int)((PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION | PERF_DISPLAY_SECONDS))); // Used as the denominator in the computation of time or count // averages. Must directly follow the numerator counter. Not dis- // played to the user. - public const int PERF_AVERAGE_BASE = unchecked( (int)( ( PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_BASE | PERF_DISPLAY_NOSHOW | 0x2 ) ) );// for compatibility with pre-beta versions + public const int PERF_AVERAGE_BASE = unchecked((int)((PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_BASE | PERF_DISPLAY_NOSHOW | 0x2)));// for compatibility with pre-beta versions // A bulk count which, when divided (typically) by the number of // operations, gives (typically) the number of bytes per operation. // No Display Suffix. - public const int PERF_AVERAGE_BULK = unchecked( (int)( ( PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION | PERF_DISPLAY_NOSHOW ) ) ); + public const int PERF_AVERAGE_BULK = unchecked((int)((PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION | PERF_DISPLAY_NOSHOW))); // 64-bit Timer in 100 nsec units. Display delta divided by // delta time. Display suffix: "%" - public const int PERF_100NSEC_TIMER = unchecked( (int)( ( PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT ) ) ); + public const int PERF_100NSEC_TIMER = unchecked((int)((PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT))); // 64-bit Timer inverse (e.g., idle is measured, but display busy As Integer) // Display 100 - delta divided by delta time. Display suffix: "%" - public const int PERF_100NSEC_TIMER_INV = unchecked( (int)( ( PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_DELTA_COUNTER | PERF_INVERSE_COUNTER | PERF_DISPLAY_PERCENT ) ) ); + public const int PERF_100NSEC_TIMER_INV = unchecked((int)((PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_DELTA_COUNTER | PERF_INVERSE_COUNTER | PERF_DISPLAY_PERCENT))); // 64-bit Timer. Divide delta by delta time. Display suffix: "%" // Timer for multiple instances, so result can exceed 100%. - public const int PERF_COUNTER_MULTI_TIMER = unchecked( (int)( ( PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_DELTA_COUNTER | PERF_TIMER_TICK | PERF_MULTI_COUNTER | PERF_DISPLAY_PERCENT ) ) ); + public const int PERF_COUNTER_MULTI_TIMER = unchecked((int)((PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_DELTA_COUNTER | PERF_TIMER_TICK | PERF_MULTI_COUNTER | PERF_DISPLAY_PERCENT))); // 64-bit Timer inverse (e.g., idle is measured, but display busy As Integer) // Display 100 _MULTI_BASE - delta divided by delta time. // Display suffix: "%" Timer for multiple instances, so result // can exceed 100%. Followed by a counter of type _MULTI_BASE. - public const int PERF_COUNTER_MULTI_TIMER_INV = unchecked( (int)( ( PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_DELTA_COUNTER | PERF_MULTI_COUNTER | PERF_TIMER_TICK | PERF_INVERSE_COUNTER | PERF_DISPLAY_PERCENT ) ) ); + public const int PERF_COUNTER_MULTI_TIMER_INV = unchecked((int)((PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_DELTA_COUNTER | PERF_MULTI_COUNTER | PERF_TIMER_TICK | PERF_INVERSE_COUNTER | PERF_DISPLAY_PERCENT))); // Number of instances to which the preceding _MULTI_..._INV counter // applies. Used as a factor to get the percentage. - public const int PERF_COUNTER_MULTI_BASE = unchecked( (int)( ( PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_BASE | PERF_MULTI_COUNTER | PERF_DISPLAY_NOSHOW ) ) ); + public const int PERF_COUNTER_MULTI_BASE = unchecked((int)((PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_BASE | PERF_MULTI_COUNTER | PERF_DISPLAY_NOSHOW))); // 64-bit Timer in 100 nsec units. Display delta divided by delta time. // Display suffix: "%" Timer for multiple instances, so result can exceed 100%. - public const int PERF_100NSEC_MULTI_TIMER = unchecked( (int)( ( PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_DELTA_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_MULTI_COUNTER | PERF_DISPLAY_PERCENT ) ) ); + public const int PERF_100NSEC_MULTI_TIMER = unchecked((int)((PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_DELTA_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_MULTI_COUNTER | PERF_DISPLAY_PERCENT))); // 64-bit Timer inverse (e.g., idle is measured, but display busy As Integer) // Display 100 _MULTI_BASE - delta divided by delta time. // Display suffix: "%" Timer for multiple instances, so result // can exceed 100%. Followed by a counter of type _MULTI_BASE. - public const int PERF_100NSEC_MULTI_TIMER_INV = unchecked( (int)( ( PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_DELTA_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_MULTI_COUNTER | PERF_INVERSE_COUNTER | PERF_DISPLAY_PERCENT ) ) ); + public const int PERF_100NSEC_MULTI_TIMER_INV = unchecked((int)((PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_DELTA_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_MULTI_COUNTER | PERF_INVERSE_COUNTER | PERF_DISPLAY_PERCENT))); // Indicates the data is a fraction of the following counter which // should not be time averaged on display (such as free space over // total space.) Display as is. Display the quotient as "%". - public const int PERF_RAW_FRACTION = unchecked( (int)( ( PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION | PERF_DISPLAY_PERCENT ) ) ); + public const int PERF_RAW_FRACTION = unchecked((int)((PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION | PERF_DISPLAY_PERCENT))); // Indicates the data is a base for the preceding counter which should // not be time averaged on display (such as free space over total space.) - public const int PERF_RAW_BASE = unchecked( (int)( ( PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_BASE | PERF_DISPLAY_NOSHOW | 0x3 ) ) );// for compatibility with pre-beta versions + public const int PERF_RAW_BASE = unchecked((int)((PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_BASE | PERF_DISPLAY_NOSHOW | 0x3)));// for compatibility with pre-beta versions // The data collected in this counter is actually the start time of the // item being measured. For display, this data is subtracted from the @@ -17425,21 +17425,21 @@ public struct PERF_OBJECT_TYPE // the sample time as indicated by the PERF_OBJECT_TIMER bit and the // difference is scaled by the PerfFreq of the Object to convert the time // units into seconds. - public const int PERF_ELAPSED_TIME = unchecked( (int)( ( PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_ELAPSED | PERF_OBJECT_TIMER | PERF_DISPLAY_SECONDS ) ) ); + public const int PERF_ELAPSED_TIME = unchecked((int)((PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_ELAPSED | PERF_OBJECT_TIMER | PERF_DISPLAY_SECONDS))); // The following counter type can be used with the preceding types to // define a range of values to be displayed in a histogram. - public const int PERF_COUNTER_HISTOGRAM_TYPE = unchecked( (int)( 0x80000000 ) );// Counter begins or ends a histogram + public const int PERF_COUNTER_HISTOGRAM_TYPE = unchecked((int)(0x80000000));// Counter begins or ends a histogram // The following are used to determine the level of detail associated // with the counter. The user will be setting the level of detail // that should be displayed at any given time. - public const int PERF_DETAIL_NOVICE = unchecked( (int)( 100 ) );// The uninformed can understand it - public const int PERF_DETAIL_ADVANCED = unchecked( (int)( 200 ) );// For the advanced user - public const int PERF_DETAIL_EXPERT = unchecked( (int)( 300 ) );// For the expert user - public const int PERF_DETAIL_WIZARD = unchecked( (int)( 400 ) );// For the system designer + public const int PERF_DETAIL_NOVICE = unchecked((int)(100));// The uninformed can understand it + public const int PERF_DETAIL_ADVANCED = unchecked((int)(200));// For the advanced user + public const int PERF_DETAIL_EXPERT = unchecked((int)(300));// For the expert user + public const int PERF_DETAIL_WIZARD = unchecked((int)(400));// For the system designer - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PERF_COUNTER_DEFINITION { public int ByteLength; @@ -17454,9 +17454,9 @@ public struct PERF_COUNTER_DEFINITION public int CounterOffset; } - public const int PERF_NO_UNIQUE_ID = unchecked( (int)( -1 ) ); + public const int PERF_NO_UNIQUE_ID = unchecked((int)(-1)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PERF_INSTANCE_DEFINITION { public int ByteLength; @@ -17467,90 +17467,90 @@ public struct PERF_INSTANCE_DEFINITION public int NameLength; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PERF_COUNTER_BLOCK { public int ByteLength; } - public const int CDERR_DIALOGFAILURE = unchecked( (int)( 0xFFFF ) ); - - public const int CDERR_GENERALCODES = unchecked( (int)( 0x0 ) ); - public const int CDERR_STRUCTSIZE = unchecked( (int)( 0x1 ) ); - public const int CDERR_INITIALIZATION = unchecked( (int)( 0x2 ) ); - public const int CDERR_NOTEMPLATE = unchecked( (int)( 0x3 ) ); - public const int CDERR_NOHINSTANCE = unchecked( (int)( 0x4 ) ); - public const int CDERR_LOADSTRFAILURE = unchecked( (int)( 0x5 ) ); - public const int CDERR_FINDRESFAILURE = unchecked( (int)( 0x6 ) ); - public const int CDERR_LOADRESFAILURE = unchecked( (int)( 0x7 ) ); - public const int CDERR_LOCKRESFAILURE = unchecked( (int)( 0x8 ) ); - public const int CDERR_MEMALLOCFAILURE = unchecked( (int)( 0x9 ) ); - public const int CDERR_MEMLOCKFAILURE = unchecked( (int)( 0xA ) ); - public const int CDERR_NOHOOK = unchecked( (int)( 0xB ) ); - public const int CDERR_REGISTERMSGFAIL = unchecked( (int)( 0xC ) ); - - public const int PDERR_PRINTERCODES = unchecked( (int)( 0x1000 ) ); - public const int PDERR_SETUPFAILURE = unchecked( (int)( 0x1001 ) ); - public const int PDERR_PARSEFAILURE = unchecked( (int)( 0x1002 ) ); - public const int PDERR_RETDEFFAILURE = unchecked( (int)( 0x1003 ) ); - public const int PDERR_LOADDRVFAILURE = unchecked( (int)( 0x1004 ) ); - public const int PDERR_GETDEVMODEFAIL = unchecked( (int)( 0x1005 ) ); - public const int PDERR_INITFAILURE = unchecked( (int)( 0x1006 ) ); - public const int PDERR_NODEVICES = unchecked( (int)( 0x1007 ) ); - public const int PDERR_NODEFAULTPRN = unchecked( (int)( 0x1008 ) ); - public const int PDERR_DNDMMISMATCH = unchecked( (int)( 0x1009 ) ); - public const int PDERR_CREATEICFAILURE = unchecked( (int)( 0x100A ) ); - public const int PDERR_PRINTERNOTFOUND = unchecked( (int)( 0x100B ) ); - public const int PDERR_DEFAULTDIFFERENT = unchecked( (int)( 0x100C ) ); - - public const int CFERR_CHOOSEFONTCODES = unchecked( (int)( 0x2000 ) ); - public const int CFERR_NOFONTS = unchecked( (int)( 0x2001 ) ); - public const int CFERR_MAXLESSTHANMIN = unchecked( (int)( 0x2002 ) ); - - public const int FNERR_FILENAMECODES = unchecked( (int)( 0x3000 ) ); - public const int FNERR_SUBCLASSFAILURE = unchecked( (int)( 0x3001 ) ); - public const int FNERR_INVALIDFILENAME = unchecked( (int)( 0x3002 ) ); - public const int FNERR_BUFFERTOOSMALL = unchecked( (int)( 0x3003 ) ); - - public const int FRERR_FINDREPLACECODES = unchecked( (int)( 0x4000 ) ); - public const int FRERR_BUFFERLENGTHZERO = unchecked( (int)( 0x4001 ) ); - - public const int CCERR_CHOOSECOLORCODES = unchecked( (int)( 0x5000 ) ); + public const int CDERR_DIALOGFAILURE = unchecked((int)(0xFFFF)); + + public const int CDERR_GENERALCODES = unchecked((int)(0x0)); + public const int CDERR_STRUCTSIZE = unchecked((int)(0x1)); + public const int CDERR_INITIALIZATION = unchecked((int)(0x2)); + public const int CDERR_NOTEMPLATE = unchecked((int)(0x3)); + public const int CDERR_NOHINSTANCE = unchecked((int)(0x4)); + public const int CDERR_LOADSTRFAILURE = unchecked((int)(0x5)); + public const int CDERR_FINDRESFAILURE = unchecked((int)(0x6)); + public const int CDERR_LOADRESFAILURE = unchecked((int)(0x7)); + public const int CDERR_LOCKRESFAILURE = unchecked((int)(0x8)); + public const int CDERR_MEMALLOCFAILURE = unchecked((int)(0x9)); + public const int CDERR_MEMLOCKFAILURE = unchecked((int)(0xA)); + public const int CDERR_NOHOOK = unchecked((int)(0xB)); + public const int CDERR_REGISTERMSGFAIL = unchecked((int)(0xC)); + + public const int PDERR_PRINTERCODES = unchecked((int)(0x1000)); + public const int PDERR_SETUPFAILURE = unchecked((int)(0x1001)); + public const int PDERR_PARSEFAILURE = unchecked((int)(0x1002)); + public const int PDERR_RETDEFFAILURE = unchecked((int)(0x1003)); + public const int PDERR_LOADDRVFAILURE = unchecked((int)(0x1004)); + public const int PDERR_GETDEVMODEFAIL = unchecked((int)(0x1005)); + public const int PDERR_INITFAILURE = unchecked((int)(0x1006)); + public const int PDERR_NODEVICES = unchecked((int)(0x1007)); + public const int PDERR_NODEFAULTPRN = unchecked((int)(0x1008)); + public const int PDERR_DNDMMISMATCH = unchecked((int)(0x1009)); + public const int PDERR_CREATEICFAILURE = unchecked((int)(0x100A)); + public const int PDERR_PRINTERNOTFOUND = unchecked((int)(0x100B)); + public const int PDERR_DEFAULTDIFFERENT = unchecked((int)(0x100C)); + + public const int CFERR_CHOOSEFONTCODES = unchecked((int)(0x2000)); + public const int CFERR_NOFONTS = unchecked((int)(0x2001)); + public const int CFERR_MAXLESSTHANMIN = unchecked((int)(0x2002)); + + public const int FNERR_FILENAMECODES = unchecked((int)(0x3000)); + public const int FNERR_SUBCLASSFAILURE = unchecked((int)(0x3001)); + public const int FNERR_INVALIDFILENAME = unchecked((int)(0x3002)); + public const int FNERR_BUFFERTOOSMALL = unchecked((int)(0x3003)); + + public const int FRERR_FINDREPLACECODES = unchecked((int)(0x4000)); + public const int FRERR_BUFFERLENGTHZERO = unchecked((int)(0x4001)); + + public const int CCERR_CHOOSECOLORCODES = unchecked((int)(0x5000)); // Public interface to LZEXP?.LIB // LZEXPAND error return codes - public const int LZERROR_BADINHANDLE = unchecked( (int)( ( -1 ) ) );// invalid input handle - public const int LZERROR_BADOUTHANDLE = unchecked( (int)( ( -2 ) ) );// invalid output handle - public const int LZERROR_READ = unchecked( (int)( ( -3 ) ) );// corrupt compressed file format - public const int LZERROR_WRITE = unchecked( (int)( ( -4 ) ) );// out of space for output file - public const int LZERROR_PUBLICLOC = unchecked( (int)( ( -5 ) ) );// insufficient memory for LZFile struct - public const int LZERROR_GLOBLOCK = unchecked( (int)( ( -6 ) ) );// bad Global handle - public const int LZERROR_BADVALUE = unchecked( (int)( ( -7 ) ) );// input parameter out of range - public const int LZERROR_UNKNOWNALG = unchecked( (int)( ( -8 ) ) );// compression algorithm not recognized + public const int LZERROR_BADINHANDLE = unchecked((int)((-1)));// invalid input handle + public const int LZERROR_BADOUTHANDLE = unchecked((int)((-2)));// invalid output handle + public const int LZERROR_READ = unchecked((int)((-3)));// corrupt compressed file format + public const int LZERROR_WRITE = unchecked((int)((-4)));// out of space for output file + public const int LZERROR_PUBLICLOC = unchecked((int)((-5)));// insufficient memory for LZFile struct + public const int LZERROR_GLOBLOCK = unchecked((int)((-6)));// bad Global handle + public const int LZERROR_BADVALUE = unchecked((int)((-7)));// input parameter out of range + public const int LZERROR_UNKNOWNALG = unchecked((int)((-8)));// compression algorithm not recognized - [DllImport( "lz32.dll", EntryPoint = "LZCopy", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LZCopy( IntPtr hfSource, IntPtr hfDest ); + [DllImport("lz32.dll", EntryPoint = "LZCopy", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LZCopy(IntPtr hfSource, IntPtr hfDest); - [DllImport( "lz32.dll", EntryPoint = "LZInit", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LZInit( IntPtr hfSrc ); + [DllImport("lz32.dll", EntryPoint = "LZInit", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LZInit(IntPtr hfSrc); - [DllImport( "lz32.dll", EntryPoint = "GetExpandedName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetExpandedName( string lpszSource, string lpszBuffer ); + [DllImport("lz32.dll", EntryPoint = "GetExpandedName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetExpandedName(string lpszSource, string lpszBuffer); - [DllImport( "lz32.dll", EntryPoint = "LZOpenFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LZOpenFile( string lpszFile, ref OFSTRUCT lpOf, int style ); + [DllImport("lz32.dll", EntryPoint = "LZOpenFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LZOpenFile(string lpszFile, ref OFSTRUCT lpOf, int style); - [DllImport( "lz32.dll", EntryPoint = "LZSeek", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LZSeek( IntPtr hfFile, int lOffset, int nOrigin ); + [DllImport("lz32.dll", EntryPoint = "LZSeek", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LZSeek(IntPtr hfFile, int lOffset, int nOrigin); - [DllImport( "lz32.dll", EntryPoint = "LZRead", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LZRead( IntPtr hfFile, string lpvBuf, int cbread ); + [DllImport("lz32.dll", EntryPoint = "LZRead", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LZRead(IntPtr hfFile, string lpvBuf, int cbread); - [DllImport( "lz32.dll", EntryPoint = "LZClose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void LZClose( IntPtr hfFile ); + [DllImport("lz32.dll", EntryPoint = "LZClose", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void LZClose(IntPtr hfFile); // ******************************************************************** // IMM.H - Input Method Manager definitions @@ -17558,9 +17558,9 @@ public struct PERF_COUNTER_BLOCK // Copyright (c) 1993-1995 Microsoft Corporation // ******************************************************************** - public const int VK_PROCESSKEY = unchecked( (int)( 0xE5 ) ); + public const int VK_PROCESSKEY = unchecked((int)(0xE5)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct COMPOSITIONFORM { public int dwStyle; @@ -17568,7 +17568,7 @@ public struct COMPOSITIONFORM public RECT rcArea; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CANDIDATEFORM { public int dwIndex; @@ -17577,7 +17577,7 @@ public struct CANDIDATEFORM public RECT rcArea; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CANDIDATELIST { public int dwSize; @@ -17589,398 +17589,398 @@ public struct CANDIDATELIST public int dwOffset; } - public const int STYLE_DESCRIPTION_SIZE = unchecked( (int)( 32 ) ); + public const int STYLE_DESCRIPTION_SIZE = unchecked((int)(32)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct STYLEBUF { public int dwStyle; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = STYLE_DESCRIPTION_SIZE )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = STYLE_DESCRIPTION_SIZE)] public string szDescription; } // prototype of IMM API - [DllImport( "imm32.dll", EntryPoint = "ImmInstallIME", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmInstallIME( string lpszIMEFileName, string lpszLayoutText ); + [DllImport("imm32.dll", EntryPoint = "ImmInstallIME", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmInstallIME(string lpszIMEFileName, string lpszLayoutText); - [DllImport( "imm32.dll", EntryPoint = "ImmGetDefaultIMEWnd", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmGetDefaultIMEWnd( IntPtr hWnd ); + [DllImport("imm32.dll", EntryPoint = "ImmGetDefaultIMEWnd", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmGetDefaultIMEWnd(IntPtr hWnd); - [DllImport( "imm32.dll", EntryPoint = "ImmGetDescription", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmGetDescription( IntPtr hkl, string lpsz, int uBufLen ); + [DllImport("imm32.dll", EntryPoint = "ImmGetDescription", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmGetDescription(IntPtr hkl, string lpsz, int uBufLen); - [DllImport( "imm32.dll", EntryPoint = "ImmGetIMEFileName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmGetIMEFileName( IntPtr hkl, string lpStr, int uBufLen ); + [DllImport("imm32.dll", EntryPoint = "ImmGetIMEFileName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmGetIMEFileName(IntPtr hkl, string lpStr, int uBufLen); - [DllImport( "imm32.dll", EntryPoint = "ImmGetProperty", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmGetProperty( IntPtr hkl, int dw ); + [DllImport("imm32.dll", EntryPoint = "ImmGetProperty", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmGetProperty(IntPtr hkl, int dw); - [DllImport( "imm32.dll", EntryPoint = "ImmIsIME", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmIsIME( IntPtr hkl ); + [DllImport("imm32.dll", EntryPoint = "ImmIsIME", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmIsIME(IntPtr hkl); - [DllImport( "imm32.dll", EntryPoint = "ImmSimulateHotKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmSimulateHotKey( IntPtr hWnd, int dw ); + [DllImport("imm32.dll", EntryPoint = "ImmSimulateHotKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmSimulateHotKey(IntPtr hWnd, int dw); - [DllImport( "imm32.dll", EntryPoint = "ImmCreateContext", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("imm32.dll", EntryPoint = "ImmCreateContext", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int ImmCreateContext(); - [DllImport( "imm32.dll", EntryPoint = "ImmDestroyContext", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmDestroyContext( IntPtr himc ); + [DllImport("imm32.dll", EntryPoint = "ImmDestroyContext", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmDestroyContext(IntPtr himc); - [DllImport( "imm32.dll", EntryPoint = "ImmGetContext", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmGetContext( IntPtr hWnd ); + [DllImport("imm32.dll", EntryPoint = "ImmGetContext", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmGetContext(IntPtr hWnd); - [DllImport( "imm32.dll", EntryPoint = "ImmReleaseContext", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmReleaseContext( IntPtr hWnd, IntPtr himc ); + [DllImport("imm32.dll", EntryPoint = "ImmReleaseContext", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmReleaseContext(IntPtr hWnd, IntPtr himc); - [DllImport( "imm32.dll", EntryPoint = "ImmAssociateContext", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmAssociateContext( IntPtr hWnd, IntPtr himc ); + [DllImport("imm32.dll", EntryPoint = "ImmAssociateContext", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmAssociateContext(IntPtr hWnd, IntPtr himc); - [DllImport( "imm32.dll", EntryPoint = "ImmGetCompositionString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmGetCompositionString( IntPtr himc, int dw, IntPtr lpv, int dw2 ); + [DllImport("imm32.dll", EntryPoint = "ImmGetCompositionString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmGetCompositionString(IntPtr himc, int dw, IntPtr lpv, int dw2); - [DllImport( "imm32.dll", EntryPoint = "ImmSetCompositionString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmSetCompositionString( IntPtr himc, int dwIndex, IntPtr lpComp, int dw, IntPtr lpRead, int dw2 ); + [DllImport("imm32.dll", EntryPoint = "ImmSetCompositionString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmSetCompositionString(IntPtr himc, int dwIndex, IntPtr lpComp, int dw, IntPtr lpRead, int dw2); - [DllImport( "imm32.dll", EntryPoint = "ImmGetCandidateListCount", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmGetCandidateListCount( IntPtr himc, IntPtr lpdwListCount ); + [DllImport("imm32.dll", EntryPoint = "ImmGetCandidateListCount", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmGetCandidateListCount(IntPtr himc, IntPtr lpdwListCount); - [DllImport( "imm32.dll", EntryPoint = "ImmGetCandidateList", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmGetCandidateList( IntPtr himc, int deIndex, ref CANDIDATELIST lpCandidateList, int dwBufLen ); + [DllImport("imm32.dll", EntryPoint = "ImmGetCandidateList", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmGetCandidateList(IntPtr himc, int deIndex, ref CANDIDATELIST lpCandidateList, int dwBufLen); - [DllImport( "imm32.dll", EntryPoint = "ImmGetGuideLine", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmGetGuideLine( IntPtr himc, int dwIndex, string lpStr, int dwBufLen ); + [DllImport("imm32.dll", EntryPoint = "ImmGetGuideLine", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmGetGuideLine(IntPtr himc, int dwIndex, string lpStr, int dwBufLen); - [DllImport( "imm32.dll", EntryPoint = "ImmGetConversionStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmGetConversionStatus( IntPtr himc, IntPtr lpdw, IntPtr lpdw2 ); + [DllImport("imm32.dll", EntryPoint = "ImmGetConversionStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmGetConversionStatus(IntPtr himc, IntPtr lpdw, IntPtr lpdw2); - [DllImport( "imm32.dll", EntryPoint = "ImmSetConversionStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmSetConversionStatus( IntPtr himc, int dw1, int dw2 ); + [DllImport("imm32.dll", EntryPoint = "ImmSetConversionStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmSetConversionStatus(IntPtr himc, int dw1, int dw2); - [DllImport( "imm32.dll", EntryPoint = "ImmGetOpenStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmGetOpenStatus( IntPtr himc ); + [DllImport("imm32.dll", EntryPoint = "ImmGetOpenStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmGetOpenStatus(IntPtr himc); - [DllImport( "imm32.dll", EntryPoint = "ImmSetOpenStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmSetOpenStatus( IntPtr himc, int b ); + [DllImport("imm32.dll", EntryPoint = "ImmSetOpenStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmSetOpenStatus(IntPtr himc, int b); - [DllImport( "imm32.dll", EntryPoint = "ImmGetCompositionFont", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmGetCompositionFont( IntPtr himc, ref LOGFONT lpLogFont ); + [DllImport("imm32.dll", EntryPoint = "ImmGetCompositionFont", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmGetCompositionFont(IntPtr himc, ref LOGFONT lpLogFont); - [DllImport( "imm32.dll", EntryPoint = "ImmSetCompositionFont", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmSetCompositionFont( IntPtr himc, ref LOGFONT lpLogFont ); + [DllImport("imm32.dll", EntryPoint = "ImmSetCompositionFont", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmSetCompositionFont(IntPtr himc, ref LOGFONT lpLogFont); - [DllImport( "imm32.dll", EntryPoint = "ImmConfigureIME", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmConfigureIME( IntPtr hkl, IntPtr hWnd, int dw ); + [DllImport("imm32.dll", EntryPoint = "ImmConfigureIME", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmConfigureIME(IntPtr hkl, IntPtr hWnd, int dw); - [DllImport( "imm32.dll", EntryPoint = "ImmEscape", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmEscape( IntPtr hkl, IntPtr himc, int un, IntPtr lpv ); + [DllImport("imm32.dll", EntryPoint = "ImmEscape", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmEscape(IntPtr hkl, IntPtr himc, int un, IntPtr lpv); - [DllImport( "imm32.dll", EntryPoint = "ImmGetConversionList", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmGetConversionList( IntPtr hkl, IntPtr himc, string lpsz, ref CANDIDATELIST lpCandidateList, int dwBufLen, int uFlag ); + [DllImport("imm32.dll", EntryPoint = "ImmGetConversionList", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmGetConversionList(IntPtr hkl, IntPtr himc, string lpsz, ref CANDIDATELIST lpCandidateList, int dwBufLen, int uFlag); - [DllImport( "imm32.dll", EntryPoint = "ImmNotifyIME", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmNotifyIME( IntPtr himc, int dwAction, int dwIndex, int dwValue ); + [DllImport("imm32.dll", EntryPoint = "ImmNotifyIME", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmNotifyIME(IntPtr himc, int dwAction, int dwIndex, int dwValue); - [DllImport( "imm32.dll", EntryPoint = "ImmGetStatusWindowPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmGetStatusWindowPos( IntPtr himc, ref POINTAPI lpPoint ); + [DllImport("imm32.dll", EntryPoint = "ImmGetStatusWindowPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmGetStatusWindowPos(IntPtr himc, ref POINTAPI lpPoint); - [DllImport( "imm32.dll", EntryPoint = "ImmSetStatusWindowPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmSetStatusWindowPos( IntPtr himc, ref POINTAPI lpPoint ); + [DllImport("imm32.dll", EntryPoint = "ImmSetStatusWindowPos", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmSetStatusWindowPos(IntPtr himc, ref POINTAPI lpPoint); - [DllImport( "imm32.dll", EntryPoint = "ImmGetCompositionWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmGetCompositionWindow( IntPtr himc, ref COMPOSITIONFORM lpCompositionForm ); + [DllImport("imm32.dll", EntryPoint = "ImmGetCompositionWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmGetCompositionWindow(IntPtr himc, ref COMPOSITIONFORM lpCompositionForm); - [DllImport( "imm32.dll", EntryPoint = "ImmSetCompositionWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmSetCompositionWindow( IntPtr himc, ref COMPOSITIONFORM lpCompositionForm ); + [DllImport("imm32.dll", EntryPoint = "ImmSetCompositionWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmSetCompositionWindow(IntPtr himc, ref COMPOSITIONFORM lpCompositionForm); - [DllImport( "imm32.dll", EntryPoint = "ImmGetCandidateWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmGetCandidateWindow( IntPtr himc, int dw, ref CANDIDATEFORM lpCandidateForm ); + [DllImport("imm32.dll", EntryPoint = "ImmGetCandidateWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmGetCandidateWindow(IntPtr himc, int dw, ref CANDIDATEFORM lpCandidateForm); - [DllImport( "imm32.dll", EntryPoint = "ImmSetCandidateWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmSetCandidateWindow( IntPtr himc, ref CANDIDATEFORM lpCandidateForm ); + [DllImport("imm32.dll", EntryPoint = "ImmSetCandidateWindow", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmSetCandidateWindow(IntPtr himc, ref CANDIDATEFORM lpCandidateForm); - [DllImport( "imm32.dll", EntryPoint = "ImmIsUIMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmIsUIMessage( IntPtr hWnd, int un, int wParam, int lParam ); + [DllImport("imm32.dll", EntryPoint = "ImmIsUIMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmIsUIMessage(IntPtr hWnd, int un, int wParam, int lParam); - [DllImport( "imm32.dll", EntryPoint = "ImmGetVirtualKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmGetVirtualKey( IntPtr hWnd ); + [DllImport("imm32.dll", EntryPoint = "ImmGetVirtualKey", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmGetVirtualKey(IntPtr hWnd); - [DllImport( "imm32.dll", EntryPoint = "ImmRegisterWord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmRegisterWord( IntPtr hkl, string lpszReading, int dw, string lpszRegister ); + [DllImport("imm32.dll", EntryPoint = "ImmRegisterWord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmRegisterWord(IntPtr hkl, string lpszReading, int dw, string lpszRegister); - [DllImport( "imm32.dll", EntryPoint = "ImmUnregisterWord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmUnregisterWord( IntPtr hkl, string lpszReading, int dw, string lpszUnregister ); + [DllImport("imm32.dll", EntryPoint = "ImmUnregisterWord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmUnregisterWord(IntPtr hkl, string lpszReading, int dw, string lpszUnregister); - [DllImport( "imm32.dll", EntryPoint = "ImmGetRegisterWordStyle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmGetRegisterWordStyle( IntPtr hkl, int nItem, ref STYLEBUF lpStyleBuf ); + [DllImport("imm32.dll", EntryPoint = "ImmGetRegisterWordStyle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmGetRegisterWordStyle(IntPtr hkl, int nItem, ref STYLEBUF lpStyleBuf); - [DllImport( "imm32.dll", EntryPoint = "ImmEnumRegisterWord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImmEnumRegisterWord( IntPtr hkl, int RegisterWordEnumProc, string lpszReading, int dw, string lpszRegister, IntPtr lpv ); + [DllImport("imm32.dll", EntryPoint = "ImmEnumRegisterWord", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImmEnumRegisterWord(IntPtr hkl, int RegisterWordEnumProc, string lpszReading, int dw, string lpszRegister, IntPtr lpv); // the IME related messages - public const int WM_CONVERTREQUESTEX = unchecked( (int)( 0x108 ) ); - public const int WM_IME_STARTCOMPOSITION = unchecked( (int)( 0x10D ) ); - public const int WM_IME_ENDCOMPOSITION = unchecked( (int)( 0x10E ) ); - public const int WM_IME_COMPOSITION = unchecked( (int)( 0x10F ) ); - public const int WM_IME_KEYLAST = unchecked( (int)( 0x10F ) ); - - public const int WM_IME_SETCONTEXT = unchecked( (int)( 0x281 ) ); - public const int WM_IME_NOTIFY = unchecked( (int)( 0x282 ) ); - public const int WM_IME_CONTROL = unchecked( (int)( 0x283 ) ); - public const int WM_IME_COMPOSITIONFULL = unchecked( (int)( 0x284 ) ); - public const int WM_IME_SELECT = unchecked( (int)( 0x285 ) ); - public const int WM_IME_CHAR = unchecked( (int)( 0x286 ) ); - - public const int WM_IME_KEYDOWN = unchecked( (int)( 0x290 ) ); - public const int WM_IME_KEYUP = unchecked( (int)( 0x291 ) ); + public const int WM_CONVERTREQUESTEX = unchecked((int)(0x108)); + public const int WM_IME_STARTCOMPOSITION = unchecked((int)(0x10D)); + public const int WM_IME_ENDCOMPOSITION = unchecked((int)(0x10E)); + public const int WM_IME_COMPOSITION = unchecked((int)(0x10F)); + public const int WM_IME_KEYLAST = unchecked((int)(0x10F)); + + public const int WM_IME_SETCONTEXT = unchecked((int)(0x281)); + public const int WM_IME_NOTIFY = unchecked((int)(0x282)); + public const int WM_IME_CONTROL = unchecked((int)(0x283)); + public const int WM_IME_COMPOSITIONFULL = unchecked((int)(0x284)); + public const int WM_IME_SELECT = unchecked((int)(0x285)); + public const int WM_IME_CHAR = unchecked((int)(0x286)); + + public const int WM_IME_KEYDOWN = unchecked((int)(0x290)); + public const int WM_IME_KEYUP = unchecked((int)(0x291)); // wParam for WM_IME_CONTROL - public const int IMC_GETCANDIDATEPOS = unchecked( (int)( 0x7 ) ); - public const int IMC_SETCANDIDATEPOS = unchecked( (int)( 0x8 ) ); - public const int IMC_GETCOMPOSITIONFONT = unchecked( (int)( 0x9 ) ); - public const int IMC_SETCOMPOSITIONFONT = unchecked( (int)( 0xA ) ); - public const int IMC_GETCOMPOSITIONWINDOW = unchecked( (int)( 0xB ) ); - public const int IMC_SETCOMPOSITIONWINDOW = unchecked( (int)( 0xC ) ); - public const int IMC_GETSTATUSWINDOWPOS = unchecked( (int)( 0xF ) ); - public const int IMC_SETSTATUSWINDOWPOS = unchecked( (int)( 0x10 ) ); - public const int IMC_CLOSESTATUSWINDOW = unchecked( (int)( 0x21 ) ); - public const int IMC_OPENSTATUSWINDOW = unchecked( (int)( 0x22 ) ); + public const int IMC_GETCANDIDATEPOS = unchecked((int)(0x7)); + public const int IMC_SETCANDIDATEPOS = unchecked((int)(0x8)); + public const int IMC_GETCOMPOSITIONFONT = unchecked((int)(0x9)); + public const int IMC_SETCOMPOSITIONFONT = unchecked((int)(0xA)); + public const int IMC_GETCOMPOSITIONWINDOW = unchecked((int)(0xB)); + public const int IMC_SETCOMPOSITIONWINDOW = unchecked((int)(0xC)); + public const int IMC_GETSTATUSWINDOWPOS = unchecked((int)(0xF)); + public const int IMC_SETSTATUSWINDOWPOS = unchecked((int)(0x10)); + public const int IMC_CLOSESTATUSWINDOW = unchecked((int)(0x21)); + public const int IMC_OPENSTATUSWINDOW = unchecked((int)(0x22)); // wParam for WM_IME_CONTROL to the soft keyboard // dwAction for ImmNotifyIME - public const int NI_OPENCANDIDATE = unchecked( (int)( 0x10 ) ); - public const int NI_CLOSECANDIDATE = unchecked( (int)( 0x11 ) ); - public const int NI_SELECTCANDIDATESTR = unchecked( (int)( 0x12 ) ); - public const int NI_CHANGECANDIDATELIST = unchecked( (int)( 0x13 ) ); - public const int NI_FINALIZECONVERSIONRESULT = unchecked( (int)( 0x14 ) ); - public const int NI_COMPOSITIONSTR = unchecked( (int)( 0x15 ) ); - public const int NI_SETCANDIDATE_PAGESTART = unchecked( (int)( 0x16 ) ); - public const int NI_SETCANDIDATE_PAGESIZE = unchecked( (int)( 0x17 ) ); + public const int NI_OPENCANDIDATE = unchecked((int)(0x10)); + public const int NI_CLOSECANDIDATE = unchecked((int)(0x11)); + public const int NI_SELECTCANDIDATESTR = unchecked((int)(0x12)); + public const int NI_CHANGECANDIDATELIST = unchecked((int)(0x13)); + public const int NI_FINALIZECONVERSIONRESULT = unchecked((int)(0x14)); + public const int NI_COMPOSITIONSTR = unchecked((int)(0x15)); + public const int NI_SETCANDIDATE_PAGESTART = unchecked((int)(0x16)); + public const int NI_SETCANDIDATE_PAGESIZE = unchecked((int)(0x17)); // lParam for WM_IME_SETCONTEXT - public const int ISC_SHOWUICANDIDATEWINDOW = unchecked( (int)( 0x1 ) ); - public const int ISC_SHOWUICOMPOSITIONWINDOW = unchecked( (int)( 0x80000000 ) ); - public const int ISC_SHOWUIGUIDELINE = unchecked( (int)( 0x40000000 ) ); - public const int ISC_SHOWUIALLCANDIDATEWINDOW = unchecked( (int)( 0xF ) ); - public const int ISC_SHOWUIALL = unchecked( (int)( 0xC000000F ) ); + public const int ISC_SHOWUICANDIDATEWINDOW = unchecked((int)(0x1)); + public const int ISC_SHOWUICOMPOSITIONWINDOW = unchecked((int)(0x80000000)); + public const int ISC_SHOWUIGUIDELINE = unchecked((int)(0x40000000)); + public const int ISC_SHOWUIALLCANDIDATEWINDOW = unchecked((int)(0xF)); + public const int ISC_SHOWUIALL = unchecked((int)(0xC000000F)); // dwIndex for ImmNotifyIME/NI_COMPOSITIONSTR - public const int CPS_COMPLETE = unchecked( (int)( 0x1 ) ); - public const int CPS_CONVERT = unchecked( (int)( 0x2 ) ); - public const int CPS_REVERT = unchecked( (int)( 0x3 ) ); - public const int CPS_CANCEL = unchecked( (int)( 0x4 ) ); + public const int CPS_COMPLETE = unchecked((int)(0x1)); + public const int CPS_CONVERT = unchecked((int)(0x2)); + public const int CPS_REVERT = unchecked((int)(0x3)); + public const int CPS_CANCEL = unchecked((int)(0x4)); // Windows for Simplified Chinese Edition hot key ID from 0x10 - 0x2F - public const int IME_CHOTKEY_IME_NONIME_TOGGLE = unchecked( (int)( 0x10 ) ); - public const int IME_CHOTKEY_SHAPE_TOGGLE = unchecked( (int)( 0x11 ) ); - public const int IME_CHOTKEY_SYMBOL_TOGGLE = unchecked( (int)( 0x12 ) ); + public const int IME_CHOTKEY_IME_NONIME_TOGGLE = unchecked((int)(0x10)); + public const int IME_CHOTKEY_SHAPE_TOGGLE = unchecked((int)(0x11)); + public const int IME_CHOTKEY_SYMBOL_TOGGLE = unchecked((int)(0x12)); // Windows for Japanese Edition hot key ID from 0x30 - 0x4F - public const int IME_JHOTKEY_CLOSE_OPEN = unchecked( (int)( 0x30 ) ); + public const int IME_JHOTKEY_CLOSE_OPEN = unchecked((int)(0x30)); // Windows for Korean Edition hot key ID from 0x50 - 0x6F - public const int IME_KHOTKEY_SHAPE_TOGGLE = unchecked( (int)( 0x50 ) ); - public const int IME_KHOTKEY_HANJACONVERT = unchecked( (int)( 0x51 ) ); - public const int IME_KHOTKEY_ENGLISH = unchecked( (int)( 0x52 ) ); + public const int IME_KHOTKEY_SHAPE_TOGGLE = unchecked((int)(0x50)); + public const int IME_KHOTKEY_HANJACONVERT = unchecked((int)(0x51)); + public const int IME_KHOTKEY_ENGLISH = unchecked((int)(0x52)); // Windows for Tranditional Chinese Edition hot key ID from 0x70 - 0x8F - public const int IME_THOTKEY_IME_NONIME_TOGGLE = unchecked( (int)( 0x70 ) ); - public const int IME_THOTKEY_SHAPE_TOGGLE = unchecked( (int)( 0x71 ) ); - public const int IME_THOTKEY_SYMBOL_TOGGLE = unchecked( (int)( 0x72 ) ); + public const int IME_THOTKEY_IME_NONIME_TOGGLE = unchecked((int)(0x70)); + public const int IME_THOTKEY_SHAPE_TOGGLE = unchecked((int)(0x71)); + public const int IME_THOTKEY_SYMBOL_TOGGLE = unchecked((int)(0x72)); // direct switch hot key ID from 0x100 - 0x11F - public const int IME_HOTKEY_DSWITCH_FIRST = unchecked( (int)( 0x100 ) ); - public const int IME_HOTKEY_DSWITCH_LAST = unchecked( (int)( 0x11F ) ); + public const int IME_HOTKEY_DSWITCH_FIRST = unchecked((int)(0x100)); + public const int IME_HOTKEY_DSWITCH_LAST = unchecked((int)(0x11F)); // IME private hot key from 0x200 - 0x21F - public const int IME_ITHOTKEY_RESEND_RESULTSTR = unchecked( (int)( 0x200 ) ); - public const int IME_ITHOTKEY_PREVIOUS_COMPOSITION = unchecked( (int)( 0x201 ) ); - public const int IME_ITHOTKEY_UISTYLE_TOGGLE = unchecked( (int)( 0x202 ) ); + public const int IME_ITHOTKEY_RESEND_RESULTSTR = unchecked((int)(0x200)); + public const int IME_ITHOTKEY_PREVIOUS_COMPOSITION = unchecked((int)(0x201)); + public const int IME_ITHOTKEY_UISTYLE_TOGGLE = unchecked((int)(0x202)); // parameter of ImmGetCompositionString - public const int GCS_COMPREADSTR = unchecked( (int)( 0x1 ) ); - public const int GCS_COMPREADATTR = unchecked( (int)( 0x2 ) ); - public const int GCS_COMPREADCLAUSE = unchecked( (int)( 0x4 ) ); - public const int GCS_COMPSTR = unchecked( (int)( 0x8 ) ); - public const int GCS_COMPATTR = unchecked( (int)( 0x10 ) ); - public const int GCS_COMPCLAUSE = unchecked( (int)( 0x20 ) ); - public const int GCS_CURSORPOS = unchecked( (int)( 0x80 ) ); - public const int GCS_DELTASTART = unchecked( (int)( 0x100 ) ); - public const int GCS_RESULTREADSTR = unchecked( (int)( 0x200 ) ); - public const int GCS_RESULTREADCLAUSE = unchecked( (int)( 0x400 ) ); - public const int GCS_RESULTSTR = unchecked( (int)( 0x800 ) ); - public const int GCS_RESULTCLAUSE = unchecked( (int)( 0x1000 ) ); + public const int GCS_COMPREADSTR = unchecked((int)(0x1)); + public const int GCS_COMPREADATTR = unchecked((int)(0x2)); + public const int GCS_COMPREADCLAUSE = unchecked((int)(0x4)); + public const int GCS_COMPSTR = unchecked((int)(0x8)); + public const int GCS_COMPATTR = unchecked((int)(0x10)); + public const int GCS_COMPCLAUSE = unchecked((int)(0x20)); + public const int GCS_CURSORPOS = unchecked((int)(0x80)); + public const int GCS_DELTASTART = unchecked((int)(0x100)); + public const int GCS_RESULTREADSTR = unchecked((int)(0x200)); + public const int GCS_RESULTREADCLAUSE = unchecked((int)(0x400)); + public const int GCS_RESULTSTR = unchecked((int)(0x800)); + public const int GCS_RESULTCLAUSE = unchecked((int)(0x1000)); // style bit flags for WM_IME_COMPOSITION - public const int CS_INSERTCHAR = unchecked( (int)( 0x2000 ) ); - public const int CS_NOMOVECARET = unchecked( (int)( 0x4000 ) ); + public const int CS_INSERTCHAR = unchecked((int)(0x2000)); + public const int CS_NOMOVECARET = unchecked((int)(0x4000)); // bits of fdwInit of INPUTCONTEXT // IME property bits - public const int IME_PROP_AT_CARET = unchecked( (int)( 0x10000 ) ); - public const int IME_PROP_SPECIAL_UI = unchecked( (int)( 0x20000 ) ); - public const int IME_PROP_CANDLIST_START_FROM_1 = unchecked( (int)( 0x40000 ) ); - public const int IME_PROP_UNICODE = unchecked( (int)( 0x80000 ) ); + public const int IME_PROP_AT_CARET = unchecked((int)(0x10000)); + public const int IME_PROP_SPECIAL_UI = unchecked((int)(0x20000)); + public const int IME_PROP_CANDLIST_START_FROM_1 = unchecked((int)(0x40000)); + public const int IME_PROP_UNICODE = unchecked((int)(0x80000)); // IME UICapability bits - public const int UI_CAP_2700 = unchecked( (int)( 0x1 ) ); - public const int UI_CAP_ROT90 = unchecked( (int)( 0x2 ) ); - public const int UI_CAP_ROTANY = unchecked( (int)( 0x4 ) ); + public const int UI_CAP_2700 = unchecked((int)(0x1)); + public const int UI_CAP_ROT90 = unchecked((int)(0x2)); + public const int UI_CAP_ROTANY = unchecked((int)(0x4)); // ImmSetCompositionString Capability bits - public const int SCS_CAP_COMPSTR = unchecked( (int)( 0x1 ) ); - public const int SCS_CAP_MAKEREAD = unchecked( (int)( 0x2 ) ); + public const int SCS_CAP_COMPSTR = unchecked((int)(0x1)); + public const int SCS_CAP_MAKEREAD = unchecked((int)(0x2)); // IME WM_IME_SELECT inheritance Capability bits - public const int SELECT_CAP_CONVERSION = unchecked( (int)( 0x1 ) ); - public const int SELECT_CAP_SENTENCE = unchecked( (int)( 0x2 ) ); + public const int SELECT_CAP_CONVERSION = unchecked((int)(0x1)); + public const int SELECT_CAP_SENTENCE = unchecked((int)(0x2)); // ID for deIndex of ImmGetGuideLine - public const int GGL_LEVEL = unchecked( (int)( 0x1 ) ); - public const int GGL_INDEX = unchecked( (int)( 0x2 ) ); - public const int GGL_STRING = unchecked( (int)( 0x3 ) ); - public const int GGL_PRIVATE = unchecked( (int)( 0x4 ) ); + public const int GGL_LEVEL = unchecked((int)(0x1)); + public const int GGL_INDEX = unchecked((int)(0x2)); + public const int GGL_STRING = unchecked((int)(0x3)); + public const int GGL_PRIVATE = unchecked((int)(0x4)); // ID for dwLevel of GUIDELINE Structure - public const int GL_LEVEL_NOGUIDELINE = unchecked( (int)( 0x0 ) ); - public const int GL_LEVEL_FATAL = unchecked( (int)( 0x1 ) ); - public const int GL_LEVEL_ERROR = unchecked( (int)( 0x2 ) ); - public const int GL_LEVEL_WARNING = unchecked( (int)( 0x3 ) ); - public const int GL_LEVEL_INFORMATION = unchecked( (int)( 0x4 ) ); + public const int GL_LEVEL_NOGUIDELINE = unchecked((int)(0x0)); + public const int GL_LEVEL_FATAL = unchecked((int)(0x1)); + public const int GL_LEVEL_ERROR = unchecked((int)(0x2)); + public const int GL_LEVEL_WARNING = unchecked((int)(0x3)); + public const int GL_LEVEL_INFORMATION = unchecked((int)(0x4)); // ID for dwIndex of GUIDELINE Structure - public const int GL_ID_UNKNOWN = unchecked( (int)( 0x0 ) ); - public const int GL_ID_NOMODULE = unchecked( (int)( 0x1 ) ); - public const int GL_ID_NODICTIONARY = unchecked( (int)( 0x10 ) ); - public const int GL_ID_CANNOTSAVE = unchecked( (int)( 0x11 ) ); - public const int GL_ID_NOCONVERT = unchecked( (int)( 0x20 ) ); - public const int GL_ID_TYPINGERROR = unchecked( (int)( 0x21 ) ); - public const int GL_ID_TOOMANYSTROKE = unchecked( (int)( 0x22 ) ); - public const int GL_ID_READINGCONFLICT = unchecked( (int)( 0x23 ) ); - public const int GL_ID_INPUTREADING = unchecked( (int)( 0x24 ) ); - public const int GL_ID_INPUTRADICAL = unchecked( (int)( 0x25 ) ); - public const int GL_ID_INPUTCODE = unchecked( (int)( 0x26 ) ); - public const int GL_ID_INPUTSYMBOL = unchecked( (int)( 0x27 ) ); - public const int GL_ID_CHOOSECANDIDATE = unchecked( (int)( 0x28 ) ); - public const int GL_ID_REVERSECONVERSION = unchecked( (int)( 0x29 ) ); - public const int GL_ID_PRIVATE_FIRST = unchecked( (int)( 0x8000 ) ); - public const int GL_ID_PRIVATE_LAST = unchecked( (int)( 0xFFFF ) ); + public const int GL_ID_UNKNOWN = unchecked((int)(0x0)); + public const int GL_ID_NOMODULE = unchecked((int)(0x1)); + public const int GL_ID_NODICTIONARY = unchecked((int)(0x10)); + public const int GL_ID_CANNOTSAVE = unchecked((int)(0x11)); + public const int GL_ID_NOCONVERT = unchecked((int)(0x20)); + public const int GL_ID_TYPINGERROR = unchecked((int)(0x21)); + public const int GL_ID_TOOMANYSTROKE = unchecked((int)(0x22)); + public const int GL_ID_READINGCONFLICT = unchecked((int)(0x23)); + public const int GL_ID_INPUTREADING = unchecked((int)(0x24)); + public const int GL_ID_INPUTRADICAL = unchecked((int)(0x25)); + public const int GL_ID_INPUTCODE = unchecked((int)(0x26)); + public const int GL_ID_INPUTSYMBOL = unchecked((int)(0x27)); + public const int GL_ID_CHOOSECANDIDATE = unchecked((int)(0x28)); + public const int GL_ID_REVERSECONVERSION = unchecked((int)(0x29)); + public const int GL_ID_PRIVATE_FIRST = unchecked((int)(0x8000)); + public const int GL_ID_PRIVATE_LAST = unchecked((int)(0xFFFF)); // ID for dwIndex of ImmGetProperty - public const int IGP_PROPERTY = unchecked( (int)( 0x4 ) ); - public const int IGP_CONVERSION = unchecked( (int)( 0x8 ) ); - public const int IGP_SENTENCE = unchecked( (int)( 0xC ) ); - public const int IGP_UI = unchecked( (int)( 0x10 ) ); - public const int IGP_SETCOMPSTR = unchecked( (int)( 0x14 ) ); - public const int IGP_SELECT = unchecked( (int)( 0x18 ) ); + public const int IGP_PROPERTY = unchecked((int)(0x4)); + public const int IGP_CONVERSION = unchecked((int)(0x8)); + public const int IGP_SENTENCE = unchecked((int)(0xC)); + public const int IGP_UI = unchecked((int)(0x10)); + public const int IGP_SETCOMPSTR = unchecked((int)(0x14)); + public const int IGP_SELECT = unchecked((int)(0x18)); // dwIndex for ImmSetCompositionString API - public const int SCS_SETSTR = unchecked( (int)( ( GCS_COMPREADSTR | GCS_COMPSTR ) ) ); - public const int SCS_CHANGEATTR = unchecked( (int)( ( GCS_COMPREADATTR | GCS_COMPATTR ) ) ); - public const int SCS_CHANGECLAUSE = unchecked( (int)( ( GCS_COMPREADCLAUSE | GCS_COMPCLAUSE ) ) ); + public const int SCS_SETSTR = unchecked((int)((GCS_COMPREADSTR | GCS_COMPSTR))); + public const int SCS_CHANGEATTR = unchecked((int)((GCS_COMPREADATTR | GCS_COMPATTR))); + public const int SCS_CHANGECLAUSE = unchecked((int)((GCS_COMPREADCLAUSE | GCS_COMPCLAUSE))); // attribute for COMPOSITIONSTRING Structure - public const int ATTR_INPUT = unchecked( (int)( 0x0 ) ); - public const int ATTR_TARGET_CONVERTED = unchecked( (int)( 0x1 ) ); - public const int ATTR_CONVERTED = unchecked( (int)( 0x2 ) ); - public const int ATTR_TARGET_NOTCONVERTED = unchecked( (int)( 0x3 ) ); - public const int ATTR_INPUT_ERROR = unchecked( (int)( 0x4 ) ); + public const int ATTR_INPUT = unchecked((int)(0x0)); + public const int ATTR_TARGET_CONVERTED = unchecked((int)(0x1)); + public const int ATTR_CONVERTED = unchecked((int)(0x2)); + public const int ATTR_TARGET_NOTCONVERTED = unchecked((int)(0x3)); + public const int ATTR_INPUT_ERROR = unchecked((int)(0x4)); // bit field for IMC_SETCOMPOSITIONWINDOW, IMC_SETCANDIDATEWINDOW - public const int CFS_DEFAULT = unchecked( (int)( 0x0 ) ); - public const int CFS_RECT = unchecked( (int)( 0x1 ) ); - public const int CFS_POINT = unchecked( (int)( 0x2 ) ); - public const int CFS_SCREEN = unchecked( (int)( 0x4 ) ); - public const int CFS_FORCE_POSITION = unchecked( (int)( 0x20 ) ); - public const int CFS_CANDIDATEPOS = unchecked( (int)( 0x40 ) ); - public const int CFS_EXCLUDE = unchecked( (int)( 0x80 ) ); + public const int CFS_DEFAULT = unchecked((int)(0x0)); + public const int CFS_RECT = unchecked((int)(0x1)); + public const int CFS_POINT = unchecked((int)(0x2)); + public const int CFS_SCREEN = unchecked((int)(0x4)); + public const int CFS_FORCE_POSITION = unchecked((int)(0x20)); + public const int CFS_CANDIDATEPOS = unchecked((int)(0x40)); + public const int CFS_EXCLUDE = unchecked((int)(0x80)); // conversion direction for ImmGetConversionList - public const int GCL_CONVERSION = unchecked( (int)( 0x1 ) ); - public const int GCL_REVERSECONVERSION = unchecked( (int)( 0x2 ) ); - public const int GCL_REVERSE_LENGTH = unchecked( (int)( 0x3 ) ); + public const int GCL_CONVERSION = unchecked((int)(0x1)); + public const int GCL_REVERSECONVERSION = unchecked((int)(0x2)); + public const int GCL_REVERSE_LENGTH = unchecked((int)(0x3)); // bit field for conversion mode - public const int IME_CMODE_ALPHANUMERIC = unchecked( (int)( 0x0 ) ); - public const int IME_CMODE_NATIVE = unchecked( (int)( 0x1 ) ); - public const int IME_CMODE_CHINESE = unchecked( (int)( IME_CMODE_NATIVE ) ); - public const int IME_CMODE_HANGEUL = unchecked( (int)( IME_CMODE_NATIVE ) ); - public const int IME_CMODE_JAPANESE = unchecked( (int)( IME_CMODE_NATIVE ) ); - public const int IME_CMODE_KATAKANA = unchecked( (int)( 0x2 ) );// only effect under IME_CMODE_NATIVE - public const int IME_CMODE_LANGUAGE = unchecked( (int)( 0x3 ) ); - public const int IME_CMODE_FULLSHAPE = unchecked( (int)( 0x8 ) ); - public const int IME_CMODE_ROMAN = unchecked( (int)( 0x10 ) ); - public const int IME_CMODE_CHARCODE = unchecked( (int)( 0x20 ) ); - public const int IME_CMODE_HANJACONVERT = unchecked( (int)( 0x40 ) ); - public const int IME_CMODE_SOFTKBD = unchecked( (int)( 0x80 ) ); - public const int IME_CMODE_NOCONVERSION = unchecked( (int)( 0x100 ) ); - public const int IME_CMODE_EUDC = unchecked( (int)( 0x200 ) ); - public const int IME_CMODE_SYMBOL = unchecked( (int)( 0x400 ) ); - - public const int IME_SMODE_NONE = unchecked( (int)( 0x0 ) ); - public const int IME_SMODE_PLAURALCLAUSE = unchecked( (int)( 0x1 ) ); - public const int IME_SMODE_SINGLECONVERT = unchecked( (int)( 0x2 ) ); - public const int IME_SMODE_AUTOMATIC = unchecked( (int)( 0x4 ) ); - public const int IME_SMODE_PHRASEPREDICT = unchecked( (int)( 0x8 ) ); + public const int IME_CMODE_ALPHANUMERIC = unchecked((int)(0x0)); + public const int IME_CMODE_NATIVE = unchecked((int)(0x1)); + public const int IME_CMODE_CHINESE = unchecked((int)(IME_CMODE_NATIVE)); + public const int IME_CMODE_HANGEUL = unchecked((int)(IME_CMODE_NATIVE)); + public const int IME_CMODE_JAPANESE = unchecked((int)(IME_CMODE_NATIVE)); + public const int IME_CMODE_KATAKANA = unchecked((int)(0x2));// only effect under IME_CMODE_NATIVE + public const int IME_CMODE_LANGUAGE = unchecked((int)(0x3)); + public const int IME_CMODE_FULLSHAPE = unchecked((int)(0x8)); + public const int IME_CMODE_ROMAN = unchecked((int)(0x10)); + public const int IME_CMODE_CHARCODE = unchecked((int)(0x20)); + public const int IME_CMODE_HANJACONVERT = unchecked((int)(0x40)); + public const int IME_CMODE_SOFTKBD = unchecked((int)(0x80)); + public const int IME_CMODE_NOCONVERSION = unchecked((int)(0x100)); + public const int IME_CMODE_EUDC = unchecked((int)(0x200)); + public const int IME_CMODE_SYMBOL = unchecked((int)(0x400)); + + public const int IME_SMODE_NONE = unchecked((int)(0x0)); + public const int IME_SMODE_PLAURALCLAUSE = unchecked((int)(0x1)); + public const int IME_SMODE_SINGLECONVERT = unchecked((int)(0x2)); + public const int IME_SMODE_AUTOMATIC = unchecked((int)(0x4)); + public const int IME_SMODE_PHRASEPREDICT = unchecked((int)(0x8)); // style of candidate - public const int IME_CAND_UNKNOWN = unchecked( (int)( 0x0 ) ); - public const int IME_CAND_READ = unchecked( (int)( 0x1 ) ); - public const int IME_CAND_CODE = unchecked( (int)( 0x2 ) ); - public const int IME_CAND_MEANING = unchecked( (int)( 0x3 ) ); - public const int IME_CAND_RADICAL = unchecked( (int)( 0x4 ) ); - public const int IME_CAND_STROKE = unchecked( (int)( 0x5 ) ); + public const int IME_CAND_UNKNOWN = unchecked((int)(0x0)); + public const int IME_CAND_READ = unchecked((int)(0x1)); + public const int IME_CAND_CODE = unchecked((int)(0x2)); + public const int IME_CAND_MEANING = unchecked((int)(0x3)); + public const int IME_CAND_RADICAL = unchecked((int)(0x4)); + public const int IME_CAND_STROKE = unchecked((int)(0x5)); // wParam of report message WM_IME_NOTIFY - public const int IMN_CLOSESTATUSWINDOW = unchecked( (int)( 0x1 ) ); - public const int IMN_OPENSTATUSWINDOW = unchecked( (int)( 0x2 ) ); - public const int IMN_CHANGECANDIDATE = unchecked( (int)( 0x3 ) ); - public const int IMN_CLOSECANDIDATE = unchecked( (int)( 0x4 ) ); - public const int IMN_OPENCANDIDATE = unchecked( (int)( 0x5 ) ); - public const int IMN_SETCONVERSIONMODE = unchecked( (int)( 0x6 ) ); - public const int IMN_SETSENTENCEMODE = unchecked( (int)( 0x7 ) ); - public const int IMN_SETOPENSTATUS = unchecked( (int)( 0x8 ) ); - public const int IMN_SETCANDIDATEPOS = unchecked( (int)( 0x9 ) ); - public const int IMN_SETCOMPOSITIONFONT = unchecked( (int)( 0xA ) ); - public const int IMN_SETCOMPOSITIONWINDOW = unchecked( (int)( 0xB ) ); - public const int IMN_SETSTATUSWINDOWPOS = unchecked( (int)( 0xC ) ); - public const int IMN_GUIDELINE = unchecked( (int)( 0xD ) ); - public const int IMN_PRIVATE = unchecked( (int)( 0xE ) ); + public const int IMN_CLOSESTATUSWINDOW = unchecked((int)(0x1)); + public const int IMN_OPENSTATUSWINDOW = unchecked((int)(0x2)); + public const int IMN_CHANGECANDIDATE = unchecked((int)(0x3)); + public const int IMN_CLOSECANDIDATE = unchecked((int)(0x4)); + public const int IMN_OPENCANDIDATE = unchecked((int)(0x5)); + public const int IMN_SETCONVERSIONMODE = unchecked((int)(0x6)); + public const int IMN_SETSENTENCEMODE = unchecked((int)(0x7)); + public const int IMN_SETOPENSTATUS = unchecked((int)(0x8)); + public const int IMN_SETCANDIDATEPOS = unchecked((int)(0x9)); + public const int IMN_SETCOMPOSITIONFONT = unchecked((int)(0xA)); + public const int IMN_SETCOMPOSITIONWINDOW = unchecked((int)(0xB)); + public const int IMN_SETSTATUSWINDOWPOS = unchecked((int)(0xC)); + public const int IMN_GUIDELINE = unchecked((int)(0xD)); + public const int IMN_PRIVATE = unchecked((int)(0xE)); // error code of ImmGetCompositionString - public const int IMM_ERROR_NODATA = unchecked( (int)( ( -1 ) ) ); - public const int IMM_ERROR_GENERAL = unchecked( (int)( ( -2 ) ) ); + public const int IMM_ERROR_NODATA = unchecked((int)((-1))); + public const int IMM_ERROR_GENERAL = unchecked((int)((-2))); // dialog mode of ImmConfigureIME - public const int IME_CONFIG_GENERAL = unchecked( (int)( 1 ) ); - public const int IME_CONFIG_REGISTERWORD = unchecked( (int)( 2 ) ); - public const int IME_CONFIG_SELECTDICTIONARY = unchecked( (int)( 3 ) ); + public const int IME_CONFIG_GENERAL = unchecked((int)(1)); + public const int IME_CONFIG_REGISTERWORD = unchecked((int)(2)); + public const int IME_CONFIG_SELECTDICTIONARY = unchecked((int)(3)); // dialog mode of ImmEscape - public const int IME_ESC_QUERY_SUPPORT = unchecked( (int)( 0x3 ) ); - public const int IME_ESC_RESERVED_FIRST = unchecked( (int)( 0x4 ) ); - public const int IME_ESC_RESERVED_LAST = unchecked( (int)( 0x7FF ) ); - public const int IME_ESC_PRIVATE_FIRST = unchecked( (int)( 0x800 ) ); - public const int IME_ESC_PRIVATE_LAST = unchecked( (int)( 0xFFF ) ); - public const int IME_ESC_SEQUENCE_TO_INTERNAL = unchecked( (int)( 0x1001 ) ); - public const int IME_ESC_GET_EUDC_DICTIONARY = unchecked( (int)( 0x1003 ) ); - public const int IME_ESC_SET_EUDC_DICTIONARY = unchecked( (int)( 0x1004 ) ); - public const int IME_ESC_MAX_KEY = unchecked( (int)( 0x1005 ) ); - public const int IME_ESC_IME_NAME = unchecked( (int)( 0x1006 ) ); - public const int IME_ESC_SYNC_HOTKEY = unchecked( (int)( 0x1007 ) ); - public const int IME_ESC_HANJA_MODE = unchecked( (int)( 0x1008 ) ); + public const int IME_ESC_QUERY_SUPPORT = unchecked((int)(0x3)); + public const int IME_ESC_RESERVED_FIRST = unchecked((int)(0x4)); + public const int IME_ESC_RESERVED_LAST = unchecked((int)(0x7FF)); + public const int IME_ESC_PRIVATE_FIRST = unchecked((int)(0x800)); + public const int IME_ESC_PRIVATE_LAST = unchecked((int)(0xFFF)); + public const int IME_ESC_SEQUENCE_TO_INTERNAL = unchecked((int)(0x1001)); + public const int IME_ESC_GET_EUDC_DICTIONARY = unchecked((int)(0x1003)); + public const int IME_ESC_SET_EUDC_DICTIONARY = unchecked((int)(0x1004)); + public const int IME_ESC_MAX_KEY = unchecked((int)(0x1005)); + public const int IME_ESC_IME_NAME = unchecked((int)(0x1006)); + public const int IME_ESC_SYNC_HOTKEY = unchecked((int)(0x1007)); + public const int IME_ESC_HANJA_MODE = unchecked((int)(0x1008)); // style of word registration - public const int IME_REGWORD_STYLE_EUDC = unchecked( (int)( 0x1 ) ); - public const int IME_REGWORD_STYLE_USER_FIRST = unchecked( (int)( 0x80000000 ) ); - public const int IME_REGWORD_STYLE_USER_LAST = unchecked( (int)( 0xFFFF ) ); + public const int IME_REGWORD_STYLE_EUDC = unchecked((int)(0x1)); + public const int IME_REGWORD_STYLE_USER_FIRST = unchecked((int)(0x80000000)); + public const int IME_REGWORD_STYLE_USER_LAST = unchecked((int)(0xFFFF)); // type of soft keyboard // for Windows Tranditional Chinese Edition - public const int SOFTKEYBOARD_TYPE_T1 = unchecked( (int)( 0x1 ) ); + public const int SOFTKEYBOARD_TYPE_T1 = unchecked((int)(0x1)); // for Windows Simplified Chinese Edition - public const int SOFTKEYBOARD_TYPE_C1 = unchecked( (int)( 0x2 ) ); + public const int SOFTKEYBOARD_TYPE_C1 = unchecked((int)(0x2)); @@ -17993,7 +17993,7 @@ public struct STYLEBUF // ************************************************************************/ - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MODEMDEVCAPS { public int dwActualSize; @@ -18024,7 +18024,7 @@ public struct MODEMDEVCAPS public int abVariablePortion; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MODEMSETTINGS { public int dwActualSize; @@ -18048,44 +18048,44 @@ public struct MODEMSETTINGS } // Dial Options - public const int DIALOPTION_BILLING = unchecked( (int)( 0x40 ) );// Supports wait for bong "$" - public const int DIALOPTION_QUIET = unchecked( (int)( 0x80 ) );// Supports wait for quiet "@" - public const int DIALOPTION_DIALTONE = unchecked( (int)( 0x100 ) );// Supports wait for dial tone "W" + public const int DIALOPTION_BILLING = unchecked((int)(0x40));// Supports wait for bong "$" + public const int DIALOPTION_QUIET = unchecked((int)(0x80));// Supports wait for quiet "@" + public const int DIALOPTION_DIALTONE = unchecked((int)(0x100));// Supports wait for dial tone "W" // SpeakerVolume for MODEMDEVCAPS - public const int MDMVOLFLAG_LOW = unchecked( (int)( 0x1 ) ); - public const int MDMVOLFLAG_MEDIUM = unchecked( (int)( 0x2 ) ); - public const int MDMVOLFLAG_HIGH = unchecked( (int)( 0x4 ) ); + public const int MDMVOLFLAG_LOW = unchecked((int)(0x1)); + public const int MDMVOLFLAG_MEDIUM = unchecked((int)(0x2)); + public const int MDMVOLFLAG_HIGH = unchecked((int)(0x4)); // SpeakerVolume for MODEMSETTINGS - public const int MDMVOL_LOW = unchecked( (int)( 0x0 ) ); - public const int MDMVOL_MEDIUM = unchecked( (int)( 0x1 ) ); - public const int MDMVOL_HIGH = unchecked( (int)( 0x2 ) ); + public const int MDMVOL_LOW = unchecked((int)(0x0)); + public const int MDMVOL_MEDIUM = unchecked((int)(0x1)); + public const int MDMVOL_HIGH = unchecked((int)(0x2)); // SpeakerMode for MODEMDEVCAPS - public const int MDMSPKRFLAG_OFF = unchecked( (int)( 0x1 ) ); - public const int MDMSPKRFLAG_DIAL = unchecked( (int)( 0x2 ) ); - public const int MDMSPKRFLAG_ON = unchecked( (int)( 0x4 ) ); - public const int MDMSPKRFLAG_CALLSETUP = unchecked( (int)( 0x8 ) ); + public const int MDMSPKRFLAG_OFF = unchecked((int)(0x1)); + public const int MDMSPKRFLAG_DIAL = unchecked((int)(0x2)); + public const int MDMSPKRFLAG_ON = unchecked((int)(0x4)); + public const int MDMSPKRFLAG_CALLSETUP = unchecked((int)(0x8)); // SpeakerMode for MODEMSETTINGS - public const int MDMSPKR_OFF = unchecked( (int)( 0x0 ) ); - public const int MDMSPKR_DIAL = unchecked( (int)( 0x1 ) ); - public const int MDMSPKR_ON = unchecked( (int)( 0x2 ) ); - public const int MDMSPKR_CALLSETUP = unchecked( (int)( 0x3 ) ); + public const int MDMSPKR_OFF = unchecked((int)(0x0)); + public const int MDMSPKR_DIAL = unchecked((int)(0x1)); + public const int MDMSPKR_ON = unchecked((int)(0x2)); + public const int MDMSPKR_CALLSETUP = unchecked((int)(0x3)); // Modem Options - public const int MDM_COMPRESSION = unchecked( (int)( 0x1 ) ); - public const int MDM_ERROR_CONTROL = unchecked( (int)( 0x2 ) ); - public const int MDM_FORCED_EC = unchecked( (int)( 0x4 ) ); - public const int MDM_CELLULAR = unchecked( (int)( 0x8 ) ); - public const int MDM_FLOWCONTROL_HARD = unchecked( (int)( 0x10 ) ); - public const int MDM_FLOWCONTROL_SOFT = unchecked( (int)( 0x20 ) ); - public const int MDM_CCITT_OVERRIDE = unchecked( (int)( 0x40 ) ); - public const int MDM_SPEED_ADJUST = unchecked( (int)( 0x80 ) ); - public const int MDM_TONE_DIAL = unchecked( (int)( 0x100 ) ); - public const int MDM_BLIND_DIAL = unchecked( (int)( 0x200 ) ); - public const int MDM_V23_OVERRIDE = unchecked( (int)( 0x400 ) ); + public const int MDM_COMPRESSION = unchecked((int)(0x1)); + public const int MDM_ERROR_CONTROL = unchecked((int)(0x2)); + public const int MDM_FORCED_EC = unchecked((int)(0x4)); + public const int MDM_CELLULAR = unchecked((int)(0x8)); + public const int MDM_FLOWCONTROL_HARD = unchecked((int)(0x10)); + public const int MDM_FLOWCONTROL_SOFT = unchecked((int)(0x20)); + public const int MDM_CCITT_OVERRIDE = unchecked((int)(0x40)); + public const int MDM_SPEED_ADJUST = unchecked((int)(0x80)); + public const int MDM_TONE_DIAL = unchecked((int)(0x100)); + public const int MDM_BLIND_DIAL = unchecked((int)(0x200)); + public const int MDM_V23_OVERRIDE = unchecked((int)(0x400)); @@ -18097,38 +18097,38 @@ public struct MODEMSETTINGS // \*****************************************************************************/ - [DllImport( "shell32.dll", EntryPoint = "DragQueryFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DragQueryFile( int HDROP, int UINT, string lpStr, int ch ); + [DllImport("shell32.dll", EntryPoint = "DragQueryFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DragQueryFile(int HDROP, int UINT, string lpStr, int ch); - [DllImport( "shell32.dll", EntryPoint = "DragQueryPoint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DragQueryPoint( int HDROP, ref POINTAPI lpPoint ); + [DllImport("shell32.dll", EntryPoint = "DragQueryPoint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DragQueryPoint(int HDROP, ref POINTAPI lpPoint); - [DllImport( "shell32.dll", EntryPoint = "DragFinish", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void DragFinish( IntPtr hDrop ); + [DllImport("shell32.dll", EntryPoint = "DragFinish", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void DragFinish(IntPtr hDrop); - [DllImport( "shell32.dll", EntryPoint = "DragAcceptFiles", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void DragAcceptFiles( IntPtr hWnd, int fAccept ); + [DllImport("shell32.dll", EntryPoint = "DragAcceptFiles", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void DragAcceptFiles(IntPtr hWnd, int fAccept); - [DllImport( "shell32.dll", EntryPoint = "ShellExecute", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ShellExecute( IntPtr hWnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd ); + [DllImport("shell32.dll", EntryPoint = "ShellExecute", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ShellExecute(IntPtr hWnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd); - [DllImport( "shell32.dll", EntryPoint = "FindExecutable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FindExecutable( string lpFile, string lpDirectory, string lpResult ); + [DllImport("shell32.dll", EntryPoint = "FindExecutable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FindExecutable(string lpFile, string lpDirectory, string lpResult); - [DllImport( "shell32.dll", EntryPoint = "ShellAbout", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ShellAbout( IntPtr hWnd, string szApp, string szOtherStuff, IntPtr hIcon ); + [DllImport("shell32.dll", EntryPoint = "ShellAbout", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ShellAbout(IntPtr hWnd, string szApp, string szOtherStuff, IntPtr hIcon); - [DllImport( "shell32.dll", EntryPoint = "DuplicateIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DuplicateIcon( IntPtr hInst, IntPtr hIcon ); + [DllImport("shell32.dll", EntryPoint = "DuplicateIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DuplicateIcon(IntPtr hInst, IntPtr hIcon); - [DllImport( "shell32.dll", EntryPoint = "ExtractAssociateIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ExtractAssociatedIcon( IntPtr hInst, string lpIconPath, IntPtr lpiIcon ); + [DllImport("shell32.dll", EntryPoint = "ExtractAssociateIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ExtractAssociatedIcon(IntPtr hInst, string lpIconPath, IntPtr lpiIcon); - [DllImport( "shell32.dll", EntryPoint = "ExtractIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ExtractIcon( IntPtr hInst, string lpszExeFileName, int nIconIndex ); + [DllImport("shell32.dll", EntryPoint = "ExtractIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ExtractIcon(IntPtr hInst, string lpszExeFileName, int nIconIndex); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DRAGINFO { public int uSize;// init with sizeof(DRAGINFO) @@ -18140,36 +18140,36 @@ public struct DRAGINFO // // AppBar stuff - public const int ABM_NEW = unchecked( (int)( 0x0 ) ); - public const int ABM_REMOVE = unchecked( (int)( 0x1 ) ); - public const int ABM_QUERYPOS = unchecked( (int)( 0x2 ) ); - public const int ABM_SETPOS = unchecked( (int)( 0x3 ) ); - public const int ABM_GETSTATE = unchecked( (int)( 0x4 ) ); - public const int ABM_GETTASKBARPOS = unchecked( (int)( 0x5 ) ); - public const int ABM_ACTIVATE = unchecked( (int)( 0x6 ) );// lParam == TRUE/FALSE means activate/deactivate - public const int ABM_GETAUTOHIDEBAR = unchecked( (int)( 0x7 ) ); - public const int ABM_SETAUTOHIDEBAR = unchecked( (int)( 0x8 ) );// this can fail at any time. MUST check the result + public const int ABM_NEW = unchecked((int)(0x0)); + public const int ABM_REMOVE = unchecked((int)(0x1)); + public const int ABM_QUERYPOS = unchecked((int)(0x2)); + public const int ABM_SETPOS = unchecked((int)(0x3)); + public const int ABM_GETSTATE = unchecked((int)(0x4)); + public const int ABM_GETTASKBARPOS = unchecked((int)(0x5)); + public const int ABM_ACTIVATE = unchecked((int)(0x6));// lParam == TRUE/FALSE means activate/deactivate + public const int ABM_GETAUTOHIDEBAR = unchecked((int)(0x7)); + public const int ABM_SETAUTOHIDEBAR = unchecked((int)(0x8));// this can fail at any time. MUST check the result // lParam = TRUE/FALSE Set/Unset // uEdge = what edge - public const int ABM_WINDOWPOSCHANGED = unchecked( (int)( 0x9 ) ); + public const int ABM_WINDOWPOSCHANGED = unchecked((int)(0x9)); // these are put in the wparam of callback messages - public const int ABN_STATECHANGE = unchecked( (int)( 0x0 ) ); - public const int ABN_POSCHANGED = unchecked( (int)( 0x1 ) ); - public const int ABN_FULLSCREENAPP = unchecked( (int)( 0x2 ) ); - public const int ABN_WINDOWARRANGE = unchecked( (int)( 0x3 ) );// lParam == TRUE means hide + public const int ABN_STATECHANGE = unchecked((int)(0x0)); + public const int ABN_POSCHANGED = unchecked((int)(0x1)); + public const int ABN_FULLSCREENAPP = unchecked((int)(0x2)); + public const int ABN_WINDOWARRANGE = unchecked((int)(0x3));// lParam == TRUE means hide // flags for get state - public const int ABS_AUTOHIDE = unchecked( (int)( 0x1 ) ); - public const int ABS_ALWAYSONTOP = unchecked( (int)( 0x2 ) ); - public const int ABE_LEFT = unchecked( (int)( 0 ) ); - public const int ABE_TOP = unchecked( (int)( 1 ) ); - public const int ABE_RIGHT = unchecked( (int)( 2 ) ); - public const int ABE_BOTTOM = unchecked( (int)( 3 ) ); + public const int ABS_AUTOHIDE = unchecked((int)(0x1)); + public const int ABS_ALWAYSONTOP = unchecked((int)(0x2)); + public const int ABE_LEFT = unchecked((int)(0)); + public const int ABE_TOP = unchecked((int)(1)); + public const int ABE_RIGHT = unchecked((int)(2)); + public const int ABE_BOTTOM = unchecked((int)(3)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct APPBARDATA { public int cbSize; @@ -18181,50 +18181,50 @@ public struct APPBARDATA } - [DllImport( "shell32.dll", EntryPoint = "SHAppBarMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SHAppBarMessage( int dwMessage, APPBARDATA pData ); + [DllImport("shell32.dll", EntryPoint = "SHAppBarMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SHAppBarMessage(int dwMessage, APPBARDATA pData); // // EndAppBar - [DllImport( "shell32.dll", EntryPoint = "DoEnvironmentSubst", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DoEnvironmentSubst( string szString, int cbString ); + [DllImport("shell32.dll", EntryPoint = "DoEnvironmentSubst", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DoEnvironmentSubst(string szString, int cbString); - [DllImport( "shell32.dll", EntryPoint = "FindEnvironmentString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern string FindEnvironmentString( string szEnvVar ); + [DllImport("shell32.dll", EntryPoint = "FindEnvironmentString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern string FindEnvironmentString(string szEnvVar); - public const int EIRESID = unchecked( (int)( -1 ) ); + public const int EIRESID = unchecked((int)(-1)); - [DllImport( "shell32.dll", EntryPoint = "ExtractIconEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ExtractIconEx( string lpszFile, int nIconIndex, int phiconLarge, int phiconSmall, int nIcons ); + [DllImport("shell32.dll", EntryPoint = "ExtractIconEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ExtractIconEx(string lpszFile, int nIconIndex, int phiconLarge, int phiconSmall, int nIcons); // // Shell File Operations - public const int FO_MOVE = unchecked( (int)( 0x1 ) ); - public const int FO_COPY = unchecked( (int)( 0x2 ) ); - public const int FO_DELETE = unchecked( (int)( 0x3 ) ); - public const int FO_RENAME = unchecked( (int)( 0x4 ) ); - public const int FOF_MULTIDESTFILES = unchecked( (int)( 0x1 ) ); - public const int FOF_CONFIRMMOUSE = unchecked( (int)( 0x2 ) ); - public const int FOF_SILENT = unchecked( (int)( 0x4 ) );// don't create progress/report - public const int FOF_RENAMEONCOLLISION = unchecked( (int)( 0x8 ) ); - public const int FOF_NOCONFIRMATION = unchecked( (int)( 0x10 ) );// Don't prompt the user. - public const int FOF_WANTMAPPINGHANDLE = unchecked( (int)( 0x20 ) );// Fill in SHFILEOPSTRUCT.hNameMappings + public const int FO_MOVE = unchecked((int)(0x1)); + public const int FO_COPY = unchecked((int)(0x2)); + public const int FO_DELETE = unchecked((int)(0x3)); + public const int FO_RENAME = unchecked((int)(0x4)); + public const int FOF_MULTIDESTFILES = unchecked((int)(0x1)); + public const int FOF_CONFIRMMOUSE = unchecked((int)(0x2)); + public const int FOF_SILENT = unchecked((int)(0x4));// don't create progress/report + public const int FOF_RENAMEONCOLLISION = unchecked((int)(0x8)); + public const int FOF_NOCONFIRMATION = unchecked((int)(0x10));// Don't prompt the user. + public const int FOF_WANTMAPPINGHANDLE = unchecked((int)(0x20));// Fill in SHFILEOPSTRUCT.hNameMappings // Must be freed using SHFreeNameMappings - public const int FOF_ALLOWUNDO = unchecked( (int)( 0x40 ) ); - public const int FOF_FILESONLY = unchecked( (int)( 0x80 ) );// on *.*, do only files - public const int FOF_SIMPLEPROGRESS = unchecked( (int)( 0x100 ) );// means don't show names of files - public const int FOF_NOCONFIRMMKDIR = unchecked( (int)( 0x200 ) );// don't confirm making any needed dirs - - public const int PO_DELETE = unchecked( (int)( 0x13 ) );// printer is being deleted - public const int PO_RENAME = unchecked( (int)( 0x14 ) );// printer is being renamed - public const int PO_PORTCHANGE = unchecked( (int)( 0x20 ) );// port this printer connected to is being changed + public const int FOF_ALLOWUNDO = unchecked((int)(0x40)); + public const int FOF_FILESONLY = unchecked((int)(0x80));// on *.*, do only files + public const int FOF_SIMPLEPROGRESS = unchecked((int)(0x100));// means don't show names of files + public const int FOF_NOCONFIRMMKDIR = unchecked((int)(0x200));// don't confirm making any needed dirs + + public const int PO_DELETE = unchecked((int)(0x13));// printer is being deleted + public const int PO_RENAME = unchecked((int)(0x14));// printer is being renamed + public const int PO_PORTCHANGE = unchecked((int)(0x20));// port this printer connected to is being changed // if this id is set, the strings received by // the copyhook are a doubly-null terminated // list of strings. The first is the printer // name and the second is the printer port. - public const int PO_REN_PORT = unchecked( (int)( 0x34 ) );// PO_RENAME and PO_PORTCHANGE at same time. + public const int PO_REN_PORT = unchecked((int)(0x34));// PO_RENAME and PO_PORTCHANGE at same time. // no POF_ flags currently defined @@ -18235,7 +18235,7 @@ public struct APPBARDATA // // the global confirmation settings - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SHFILEOPSTRUCT { public IntPtr hwnd; @@ -18249,14 +18249,14 @@ public struct SHFILEOPSTRUCT } - [DllImport( "shell32.dll", EntryPoint = "SHFileOperation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SHFileOperation( ref SHFILEOPSTRUCT lpFileOp ); + [DllImport("shell32.dll", EntryPoint = "SHFileOperation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SHFileOperation(ref SHFILEOPSTRUCT lpFileOp); - [DllImport( "shell32.dll", EntryPoint = "SHFreeNameMappings", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void SHFreeNameMappings( IntPtr hNameMappings ); + [DllImport("shell32.dll", EntryPoint = "SHFreeNameMappings", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void SHFreeNameMappings(IntPtr hNameMappings); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SHNAMEMAPPING { public string pszOldPath; @@ -18272,28 +18272,28 @@ public struct SHNAMEMAPPING // ShellExecute() and ShellExecuteEx() error codes // regular WinExec() codes - public const int SE_ERR_FNF = unchecked( (int)( 2 ) );// file not found - public const int SE_ERR_PNF = unchecked( (int)( 3 ) );// path not found - public const int SE_ERR_ACCESSDENIED = unchecked( (int)( 5 ) );// access denied - public const int SE_ERR_OOM = unchecked( (int)( 8 ) );// out of memory - public const int SE_ERR_DLLNOTFOUND = unchecked( (int)( 32 ) ); + public const int SE_ERR_FNF = unchecked((int)(2));// file not found + public const int SE_ERR_PNF = unchecked((int)(3));// path not found + public const int SE_ERR_ACCESSDENIED = unchecked((int)(5));// access denied + public const int SE_ERR_OOM = unchecked((int)(8));// out of memory + public const int SE_ERR_DLLNOTFOUND = unchecked((int)(32)); // Note CLASSKEY overrides CLASSNAME - public const int SEE_MASK_CLASSNAME = unchecked( (int)( 0x1 ) ); - public const int SEE_MASK_CLASSKEY = unchecked( (int)( 0x3 ) ); + public const int SEE_MASK_CLASSNAME = unchecked((int)(0x1)); + public const int SEE_MASK_CLASSKEY = unchecked((int)(0x3)); // Note INVOKEIDLIST overrides IDLIST - public const int SEE_MASK_IDLIST = unchecked( (int)( 0x4 ) ); - public const int SEE_MASK_INVOKEIDLIST = unchecked( (int)( 0xC ) ); - public const int SEE_MASK_ICON = unchecked( (int)( 0x10 ) ); - public const int SEE_MASK_HOTKEY = unchecked( (int)( 0x20 ) ); - public const int SEE_MASK_NOCLOSEPROCESS = unchecked( (int)( 0x40 ) ); - public const int SEE_MASK_CONNECTNETDRV = unchecked( (int)( 0x80 ) ); - public const int SEE_MASK_FLAG_DDEWAIT = unchecked( (int)( 0x100 ) ); - public const int SEE_MASK_DOENVSUBST = unchecked( (int)( 0x200 ) ); - public const int SEE_MASK_FLAG_NO_UI = unchecked( (int)( 0x400 ) ); - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int SEE_MASK_IDLIST = unchecked((int)(0x4)); + public const int SEE_MASK_INVOKEIDLIST = unchecked((int)(0xC)); + public const int SEE_MASK_ICON = unchecked((int)(0x10)); + public const int SEE_MASK_HOTKEY = unchecked((int)(0x20)); + public const int SEE_MASK_NOCLOSEPROCESS = unchecked((int)(0x40)); + public const int SEE_MASK_CONNECTNETDRV = unchecked((int)(0x80)); + public const int SEE_MASK_FLAG_DDEWAIT = unchecked((int)(0x100)); + public const int SEE_MASK_DOENVSUBST = unchecked((int)(0x200)); + public const int SEE_MASK_FLAG_NO_UI = unchecked((int)(0x400)); + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SHELLEXECUTEINFO { public int cbSize; @@ -18315,14 +18315,14 @@ public struct SHELLEXECUTEINFO } - [DllImport( "shell32.dll", EntryPoint = "WinExecError", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void WinExecError( IntPtr hWnd, int error, string lpstrFileName, string lpstrTitle ); + [DllImport("shell32.dll", EntryPoint = "WinExecError", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void WinExecError(IntPtr hWnd, int error, string lpstrFileName, string lpstrTitle); // // End ShellExecuteEx and family // // Tray notification definitions - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct NOTIFYICONDATA { public int cbSize; @@ -18331,23 +18331,23 @@ public struct NOTIFYICONDATA public int uFlags; public int uCallbackMessage; public IntPtr hIcon; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = 64 )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] public string szTip; } - public const int NIM_ADD = unchecked( (int)( 0x0 ) ); - public const int NIM_MODIFY = unchecked( (int)( 0x1 ) ); - public const int NIM_DELETE = unchecked( (int)( 0x2 ) ); + public const int NIM_ADD = unchecked((int)(0x0)); + public const int NIM_MODIFY = unchecked((int)(0x1)); + public const int NIM_DELETE = unchecked((int)(0x2)); - public const int NIF_MESSAGE = unchecked( (int)( 0x1 ) ); - public const int NIF_ICON = unchecked( (int)( 0x2 ) ); - public const int NIF_TIP = unchecked( (int)( 0x4 ) ); + public const int NIF_MESSAGE = unchecked((int)(0x1)); + public const int NIF_ICON = unchecked((int)(0x2)); + public const int NIF_TIP = unchecked((int)(0x4)); - public const int NOTIFYICONDATA_V1_SIZE = unchecked( (int)( 0x58 ) ); + public const int NOTIFYICONDATA_V1_SIZE = unchecked((int)(0x58)); - [DllImport( "shell32.dll", EntryPoint = "Shell_NotifyIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int Shell_NotifyIcon( int dwMessage, ref NOTIFYICONDATA lpData ); + [DllImport("shell32.dll", EntryPoint = "Shell_NotifyIcon", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int Shell_NotifyIcon(int dwMessage, ref NOTIFYICONDATA lpData); // // End Tray Notification Icons @@ -18368,44 +18368,44 @@ public struct NOTIFYICONDATA // * TRUE if things worked // */ - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SHFILEINFO { public IntPtr hIcon;// out: icon public int iIcon;// out: icon index public int dwAttributes;// out: SFGAO_ flags - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = MAX_PATH )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAX_PATH)] public string szDisplayName;// out: display name (or path) - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = 80 )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)] public string szTypeName;// out: type name } - public const int SHGFI_ICON = unchecked( (int)( 0x100 ) );// get icon - public const int SHGFI_DISPLAYNAME = unchecked( (int)( 0x200 ) );// get display name - public const int SHGFI_TYPENAME = unchecked( (int)( 0x400 ) );// get type name - public const int SHGFI_ATTRIBUTES = unchecked( (int)( 0x800 ) );// get attributes - public const int SHGFI_ICONLOCATION = unchecked( (int)( 0x1000 ) );// get icon location - public const int SHGFI_EXETYPE = unchecked( (int)( 0x2000 ) );// return exe type - public const int SHGFI_SYSICONINDEX = unchecked( (int)( 0x4000 ) );// get system icon index - public const int SHGFI_LINKOVERLAY = unchecked( (int)( 0x8000 ) );// put a link overlay on icon - public const int SHGFI_SELECTED = unchecked( (int)( 0x10000 ) );// show icon in selected state - public const int SHGFI_LARGEICON = unchecked( (int)( 0x0 ) );// get large icon - public const int SHGFI_SMALLICON = unchecked( (int)( 0x1 ) );// get small icon - public const int SHGFI_OPENICON = unchecked( (int)( 0x2 ) );// get open icon - public const int SHGFI_SHELLICONSIZE = unchecked( (int)( 0x4 ) );// get shell size icon - public const int SHGFI_PIDL = unchecked( (int)( 0x8 ) );// pszPath is a pidl - public const int SHGFI_USEFILEATTRIBUTES = unchecked( (int)( 0x10 ) );// use passed dwFileAttribute + public const int SHGFI_ICON = unchecked((int)(0x100));// get icon + public const int SHGFI_DISPLAYNAME = unchecked((int)(0x200));// get display name + public const int SHGFI_TYPENAME = unchecked((int)(0x400));// get type name + public const int SHGFI_ATTRIBUTES = unchecked((int)(0x800));// get attributes + public const int SHGFI_ICONLOCATION = unchecked((int)(0x1000));// get icon location + public const int SHGFI_EXETYPE = unchecked((int)(0x2000));// return exe type + public const int SHGFI_SYSICONINDEX = unchecked((int)(0x4000));// get system icon index + public const int SHGFI_LINKOVERLAY = unchecked((int)(0x8000));// put a link overlay on icon + public const int SHGFI_SELECTED = unchecked((int)(0x10000));// show icon in selected state + public const int SHGFI_LARGEICON = unchecked((int)(0x0));// get large icon + public const int SHGFI_SMALLICON = unchecked((int)(0x1));// get small icon + public const int SHGFI_OPENICON = unchecked((int)(0x2));// get open icon + public const int SHGFI_SHELLICONSIZE = unchecked((int)(0x4));// get shell size icon + public const int SHGFI_PIDL = unchecked((int)(0x8));// pszPath is a pidl + public const int SHGFI_USEFILEATTRIBUTES = unchecked((int)(0x10));// use passed dwFileAttribute - [DllImport( "shell32.dll", EntryPoint = "SHGetFileInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SHGetFileInfo( string pszPath, int dwFileAttributes, SHFILEINFO psfi, int cbFileInfo, int uFlags ); + [DllImport("shell32.dll", EntryPoint = "SHGetFileInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SHGetFileInfo(string pszPath, int dwFileAttributes, SHFILEINFO psfi, int cbFileInfo, int uFlags); - [DllImport( "shell32.dll", EntryPoint = "SHGetNewLinkInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SHGetNewLinkInfo( string pszLinkto, string pszDir, string pszName, int pfMustCopy, int uFlags ); + [DllImport("shell32.dll", EntryPoint = "SHGetNewLinkInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SHGetNewLinkInfo(string pszLinkto, string pszDir, string pszName, int pfMustCopy, int uFlags); - public const int SHGNLI_PIDL = unchecked( (int)( 0x1 ) );// pszLinkTo is a pidl - public const int SHGNLI_PREFIXNAME = unchecked( (int)( 0x2 ) );// Make name "Shortcut to xxx" + public const int SHGNLI_PIDL = unchecked((int)(0x1));// pszLinkTo is a pidl + public const int SHGNLI_PREFIXNAME = unchecked((int)(0x2));// Make name "Shortcut to xxx" // // End SHGetFileInfo @@ -18469,106 +18469,106 @@ public struct SHFILEINFO // \*****************************************************************************/ // ----- Symbols ----- - public const int VS_VERSION_INFO = unchecked( (int)( 1 ) ); - public const int VS_USER_DEFINED = unchecked( (int)( 100 ) ); + public const int VS_VERSION_INFO = unchecked((int)(1)); + public const int VS_USER_DEFINED = unchecked((int)(100)); // ----- VS_VERSION.dwFileFlags ----- - public const int VS_FFI_SIGNATURE = unchecked( (int)( 0xFEEF04BD ) ); - public const int VS_FFI_STRUCVERSION = unchecked( (int)( 0x10000 ) ); - public const int VS_FFI_FILEFLAGSMASK = unchecked( (int)( 0x3F ) ); + public const int VS_FFI_SIGNATURE = unchecked((int)(0xFEEF04BD)); + public const int VS_FFI_STRUCVERSION = unchecked((int)(0x10000)); + public const int VS_FFI_FILEFLAGSMASK = unchecked((int)(0x3F)); // ----- VS_VERSION.dwFileFlags ----- - public const int VS_FF_DEBUG = unchecked( (int)( 0x1 ) ); - public const int VS_FF_PRERELEASE = unchecked( (int)( 0x2 ) ); - public const int VS_FF_PATCHED = unchecked( (int)( 0x4 ) ); - public const int VS_FF_PRIVATEBUILD = unchecked( (int)( 0x8 ) ); - public const int VS_FF_INFOINFERRED = unchecked( (int)( 0x10 ) ); - public const int VS_FF_SPECIALBUILD = unchecked( (int)( 0x20 ) ); + public const int VS_FF_DEBUG = unchecked((int)(0x1)); + public const int VS_FF_PRERELEASE = unchecked((int)(0x2)); + public const int VS_FF_PATCHED = unchecked((int)(0x4)); + public const int VS_FF_PRIVATEBUILD = unchecked((int)(0x8)); + public const int VS_FF_INFOINFERRED = unchecked((int)(0x10)); + public const int VS_FF_SPECIALBUILD = unchecked((int)(0x20)); // ----- VS_VERSION.dwFileOS ----- - public const int VOS_UNKNOWN = unchecked( (int)( 0x0 ) ); - public const int VOS_DOS = unchecked( (int)( 0x10000 ) ); - public const int VOS_OS216 = unchecked( (int)( 0x20000 ) ); - public const int VOS_OS232 = unchecked( (int)( 0x30000 ) ); - public const int VOS_NT = unchecked( (int)( 0x40000 ) ); - - public const int VOS__BASE = unchecked( (int)( 0x0 ) ); - public const int VOS__WINDOWS16 = unchecked( (int)( 0x1 ) ); - public const int VOS__PM16 = unchecked( (int)( 0x2 ) ); - public const int VOS__PM32 = unchecked( (int)( 0x3 ) ); - public const int VOS__WINDOWS32 = unchecked( (int)( 0x4 ) ); - - public const int VOS_DOS_WINDOWS16 = unchecked( (int)( 0x10001 ) ); - public const int VOS_DOS_WINDOWS32 = unchecked( (int)( 0x10004 ) ); - public const int VOS_OS216_PM16 = unchecked( (int)( 0x20002 ) ); - public const int VOS_OS232_PM32 = unchecked( (int)( 0x30003 ) ); - public const int VOS_NT_WINDOWS32 = unchecked( (int)( 0x40004 ) ); + public const int VOS_UNKNOWN = unchecked((int)(0x0)); + public const int VOS_DOS = unchecked((int)(0x10000)); + public const int VOS_OS216 = unchecked((int)(0x20000)); + public const int VOS_OS232 = unchecked((int)(0x30000)); + public const int VOS_NT = unchecked((int)(0x40000)); + + public const int VOS__BASE = unchecked((int)(0x0)); + public const int VOS__WINDOWS16 = unchecked((int)(0x1)); + public const int VOS__PM16 = unchecked((int)(0x2)); + public const int VOS__PM32 = unchecked((int)(0x3)); + public const int VOS__WINDOWS32 = unchecked((int)(0x4)); + + public const int VOS_DOS_WINDOWS16 = unchecked((int)(0x10001)); + public const int VOS_DOS_WINDOWS32 = unchecked((int)(0x10004)); + public const int VOS_OS216_PM16 = unchecked((int)(0x20002)); + public const int VOS_OS232_PM32 = unchecked((int)(0x30003)); + public const int VOS_NT_WINDOWS32 = unchecked((int)(0x40004)); // ----- VS_VERSION.dwFileType ----- - public const int VFT_UNKNOWN = unchecked( (int)( 0x0 ) ); - public const int VFT_APP = unchecked( (int)( 0x1 ) ); - public const int VFT_DLL = unchecked( (int)( 0x2 ) ); - public const int VFT_DRV = unchecked( (int)( 0x3 ) ); - public const int VFT_FONT = unchecked( (int)( 0x4 ) ); - public const int VFT_VXD = unchecked( (int)( 0x5 ) ); - public const int VFT_STATIC_LIB = unchecked( (int)( 0x7 ) ); + public const int VFT_UNKNOWN = unchecked((int)(0x0)); + public const int VFT_APP = unchecked((int)(0x1)); + public const int VFT_DLL = unchecked((int)(0x2)); + public const int VFT_DRV = unchecked((int)(0x3)); + public const int VFT_FONT = unchecked((int)(0x4)); + public const int VFT_VXD = unchecked((int)(0x5)); + public const int VFT_STATIC_LIB = unchecked((int)(0x7)); // ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_DRV ----- - public const int VFT2_UNKNOWN = unchecked( (int)( 0x0 ) ); - public const int VFT2_DRV_PRINTER = unchecked( (int)( 0x1 ) ); - public const int VFT2_DRV_KEYBOARD = unchecked( (int)( 0x2 ) ); - public const int VFT2_DRV_LANGUAGE = unchecked( (int)( 0x3 ) ); - public const int VFT2_DRV_DISPLAY = unchecked( (int)( 0x4 ) ); - public const int VFT2_DRV_MOUSE = unchecked( (int)( 0x5 ) ); - public const int VFT2_DRV_NETWORK = unchecked( (int)( 0x6 ) ); - public const int VFT2_DRV_SYSTEM = unchecked( (int)( 0x7 ) ); - public const int VFT2_DRV_INSTALLABLE = unchecked( (int)( 0x8 ) ); - public const int VFT2_DRV_SOUND = unchecked( (int)( 0x9 ) ); - public const int VFT2_DRV_COMM = unchecked( (int)( 0xA ) ); - public const int VFT2_DRV_INPUTMETHOD = unchecked( (int)( 0xB ) ); + public const int VFT2_UNKNOWN = unchecked((int)(0x0)); + public const int VFT2_DRV_PRINTER = unchecked((int)(0x1)); + public const int VFT2_DRV_KEYBOARD = unchecked((int)(0x2)); + public const int VFT2_DRV_LANGUAGE = unchecked((int)(0x3)); + public const int VFT2_DRV_DISPLAY = unchecked((int)(0x4)); + public const int VFT2_DRV_MOUSE = unchecked((int)(0x5)); + public const int VFT2_DRV_NETWORK = unchecked((int)(0x6)); + public const int VFT2_DRV_SYSTEM = unchecked((int)(0x7)); + public const int VFT2_DRV_INSTALLABLE = unchecked((int)(0x8)); + public const int VFT2_DRV_SOUND = unchecked((int)(0x9)); + public const int VFT2_DRV_COMM = unchecked((int)(0xA)); + public const int VFT2_DRV_INPUTMETHOD = unchecked((int)(0xB)); // ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_FONT ----- - public const int VFT2_FONT_RASTER = unchecked( (int)( 0x1 ) ); - public const int VFT2_FONT_VECTOR = unchecked( (int)( 0x2 ) ); - public const int VFT2_FONT_TRUETYPE = unchecked( (int)( 0x3 ) ); + public const int VFT2_FONT_RASTER = unchecked((int)(0x1)); + public const int VFT2_FONT_VECTOR = unchecked((int)(0x2)); + public const int VFT2_FONT_TRUETYPE = unchecked((int)(0x3)); // ----- VerFindFile() flags ----- - public const int VFFF_ISSHAREDFILE = unchecked( (int)( 0x1 ) ); + public const int VFFF_ISSHAREDFILE = unchecked((int)(0x1)); - public const int VFF_CURNEDEST = unchecked( (int)( 0x1 ) ); - public const int VFF_FILEINUSE = unchecked( (int)( 0x2 ) ); - public const int VFF_BUFFTOOSMALL = unchecked( (int)( 0x4 ) ); + public const int VFF_CURNEDEST = unchecked((int)(0x1)); + public const int VFF_FILEINUSE = unchecked((int)(0x2)); + public const int VFF_BUFFTOOSMALL = unchecked((int)(0x4)); // ----- VerInstallFile() flags ----- - public const int VIFF_FORCEINSTALL = unchecked( (int)( 0x1 ) ); - public const int VIFF_DONTDELETEOLD = unchecked( (int)( 0x2 ) ); - - public const int VIF_TEMPFILE = unchecked( (int)( 0x1 ) ); - public const int VIF_MISMATCH = unchecked( (int)( 0x2 ) ); - public const int VIF_SRCOLD = unchecked( (int)( 0x4 ) ); - - public const int VIF_DIFFLANG = unchecked( (int)( 0x8 ) ); - public const int VIF_DIFFCODEPG = unchecked( (int)( 0x10 ) ); - public const int VIF_DIFFTYPE = unchecked( (int)( 0x20 ) ); - - public const int VIF_WRITEPROT = unchecked( (int)( 0x40 ) ); - public const int VIF_FILEINUSE = unchecked( (int)( 0x80 ) ); - public const int VIF_OUTOFSPACE = unchecked( (int)( 0x100 ) ); - public const int VIF_ACCESSVIOLATION = unchecked( (int)( 0x200 ) ); - public const int VIF_SHARINGVIOLATION = unchecked( (int)( 0x400 ) ); - public const int VIF_CANNOTCREATE = unchecked( (int)( 0x800 ) ); - public const int VIF_CANNOTDELETE = unchecked( (int)( 0x1000 ) ); - public const int VIF_CANNOTRENAME = unchecked( (int)( 0x2000 ) ); - public const int VIF_CANNOTDELETECUR = unchecked( (int)( 0x4000 ) ); - public const int VIF_OUTOFMEMORY = unchecked( (int)( 0x8000 ) ); - - public const int VIF_CANNOTREADSRC = unchecked( (int)( 0x10000 ) ); - public const int VIF_CANNOTREADDST = unchecked( (int)( 0x20000 ) ); - public const int VIF_BUFFTOOSMALL = unchecked( (int)( 0x40000 ) ); + public const int VIFF_FORCEINSTALL = unchecked((int)(0x1)); + public const int VIFF_DONTDELETEOLD = unchecked((int)(0x2)); + + public const int VIF_TEMPFILE = unchecked((int)(0x1)); + public const int VIF_MISMATCH = unchecked((int)(0x2)); + public const int VIF_SRCOLD = unchecked((int)(0x4)); + + public const int VIF_DIFFLANG = unchecked((int)(0x8)); + public const int VIF_DIFFCODEPG = unchecked((int)(0x10)); + public const int VIF_DIFFTYPE = unchecked((int)(0x20)); + + public const int VIF_WRITEPROT = unchecked((int)(0x40)); + public const int VIF_FILEINUSE = unchecked((int)(0x80)); + public const int VIF_OUTOFSPACE = unchecked((int)(0x100)); + public const int VIF_ACCESSVIOLATION = unchecked((int)(0x200)); + public const int VIF_SHARINGVIOLATION = unchecked((int)(0x400)); + public const int VIF_CANNOTCREATE = unchecked((int)(0x800)); + public const int VIF_CANNOTDELETE = unchecked((int)(0x1000)); + public const int VIF_CANNOTRENAME = unchecked((int)(0x2000)); + public const int VIF_CANNOTDELETECUR = unchecked((int)(0x4000)); + public const int VIF_OUTOFMEMORY = unchecked((int)(0x8000)); + + public const int VIF_CANNOTREADSRC = unchecked((int)(0x10000)); + public const int VIF_CANNOTREADDST = unchecked((int)(0x20000)); + public const int VIF_BUFFTOOSMALL = unchecked((int)(0x40000)); // ----- Types and structures ----- - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct VS_FIXEDFILEINFO { public int dwSignature; @@ -18589,30 +18589,30 @@ public struct VS_FIXEDFILEINFO // ----- Function prototypes ----- - [DllImport( "version.dll", EntryPoint = "VerFindFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int VerFindFile( int uFlags, string szFileName, string szWinDir, string szAppDir, string szCurDir, IntPtr lpuCurDirLen, string szDestDir, IntPtr lpuDestDirLen ); + [DllImport("version.dll", EntryPoint = "VerFindFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int VerFindFile(int uFlags, string szFileName, string szWinDir, string szAppDir, string szCurDir, IntPtr lpuCurDirLen, string szDestDir, IntPtr lpuDestDirLen); - [DllImport( "version.dll", EntryPoint = "VerInstallFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int VerInstallFile( int uFlags, string szSrcFileName, string szDestFileName, string szSrcDir, string szDestDir, string szCurDir, string szTmpFile, IntPtr lpuTmpFileLen ); + [DllImport("version.dll", EntryPoint = "VerInstallFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int VerInstallFile(int uFlags, string szSrcFileName, string szDestFileName, string szSrcDir, string szDestDir, string szCurDir, string szTmpFile, IntPtr lpuTmpFileLen); // Returns size of version info in Bytes - [DllImport( "version.dll", EntryPoint = "GetFileVersionInfoSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetFileVersionInfoSize( string lptstrFilename, IntPtr lpdwHandle ); + [DllImport("version.dll", EntryPoint = "GetFileVersionInfoSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetFileVersionInfoSize(string lptstrFilename, IntPtr lpdwHandle); // Read version info into buffer // /* Length of buffer for info * // /* Information from GetFileVersionSize * // /* Filename of version stamped file * - [DllImport( "version.dll", EntryPoint = "GetFileVersionInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetFileVersionInfo( string lptstrFilename, int dwHandle, int dwLen, IntPtr lpData ); + [DllImport("version.dll", EntryPoint = "GetFileVersionInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetFileVersionInfo(string lptstrFilename, int dwHandle, int dwLen, IntPtr lpData); - [DllImport( "kernel32", EntryPoint = "VerLanguageName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int VerLanguageName( int wLang, string szLang, int nSize ); + [DllImport("kernel32", EntryPoint = "VerLanguageName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int VerLanguageName(int wLang, string szLang, int nSize); - [DllImport( "version.dll", EntryPoint = "VerQueryValue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int VerQueryValue( object pBlock, string lpSubBlock, IntPtr lplpBuffer, int puLen ); + [DllImport("version.dll", EntryPoint = "VerQueryValue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int VerQueryValue(object pBlock, string lpSubBlock, IntPtr lplpBuffer, int puLen); // *********************************************************************** // * * @@ -18621,7 +18621,7 @@ public struct VS_FIXEDFILEINFO // * Copyright (c) 1990-1995, Microsoft Corp. All rights reserved. * // * * // ************************************************************************/ - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ICONMETRICS { public int cbSize; @@ -18631,7 +18631,7 @@ public struct ICONMETRICS public LOGFONT lfFont; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct HELPINFO { public int cbSize; @@ -18642,14 +18642,14 @@ public struct HELPINFO public POINTAPI MousePos; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ANIMATIONINFO { public int cbSize; public int iMinAnimate; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MINIMIZEDMETRICS { public int cbSize; @@ -18662,68 +18662,68 @@ public struct MINIMIZEDMETRICS // Define API decoration for direct importing of DLL references. - [DllImport( "kernel32", EntryPoint = "HeapValidate", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int HeapValidate( IntPtr hHeap, int dwFlags, IntPtr lpMem ); + [DllImport("kernel32", EntryPoint = "HeapValidate", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int HeapValidate(IntPtr hHeap, int dwFlags, IntPtr lpMem); - [DllImport( "kernel32", EntryPoint = "HeapCompact", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int HeapCompact( IntPtr hHeap, int dwFlags ); + [DllImport("kernel32", EntryPoint = "HeapCompact", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int HeapCompact(IntPtr hHeap, int dwFlags); - public const int PROCESS_HEAP_REGION = unchecked( (int)( 0x1 ) ); - public const int PROCESS_HEAP_UNCOMMITTED_RANGE = unchecked( (int)( 0x2 ) ); - public const int PROCESS_HEAP_ENTRY_BUSY = unchecked( (int)( 0x4 ) ); - public const int PROCESS_HEAP_ENTRY_MOVEABLE = unchecked( (int)( 0x10 ) ); - public const int PROCESS_HEAP_ENTRY_DDESHARE = unchecked( (int)( 0x20 ) ); + public const int PROCESS_HEAP_REGION = unchecked((int)(0x1)); + public const int PROCESS_HEAP_UNCOMMITTED_RANGE = unchecked((int)(0x2)); + public const int PROCESS_HEAP_ENTRY_BUSY = unchecked((int)(0x4)); + public const int PROCESS_HEAP_ENTRY_MOVEABLE = unchecked((int)(0x10)); + public const int PROCESS_HEAP_ENTRY_DDESHARE = unchecked((int)(0x20)); - [DllImport( "kernel32", EntryPoint = "HeapLock", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int HeapLock( IntPtr hHeap ); + [DllImport("kernel32", EntryPoint = "HeapLock", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int HeapLock(IntPtr hHeap); - [DllImport( "kernel32", EntryPoint = "HeapUnlock", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int HeapUnlock( IntPtr hHeap ); + [DllImport("kernel32", EntryPoint = "HeapUnlock", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int HeapUnlock(IntPtr hHeap); // GetBinaryType return values. - public const int SCS_32BIT_BINARY = unchecked( (int)( 0 ) ); - public const int SCS_DOS_BINARY = unchecked( (int)( 1 ) ); - public const int SCS_WOW_BINARY = unchecked( (int)( 2 ) ); - public const int SCS_PIF_BINARY = unchecked( (int)( 3 ) ); - public const int SCS_POSIX_BINARY = unchecked( (int)( 4 ) ); - public const int SCS_OS216_BINARY = unchecked( (int)( 5 ) ); + public const int SCS_32BIT_BINARY = unchecked((int)(0)); + public const int SCS_DOS_BINARY = unchecked((int)(1)); + public const int SCS_WOW_BINARY = unchecked((int)(2)); + public const int SCS_PIF_BINARY = unchecked((int)(3)); + public const int SCS_POSIX_BINARY = unchecked((int)(4)); + public const int SCS_OS216_BINARY = unchecked((int)(5)); - [DllImport( "kernel32", EntryPoint = "GetBinaryType", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetBinaryType( string lpApplicationName, IntPtr lpBinaryType ); + [DllImport("kernel32", EntryPoint = "GetBinaryType", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetBinaryType(string lpApplicationName, IntPtr lpBinaryType); - [DllImport( "kernel32", EntryPoint = "GetShortPathName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetShortPathName( string lpszLongPath, string lpszShortPath, int cchBuffer ); + [DllImport("kernel32", EntryPoint = "GetShortPathName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetShortPathName(string lpszLongPath, string lpszShortPath, int cchBuffer); - [DllImport( "kernel32", EntryPoint = "GetProcessAffinityMask", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetProcessAffinityMask( IntPtr hProcess, IntPtr lpProcessAffinityMask, int SystemAffinityMask ); + [DllImport("kernel32", EntryPoint = "GetProcessAffinityMask", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetProcessAffinityMask(IntPtr hProcess, IntPtr lpProcessAffinityMask, int SystemAffinityMask); // Logon Support APIs - public const int LOGON32_LOGON_INTERACTIVE = unchecked( (int)( 2 ) ); - public const int LOGON32_LOGON_BATCH = unchecked( (int)( 4 ) ); - public const int LOGON32_LOGON_SERVICE = unchecked( (int)( 5 ) ); + public const int LOGON32_LOGON_INTERACTIVE = unchecked((int)(2)); + public const int LOGON32_LOGON_BATCH = unchecked((int)(4)); + public const int LOGON32_LOGON_SERVICE = unchecked((int)(5)); - public const int LOGON32_PROVIDER_DEFAULT = unchecked( (int)( 0 ) ); - public const int LOGON32_PROVIDER_WINNT35 = unchecked( (int)( 1 ) ); + public const int LOGON32_PROVIDER_DEFAULT = unchecked((int)(0)); + public const int LOGON32_PROVIDER_WINNT35 = unchecked((int)(1)); - [DllImport( "kernel32", EntryPoint = "LogonUser", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LogonUser( string lpszUsername, string lpszDomain, string lpszPassword, int dwLogonType, int dwLogonProvider, int phToken ); + [DllImport("kernel32", EntryPoint = "LogonUser", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LogonUser(string lpszUsername, string lpszDomain, string lpszPassword, int dwLogonType, int dwLogonProvider, int phToken); - [DllImport( "kernel32", EntryPoint = "ImpersonateLoggedOnUser", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ImpersonateLoggedOnUser( IntPtr hToken ); + [DllImport("kernel32", EntryPoint = "ImpersonateLoggedOnUser", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ImpersonateLoggedOnUser(IntPtr hToken); - [DllImport( "advapi32.dll", EntryPoint = "CreateProcessAsUser", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateProcessAsUser( IntPtr hToken, string lpApplicationName, string lpCommandLine, SECURITY_ATTRIBUTES lpProcessAttributes, SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, int dwCreationFlags, string lpEnvironment, string lpCurrentDirectory, STARTUPINFO lpStartupInfo, PROCESS_INFORMATION lpProcessInformation ); + [DllImport("advapi32.dll", EntryPoint = "CreateProcessAsUser", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateProcessAsUser(IntPtr hToken, string lpApplicationName, string lpCommandLine, SECURITY_ATTRIBUTES lpProcessAttributes, SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, int dwCreationFlags, string lpEnvironment, string lpCurrentDirectory, STARTUPINFO lpStartupInfo, PROCESS_INFORMATION lpProcessInformation); // Performance counter API's - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct OSVERSIONINFO { public int dwOSVersionInfoSize; @@ -18731,36 +18731,36 @@ public struct OSVERSIONINFO public int dwMinorVersion; public int dwBuildNumber; public int dwPlatformId; - [MarshalAs( UnmanagedType.ByValTStr, SizeConst = 128 )] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string szCSDVersion;// Maintenance string for PSS usage } // dwPlatformId defines: // - public const int VER_PLATFORM_WIN32S = unchecked( (int)( 0 ) ); - public const int VER_PLATFORM_WIN32_WINDOWS = unchecked( (int)( 1 ) ); - public const int VER_PLATFORM_WIN32_NT = unchecked( (int)( 2 ) ); + public const int VER_PLATFORM_WIN32S = unchecked((int)(0)); + public const int VER_PLATFORM_WIN32_WINDOWS = unchecked((int)(1)); + public const int VER_PLATFORM_WIN32_NT = unchecked((int)(2)); - [DllImport( "kernel32", EntryPoint = "GetVersionEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetVersionEx( ref OSVERSIONINFO lpVersionInformation ); + [DllImport("kernel32", EntryPoint = "GetVersionEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetVersionEx(ref OSVERSIONINFO lpVersionInformation); // Power Management APIs - public const int AC_LINE_OFFLINE = unchecked( (int)( 0x0 ) ); - public const int AC_LINE_ONLINE = unchecked( (int)( 0x1 ) ); - public const int AC_LINE_BACKUP_POWER = unchecked( (int)( 0x2 ) ); - public const int AC_LINE_UNKNOWN = unchecked( (int)( 0xFF ) ); - public const int BATTERY_FLAG_HIGH = unchecked( (int)( 0x1 ) ); - public const int BATTERY_FLAG_LOW = unchecked( (int)( 0x2 ) ); - public const int BATTERY_FLAG_CRITICAL = unchecked( (int)( 0x4 ) ); - public const int BATTERY_FLAG_CHARGING = unchecked( (int)( 0x8 ) ); - public const int BATTERY_FLAG_NO_BATTERY = unchecked( (int)( 0x80 ) ); - public const int BATTERY_FLAG_UNKNOWN = unchecked( (int)( 0xFF ) ); - public const int BATTERY_PERCENTAGE_UNKNOWN = unchecked( (int)( 0xFF ) ); - public const int BATTERY_LIFE_UNKNOWN = unchecked( (int)( 0xFFFF ) ); - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + public const int AC_LINE_OFFLINE = unchecked((int)(0x0)); + public const int AC_LINE_ONLINE = unchecked((int)(0x1)); + public const int AC_LINE_BACKUP_POWER = unchecked((int)(0x2)); + public const int AC_LINE_UNKNOWN = unchecked((int)(0xFF)); + public const int BATTERY_FLAG_HIGH = unchecked((int)(0x1)); + public const int BATTERY_FLAG_LOW = unchecked((int)(0x2)); + public const int BATTERY_FLAG_CRITICAL = unchecked((int)(0x4)); + public const int BATTERY_FLAG_CHARGING = unchecked((int)(0x8)); + public const int BATTERY_FLAG_NO_BATTERY = unchecked((int)(0x80)); + public const int BATTERY_FLAG_UNKNOWN = unchecked((int)(0xFF)); + public const int BATTERY_PERCENTAGE_UNKNOWN = unchecked((int)(0xFF)); + public const int BATTERY_LIFE_UNKNOWN = unchecked((int)(0xFFFF)); + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SYSTEM_POWER_STATUS { public byte ACLineStatus; @@ -18772,15 +18772,15 @@ public struct SYSTEM_POWER_STATUS } - [DllImport( "kernel32", EntryPoint = "GetSystemPowerStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSystemPowerStatus( ref SYSTEM_POWER_STATUS lpSystemPowerStatus ); + [DllImport("kernel32", EntryPoint = "GetSystemPowerStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSystemPowerStatus(ref SYSTEM_POWER_STATUS lpSystemPowerStatus); - [DllImport( "kernel32", EntryPoint = "SetSystemPowerState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetSystemPowerState( int fSuspend, int fForce ); + [DllImport("kernel32", EntryPoint = "SetSystemPowerState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetSystemPowerState(int fSuspend, int fForce); // * commdlg.h -- This module defines the 32-Bit Common Dialog APIs * - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct OPENFILENAME { public int lStructSize; @@ -18806,45 +18806,45 @@ public struct OPENFILENAME } - [DllImport( "comdlg32.dll", EntryPoint = "GetOpenFileName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetOpenFileName( OPENFILENAME pOpenfilename ); + [DllImport("comdlg32.dll", EntryPoint = "GetOpenFileName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetOpenFileName(OPENFILENAME pOpenfilename); - [DllImport( "comdlg32.dll", EntryPoint = "GetSaveFileName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSaveFileName( OPENFILENAME pOpenfilename ); + [DllImport("comdlg32.dll", EntryPoint = "GetSaveFileName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSaveFileName(OPENFILENAME pOpenfilename); - [DllImport( "comdlg32.dll", EntryPoint = "GetFileTitle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetFileTitle( string lpszFile, string lpszTitle, int cbBuf ); + [DllImport("comdlg32.dll", EntryPoint = "GetFileTitle", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetFileTitle(string lpszFile, string lpszTitle, int cbBuf); - public const int OFN_READONLY = unchecked( (int)( 0x1 ) ); - public const int OFN_OVERWRITEPROMPT = unchecked( (int)( 0x2 ) ); - public const int OFN_HIDEREADONLY = unchecked( (int)( 0x4 ) ); - public const int OFN_NOCHANGEDIR = unchecked( (int)( 0x8 ) ); - public const int OFN_SHOWHELP = unchecked( (int)( 0x10 ) ); - public const int OFN_ENABLEHOOK = unchecked( (int)( 0x20 ) ); - public const int OFN_ENABLETEMPLATE = unchecked( (int)( 0x40 ) ); - public const int OFN_ENABLETEMPLATEHANDLE = unchecked( (int)( 0x80 ) ); - public const int OFN_NOVALIDATE = unchecked( (int)( 0x100 ) ); - public const int OFN_ALLOWMULTISELECT = unchecked( (int)( 0x200 ) ); - public const int OFN_EXTENSIONDIFFERENT = unchecked( (int)( 0x400 ) ); - public const int OFN_PATHMUSTEXIST = unchecked( (int)( 0x800 ) ); - public const int OFN_FILEMUSTEXIST = unchecked( (int)( 0x1000 ) ); - public const int OFN_CREATEPROMPT = unchecked( (int)( 0x2000 ) ); - public const int OFN_SHAREAWARE = unchecked( (int)( 0x4000 ) ); - public const int OFN_NOREADONLYRETURN = unchecked( (int)( 0x8000 ) ); - public const int OFN_NOTESTFILECREATE = unchecked( (int)( 0x10000 ) ); - public const int OFN_NONETWORKBUTTON = unchecked( (int)( 0x20000 ) ); - public const int OFN_NOLONGNAMES = unchecked( (int)( 0x40000 ) );// force no long names for 4.x modules - public const int OFN_EXPLORER = unchecked( (int)( 0x80000 ) );// new look commdlg - public const int OFN_NODEREFERENCELINKS = unchecked( (int)( 0x100000 ) ); - public const int OFN_LONGNAMES = unchecked( (int)( 0x200000 ) );// force long names for 3.x modules + public const int OFN_READONLY = unchecked((int)(0x1)); + public const int OFN_OVERWRITEPROMPT = unchecked((int)(0x2)); + public const int OFN_HIDEREADONLY = unchecked((int)(0x4)); + public const int OFN_NOCHANGEDIR = unchecked((int)(0x8)); + public const int OFN_SHOWHELP = unchecked((int)(0x10)); + public const int OFN_ENABLEHOOK = unchecked((int)(0x20)); + public const int OFN_ENABLETEMPLATE = unchecked((int)(0x40)); + public const int OFN_ENABLETEMPLATEHANDLE = unchecked((int)(0x80)); + public const int OFN_NOVALIDATE = unchecked((int)(0x100)); + public const int OFN_ALLOWMULTISELECT = unchecked((int)(0x200)); + public const int OFN_EXTENSIONDIFFERENT = unchecked((int)(0x400)); + public const int OFN_PATHMUSTEXIST = unchecked((int)(0x800)); + public const int OFN_FILEMUSTEXIST = unchecked((int)(0x1000)); + public const int OFN_CREATEPROMPT = unchecked((int)(0x2000)); + public const int OFN_SHAREAWARE = unchecked((int)(0x4000)); + public const int OFN_NOREADONLYRETURN = unchecked((int)(0x8000)); + public const int OFN_NOTESTFILECREATE = unchecked((int)(0x10000)); + public const int OFN_NONETWORKBUTTON = unchecked((int)(0x20000)); + public const int OFN_NOLONGNAMES = unchecked((int)(0x40000));// force no long names for 4.x modules + public const int OFN_EXPLORER = unchecked((int)(0x80000));// new look commdlg + public const int OFN_NODEREFERENCELINKS = unchecked((int)(0x100000)); + public const int OFN_LONGNAMES = unchecked((int)(0x200000));// force long names for 3.x modules - public const int OFN_SHAREFALLTHROUGH = unchecked( (int)( 2 ) ); - public const int OFN_SHARENOWARN = unchecked( (int)( 1 ) ); - public const int OFN_SHAREWARN = unchecked( (int)( 0 ) ); + public const int OFN_SHAREFALLTHROUGH = unchecked((int)(2)); + public const int OFN_SHARENOWARN = unchecked((int)(1)); + public const int OFN_SHAREWARN = unchecked((int)(0)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct NMHDR { public IntPtr hwndFrom; @@ -18852,7 +18852,7 @@ public struct NMHDR public int code; } - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct OFNOTIFY { public NMHDR hdr; @@ -18860,17 +18860,17 @@ public struct OFNOTIFY public string pszFile;// May be NULL } - public const int CDM_FIRST = unchecked( (int)( ( WM_USER + 100 ) ) ); - public const int CDM_LAST = unchecked( (int)( ( WM_USER + 200 ) ) ); - public const int CDM_GETSPEC = unchecked( (int)( ( CDM_FIRST + 0x0 ) ) ); - public const int CDM_GETFILEPATH = unchecked( (int)( ( CDM_FIRST + 0x1 ) ) ); - public const int CDM_GETFOLDERPATH = unchecked( (int)( ( CDM_FIRST + 0x2 ) ) ); - public const int CDM_GETFOLDERIDLIST = unchecked( (int)( ( CDM_FIRST + 0x3 ) ) ); - public const int CDM_SETCONTROLTEXT = unchecked( (int)( ( CDM_FIRST + 0x4 ) ) ); - public const int CDM_HIDECONTROL = unchecked( (int)( ( CDM_FIRST + 0x5 ) ) ); - public const int CDM_SETDEFEXT = unchecked( (int)( ( CDM_FIRST + 0x6 ) ) ); + public const int CDM_FIRST = unchecked((int)((WM_USER + 100))); + public const int CDM_LAST = unchecked((int)((WM_USER + 200))); + public const int CDM_GETSPEC = unchecked((int)((CDM_FIRST + 0x0))); + public const int CDM_GETFILEPATH = unchecked((int)((CDM_FIRST + 0x1))); + public const int CDM_GETFOLDERPATH = unchecked((int)((CDM_FIRST + 0x2))); + public const int CDM_GETFOLDERIDLIST = unchecked((int)((CDM_FIRST + 0x3))); + public const int CDM_SETCONTROLTEXT = unchecked((int)((CDM_FIRST + 0x4))); + public const int CDM_HIDECONTROL = unchecked((int)((CDM_FIRST + 0x5))); + public const int CDM_SETDEFEXT = unchecked((int)((CDM_FIRST + 0x6))); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CHOOSECOLOR { public int lStructSize; @@ -18885,20 +18885,20 @@ public struct CHOOSECOLOR } - [DllImport( "comdlg32.dll", EntryPoint = "ChooseColor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ChooseColor( CHOOSECOLOR pChoosecolor ); + [DllImport("comdlg32.dll", EntryPoint = "ChooseColor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ChooseColor(CHOOSECOLOR pChoosecolor); - public const int CC_RGBINIT = unchecked( (int)( 0x1 ) ); - public const int CC_FULLOPEN = unchecked( (int)( 0x2 ) ); - public const int CC_PREVENTFULLOPEN = unchecked( (int)( 0x4 ) ); - public const int CC_SHOWHELP = unchecked( (int)( 0x8 ) ); - public const int CC_ENABLEHOOK = unchecked( (int)( 0x10 ) ); - public const int CC_ENABLETEMPLATE = unchecked( (int)( 0x20 ) ); - public const int CC_ENABLETEMPLATEHANDLE = unchecked( (int)( 0x40 ) ); - public const int CC_SOLIDCOLOR = unchecked( (int)( 0x80 ) ); - public const int CC_ANYCOLOR = unchecked( (int)( 0x100 ) ); + public const int CC_RGBINIT = unchecked((int)(0x1)); + public const int CC_FULLOPEN = unchecked((int)(0x2)); + public const int CC_PREVENTFULLOPEN = unchecked((int)(0x4)); + public const int CC_SHOWHELP = unchecked((int)(0x8)); + public const int CC_ENABLEHOOK = unchecked((int)(0x10)); + public const int CC_ENABLETEMPLATE = unchecked((int)(0x20)); + public const int CC_ENABLETEMPLATEHANDLE = unchecked((int)(0x40)); + public const int CC_SOLIDCOLOR = unchecked((int)(0x80)); + public const int CC_ANYCOLOR = unchecked((int)(0x100)); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct FINDREPLACE { public int lStructSize;// size of this struct 0x20 @@ -18915,33 +18915,33 @@ public struct FINDREPLACE public string lpTemplateName;// custom template name } - public const int FR_DOWN = unchecked( (int)( 0x1 ) ); - public const int FR_WHOLEWORD = unchecked( (int)( 0x2 ) ); - public const int FR_MATCHCASE = unchecked( (int)( 0x4 ) ); - public const int FR_FINDNEXT = unchecked( (int)( 0x8 ) ); - public const int FR_REPLACE = unchecked( (int)( 0x10 ) ); - public const int FR_REPLACEALL = unchecked( (int)( 0x20 ) ); - public const int FR_DIALOGTERM = unchecked( (int)( 0x40 ) ); - public const int FR_SHOWHELP = unchecked( (int)( 0x80 ) ); - public const int FR_ENABLEHOOK = unchecked( (int)( 0x100 ) ); - public const int FR_ENABLETEMPLATE = unchecked( (int)( 0x200 ) ); - public const int FR_NOUPDOWN = unchecked( (int)( 0x400 ) ); - public const int FR_NOMATCHCASE = unchecked( (int)( 0x800 ) ); - public const int FR_NOWHOLEWORD = unchecked( (int)( 0x1000 ) ); - public const int FR_ENABLETEMPLATEHANDLE = unchecked( (int)( 0x2000 ) ); - public const int FR_HIDEUPDOWN = unchecked( (int)( 0x4000 ) ); - public const int FR_HIDEMATCHCASE = unchecked( (int)( 0x8000 ) ); - public const int FR_HIDEWHOLEWORD = unchecked( (int)( 0x10000 ) ); + public const int FR_DOWN = unchecked((int)(0x1)); + public const int FR_WHOLEWORD = unchecked((int)(0x2)); + public const int FR_MATCHCASE = unchecked((int)(0x4)); + public const int FR_FINDNEXT = unchecked((int)(0x8)); + public const int FR_REPLACE = unchecked((int)(0x10)); + public const int FR_REPLACEALL = unchecked((int)(0x20)); + public const int FR_DIALOGTERM = unchecked((int)(0x40)); + public const int FR_SHOWHELP = unchecked((int)(0x80)); + public const int FR_ENABLEHOOK = unchecked((int)(0x100)); + public const int FR_ENABLETEMPLATE = unchecked((int)(0x200)); + public const int FR_NOUPDOWN = unchecked((int)(0x400)); + public const int FR_NOMATCHCASE = unchecked((int)(0x800)); + public const int FR_NOWHOLEWORD = unchecked((int)(0x1000)); + public const int FR_ENABLETEMPLATEHANDLE = unchecked((int)(0x2000)); + public const int FR_HIDEUPDOWN = unchecked((int)(0x4000)); + public const int FR_HIDEMATCHCASE = unchecked((int)(0x8000)); + public const int FR_HIDEWHOLEWORD = unchecked((int)(0x10000)); - [DllImport( "comdlg32.dll", EntryPoint = "FindTextA ", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FindText( FINDREPLACE pFindreplace ); + [DllImport("comdlg32.dll", EntryPoint = "FindTextA ", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FindText(FINDREPLACE pFindreplace); - [DllImport( "comdlg32.dll", EntryPoint = "ReplaceText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ReplaceText( FINDREPLACE pFindreplace ); + [DllImport("comdlg32.dll", EntryPoint = "ReplaceText", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ReplaceText(FINDREPLACE pFindreplace); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct CHOOSEFONT { public int lStructSize; @@ -18968,63 +18968,63 @@ public struct CHOOSEFONT } - [DllImport( "comdlg32.dll", EntryPoint = "ChooseFont", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ChooseFont( CHOOSEFONT pChoosefont ); - - public const int CF_SCREENFONTS = unchecked( (int)( 0x1 ) ); - public const int CF_PRINTERFONTS = unchecked( (int)( 0x2 ) ); - public const int CF_BOTH = unchecked( (int)( ( CF_SCREENFONTS | CF_PRINTERFONTS ) ) ); - public const int CF_SHOWHELP = unchecked( (int)( 0x4 ) ); - public const int CF_ENABLEHOOK = unchecked( (int)( 0x8 ) ); - public const int CF_ENABLETEMPLATE = unchecked( (int)( 0x10 ) ); - public const int CF_ENABLETEMPLATEHANDLE = unchecked( (int)( 0x20 ) ); - public const int CF_INITTOLOGFONTSTRUCT = unchecked( (int)( 0x40 ) ); - public const int CF_USESTYLE = unchecked( (int)( 0x80 ) ); - public const int CF_EFFECTS = unchecked( (int)( 0x100 ) ); - public const int CF_APPLY = unchecked( (int)( 0x200 ) ); - public const int CF_ANSIONLY = unchecked( (int)( 0x400 ) ); - public const int CF_SCRIPTSONLY = unchecked( (int)( CF_ANSIONLY ) ); - public const int CF_NOVECTORFONTS = unchecked( (int)( 0x800 ) ); - public const int CF_NOOEMFONTS = unchecked( (int)( CF_NOVECTORFONTS ) ); - public const int CF_NOSIMULATIONS = unchecked( (int)( 0x1000 ) ); - public const int CF_LIMITSIZE = unchecked( (int)( 0x2000 ) ); - public const int CF_FIXEDPITCHONLY = unchecked( (int)( 0x4000 ) ); - public const int CF_WYSIWYG = unchecked( (int)( 0x8000 ) );// must also have CF_SCREENFONTS CF_PRINTERFONTS - public const int CF_FORCEFONTEXIST = unchecked( (int)( 0x10000 ) ); - public const int CF_SCALABLEONLY = unchecked( (int)( 0x20000 ) ); - public const int CF_TTONLY = unchecked( (int)( 0x40000 ) ); - public const int CF_NOFACESEL = unchecked( (int)( 0x80000 ) ); - public const int CF_NOSTYLESEL = unchecked( (int)( 0x100000 ) ); - public const int CF_NOSIZESEL = unchecked( (int)( 0x200000 ) ); - public const int CF_SELECTSCRIPT = unchecked( (int)( 0x400000 ) ); - public const int CF_NOSCRIPTSEL = unchecked( (int)( 0x800000 ) ); - public const int CF_NOVERTFONTS = unchecked( (int)( 0x1000000 ) ); - - public const int SIMULATED_FONTTYPE = unchecked( (int)( 0x8000 ) ); - public const int PRINTER_FONTTYPE = unchecked( (int)( 0x4000 ) ); - public const int SCREEN_FONTTYPE = unchecked( (int)( 0x2000 ) ); - public const int BOLD_FONTTYPE = unchecked( (int)( 0x100 ) ); - public const int ITALIC_FONTTYPE = unchecked( (int)( 0x200 ) ); - public const int REGULAR_FONTTYPE = unchecked( (int)( 0x400 ) ); - - public const int WM_CHOOSEFONT_GETLOGFONT = unchecked( (int)( ( WM_USER + 1 ) ) ); - public const int WM_CHOOSEFONT_SETLOGFONT = unchecked( (int)( ( WM_USER + 101 ) ) ); - public const int WM_CHOOSEFONT_SETFLAGS = unchecked( (int)( ( WM_USER + 102 ) ) ); - - public const string LBSELCHSTRING = unchecked( (string)( "COMMDLG_LBSELCHANGEDNOTIFY" ) ); - public const string SHAREVISTRING = unchecked( (string)( "COMMDLG_SHAREVIOLATION" ) ); - public const string FILEOKSTRING = unchecked( (string)( "COMMDLG_FILENAMEOK" ) ); - public const string COLOROKSTRING = unchecked( (string)( "COMMDLG_COLOROK" ) ); - public const string SETRGBSTRING = unchecked( (string)( "COMMDLG_SETRGBCOLOR" ) ); - public const string HELPMSGSTRING = unchecked( (string)( "COMMDLG_HELP" ) ); - public const string FINDMSGSTRING = unchecked( (string)( "COMMDLG_FINDREPLACE" ) ); - - public const int CD_LBSELNOITEMS = unchecked( (int)( -1 ) ); - public const int CD_LBSELCHANGE = unchecked( (int)( 0 ) ); - public const int CD_LBSELSUB = unchecked( (int)( 1 ) ); - public const int CD_LBSELADD = unchecked( (int)( 2 ) ); - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [DllImport("comdlg32.dll", EntryPoint = "ChooseFont", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ChooseFont(CHOOSEFONT pChoosefont); + + public const int CF_SCREENFONTS = unchecked((int)(0x1)); + public const int CF_PRINTERFONTS = unchecked((int)(0x2)); + public const int CF_BOTH = unchecked((int)((CF_SCREENFONTS | CF_PRINTERFONTS))); + public const int CF_SHOWHELP = unchecked((int)(0x4)); + public const int CF_ENABLEHOOK = unchecked((int)(0x8)); + public const int CF_ENABLETEMPLATE = unchecked((int)(0x10)); + public const int CF_ENABLETEMPLATEHANDLE = unchecked((int)(0x20)); + public const int CF_INITTOLOGFONTSTRUCT = unchecked((int)(0x40)); + public const int CF_USESTYLE = unchecked((int)(0x80)); + public const int CF_EFFECTS = unchecked((int)(0x100)); + public const int CF_APPLY = unchecked((int)(0x200)); + public const int CF_ANSIONLY = unchecked((int)(0x400)); + public const int CF_SCRIPTSONLY = unchecked((int)(CF_ANSIONLY)); + public const int CF_NOVECTORFONTS = unchecked((int)(0x800)); + public const int CF_NOOEMFONTS = unchecked((int)(CF_NOVECTORFONTS)); + public const int CF_NOSIMULATIONS = unchecked((int)(0x1000)); + public const int CF_LIMITSIZE = unchecked((int)(0x2000)); + public const int CF_FIXEDPITCHONLY = unchecked((int)(0x4000)); + public const int CF_WYSIWYG = unchecked((int)(0x8000));// must also have CF_SCREENFONTS CF_PRINTERFONTS + public const int CF_FORCEFONTEXIST = unchecked((int)(0x10000)); + public const int CF_SCALABLEONLY = unchecked((int)(0x20000)); + public const int CF_TTONLY = unchecked((int)(0x40000)); + public const int CF_NOFACESEL = unchecked((int)(0x80000)); + public const int CF_NOSTYLESEL = unchecked((int)(0x100000)); + public const int CF_NOSIZESEL = unchecked((int)(0x200000)); + public const int CF_SELECTSCRIPT = unchecked((int)(0x400000)); + public const int CF_NOSCRIPTSEL = unchecked((int)(0x800000)); + public const int CF_NOVERTFONTS = unchecked((int)(0x1000000)); + + public const int SIMULATED_FONTTYPE = unchecked((int)(0x8000)); + public const int PRINTER_FONTTYPE = unchecked((int)(0x4000)); + public const int SCREEN_FONTTYPE = unchecked((int)(0x2000)); + public const int BOLD_FONTTYPE = unchecked((int)(0x100)); + public const int ITALIC_FONTTYPE = unchecked((int)(0x200)); + public const int REGULAR_FONTTYPE = unchecked((int)(0x400)); + + public const int WM_CHOOSEFONT_GETLOGFONT = unchecked((int)((WM_USER + 1))); + public const int WM_CHOOSEFONT_SETLOGFONT = unchecked((int)((WM_USER + 101))); + public const int WM_CHOOSEFONT_SETFLAGS = unchecked((int)((WM_USER + 102))); + + public const string LBSELCHSTRING = unchecked((string)("COMMDLG_LBSELCHANGEDNOTIFY")); + public const string SHAREVISTRING = unchecked((string)("COMMDLG_SHAREVIOLATION")); + public const string FILEOKSTRING = unchecked((string)("COMMDLG_FILENAMEOK")); + public const string COLOROKSTRING = unchecked((string)("COMMDLG_COLOROK")); + public const string SETRGBSTRING = unchecked((string)("COMMDLG_SETRGBCOLOR")); + public const string HELPMSGSTRING = unchecked((string)("COMMDLG_HELP")); + public const string FINDMSGSTRING = unchecked((string)("COMMDLG_FINDREPLACE")); + + public const int CD_LBSELNOITEMS = unchecked((int)(-1)); + public const int CD_LBSELCHANGE = unchecked((int)(0)); + public const int CD_LBSELSUB = unchecked((int)(1)); + public const int CD_LBSELADD = unchecked((int)(2)); + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PRINTDLG { public int lStructSize; @@ -19049,35 +19049,35 @@ public struct PRINTDLG } - [DllImport( "comdlg32.dll", EntryPoint = "PrintDlg", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PrintDlg( PRINTDLG pPrintdlg ); - - public const int PD_ALLPAGES = unchecked( (int)( 0x0 ) ); - public const int PD_SELECTION = unchecked( (int)( 0x1 ) ); - public const int PD_PAGENUMS = unchecked( (int)( 0x2 ) ); - public const int PD_NOSELECTION = unchecked( (int)( 0x4 ) ); - public const int PD_NOPAGENUMS = unchecked( (int)( 0x8 ) ); - public const int PD_COLLATE = unchecked( (int)( 0x10 ) ); - public const int PD_PRINTTOFILE = unchecked( (int)( 0x20 ) ); - public const int PD_PRINTSETUP = unchecked( (int)( 0x40 ) ); - public const int PD_NOWARNING = unchecked( (int)( 0x80 ) ); - public const int PD_RETURNDC = unchecked( (int)( 0x100 ) ); - public const int PD_RETURNIC = unchecked( (int)( 0x200 ) ); - public const int PD_RETURNDEFAULT = unchecked( (int)( 0x400 ) ); - public const int PD_SHOWHELP = unchecked( (int)( 0x800 ) ); - public const int PD_ENABLEPRINTHOOK = unchecked( (int)( 0x1000 ) ); - public const int PD_ENABLESETUPHOOK = unchecked( (int)( 0x2000 ) ); - public const int PD_ENABLEPRINTTEMPLATE = unchecked( (int)( 0x4000 ) ); - public const int PD_ENABLESETUPTEMPLATE = unchecked( (int)( 0x8000 ) ); - public const int PD_ENABLEPRINTTEMPLATEHANDLE = unchecked( (int)( 0x10000 ) ); - public const int PD_ENABLESETUPTEMPLATEHANDLE = unchecked( (int)( 0x20000 ) ); - public const int PD_USEDEVMODECOPIES = unchecked( (int)( 0x40000 ) ); - public const int PD_USEDEVMODECOPIESANDCOLLATE = unchecked( (int)( 0x40000 ) ); - public const int PD_DISABLEPRINTTOFILE = unchecked( (int)( 0x80000 ) ); - public const int PD_HIDEPRINTTOFILE = unchecked( (int)( 0x100000 ) ); - public const int PD_NONETWORKBUTTON = unchecked( (int)( 0x200000 ) ); - - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [DllImport("comdlg32.dll", EntryPoint = "PrintDlg", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PrintDlg(PRINTDLG pPrintdlg); + + public const int PD_ALLPAGES = unchecked((int)(0x0)); + public const int PD_SELECTION = unchecked((int)(0x1)); + public const int PD_PAGENUMS = unchecked((int)(0x2)); + public const int PD_NOSELECTION = unchecked((int)(0x4)); + public const int PD_NOPAGENUMS = unchecked((int)(0x8)); + public const int PD_COLLATE = unchecked((int)(0x10)); + public const int PD_PRINTTOFILE = unchecked((int)(0x20)); + public const int PD_PRINTSETUP = unchecked((int)(0x40)); + public const int PD_NOWARNING = unchecked((int)(0x80)); + public const int PD_RETURNDC = unchecked((int)(0x100)); + public const int PD_RETURNIC = unchecked((int)(0x200)); + public const int PD_RETURNDEFAULT = unchecked((int)(0x400)); + public const int PD_SHOWHELP = unchecked((int)(0x800)); + public const int PD_ENABLEPRINTHOOK = unchecked((int)(0x1000)); + public const int PD_ENABLESETUPHOOK = unchecked((int)(0x2000)); + public const int PD_ENABLEPRINTTEMPLATE = unchecked((int)(0x4000)); + public const int PD_ENABLESETUPTEMPLATE = unchecked((int)(0x8000)); + public const int PD_ENABLEPRINTTEMPLATEHANDLE = unchecked((int)(0x10000)); + public const int PD_ENABLESETUPTEMPLATEHANDLE = unchecked((int)(0x20000)); + public const int PD_USEDEVMODECOPIES = unchecked((int)(0x40000)); + public const int PD_USEDEVMODECOPIESANDCOLLATE = unchecked((int)(0x40000)); + public const int PD_DISABLEPRINTTOFILE = unchecked((int)(0x80000)); + public const int PD_HIDEPRINTTOFILE = unchecked((int)(0x100000)); + public const int PD_NONETWORKBUTTON = unchecked((int)(0x200000)); + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DEVNAMES { public int wDriverOffset; @@ -19086,21 +19086,21 @@ public struct DEVNAMES public int wDefault; } - public const int DN_DEFAULTPRN = unchecked( (int)( 0x1 ) ); + public const int DN_DEFAULTPRN = unchecked((int)(0x1)); - [DllImport( "comdlg32.dll", EntryPoint = "CommDlgExtendedError", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("comdlg32.dll", EntryPoint = "CommDlgExtendedError", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int CommDlgExtendedError(); - public const int WM_PSD_PAGESETUPDLG = unchecked( (int)( ( WM_USER ) ) ); - public const int WM_PSD_FULLPAGERECT = unchecked( (int)( ( WM_USER + 1 ) ) ); - public const int WM_PSD_MINMARGINRECT = unchecked( (int)( ( WM_USER + 2 ) ) ); - public const int WM_PSD_MARGINRECT = unchecked( (int)( ( WM_USER + 3 ) ) ); - public const int WM_PSD_GREEKTEXTRECT = unchecked( (int)( ( WM_USER + 4 ) ) ); - public const int WM_PSD_ENVSTAMPRECT = unchecked( (int)( ( WM_USER + 5 ) ) ); - public const int WM_PSD_YAFULLPAGERECT = unchecked( (int)( ( WM_USER + 6 ) ) ); + public const int WM_PSD_PAGESETUPDLG = unchecked((int)((WM_USER))); + public const int WM_PSD_FULLPAGERECT = unchecked((int)((WM_USER + 1))); + public const int WM_PSD_MINMARGINRECT = unchecked((int)((WM_USER + 2))); + public const int WM_PSD_MARGINRECT = unchecked((int)((WM_USER + 3))); + public const int WM_PSD_GREEKTEXTRECT = unchecked((int)((WM_USER + 4))); + public const int WM_PSD_ENVSTAMPRECT = unchecked((int)((WM_USER + 5))); + public const int WM_PSD_YAFULLPAGERECT = unchecked((int)((WM_USER + 6))); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PAGESETUPDLG { public int lStructSize; @@ -19120,70 +19120,70 @@ public struct PAGESETUPDLG } - [DllImport( "comdlg32.dll", EntryPoint = "PageSetupDlg", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PageSetupDlg( PAGESETUPDLG pPagesetupdlg ); + [DllImport("comdlg32.dll", EntryPoint = "PageSetupDlg", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PageSetupDlg(PAGESETUPDLG pPagesetupdlg); - public const int PSD_DEFAULTMINMARGINS = unchecked( (int)( 0x0 ) );// default (printer's) - public const int PSD_INWININIINTLMEASURE = unchecked( (int)( 0x0 ) );// 1st of 4 possible + public const int PSD_DEFAULTMINMARGINS = unchecked((int)(0x0));// default (printer's) + public const int PSD_INWININIINTLMEASURE = unchecked((int)(0x0));// 1st of 4 possible - public const int PSD_MINMARGINS = unchecked( (int)( 0x1 ) );// use caller's - public const int PSD_MARGINS = unchecked( (int)( 0x2 ) );// use caller's - public const int PSD_INTHOUSANDTHSOFINCHES = unchecked( (int)( 0x4 ) );// 2nd of 4 possible - public const int PSD_INHUNDREDTHSOFMILLIMETERS = unchecked( (int)( 0x8 ) );// 3rd of 4 possible - public const int PSD_DISABLEMARGINS = unchecked( (int)( 0x10 ) ); - public const int PSD_DISABLEPRINTER = unchecked( (int)( 0x20 ) ); - public const int PSD_NOWARNING = unchecked( (int)( 0x80 ) );// must be same as PD_* - public const int PSD_DISABLEORIENTATION = unchecked( (int)( 0x100 ) ); - public const int PSD_RETURNDEFAULT = unchecked( (int)( 0x400 ) );// must be same as PD_* - public const int PSD_DISABLEPAPER = unchecked( (int)( 0x200 ) ); - public const int PSD_SHOWHELP = unchecked( (int)( 0x800 ) );// must be same as PD_* - public const int PSD_ENABLEPAGESETUPHOOK = unchecked( (int)( 0x2000 ) );// must be same as PD_* - public const int PSD_ENABLEPAGESETUPTEMPLATE = unchecked( (int)( 0x8000 ) );// must be same as PD_* - public const int PSD_ENABLEPAGESETUPTEMPLATEHANDLE = unchecked( (int)( 0x20000 ) );// must be same as PD_* - public const int PSD_ENABLEPAGEPAINTHOOK = unchecked( (int)( 0x40000 ) ); - public const int PSD_DISABLEPAGEPAINTING = unchecked( (int)( 0x80000 ) ); + public const int PSD_MINMARGINS = unchecked((int)(0x1));// use caller's + public const int PSD_MARGINS = unchecked((int)(0x2));// use caller's + public const int PSD_INTHOUSANDTHSOFINCHES = unchecked((int)(0x4));// 2nd of 4 possible + public const int PSD_INHUNDREDTHSOFMILLIMETERS = unchecked((int)(0x8));// 3rd of 4 possible + public const int PSD_DISABLEMARGINS = unchecked((int)(0x10)); + public const int PSD_DISABLEPRINTER = unchecked((int)(0x20)); + public const int PSD_NOWARNING = unchecked((int)(0x80));// must be same as PD_* + public const int PSD_DISABLEORIENTATION = unchecked((int)(0x100)); + public const int PSD_RETURNDEFAULT = unchecked((int)(0x400));// must be same as PD_* + public const int PSD_DISABLEPAPER = unchecked((int)(0x200)); + public const int PSD_SHOWHELP = unchecked((int)(0x800));// must be same as PD_* + public const int PSD_ENABLEPAGESETUPHOOK = unchecked((int)(0x2000));// must be same as PD_* + public const int PSD_ENABLEPAGESETUPTEMPLATE = unchecked((int)(0x8000));// must be same as PD_* + public const int PSD_ENABLEPAGESETUPTEMPLATEHANDLE = unchecked((int)(0x20000));// must be same as PD_* + public const int PSD_ENABLEPAGEPAINTHOOK = unchecked((int)(0x40000)); + public const int PSD_DISABLEPAGEPAINTING = unchecked((int)(0x80000)); - [DllImport( "user32", EntryPoint = "DdeInitialize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DdeInitialize( int pidInst, int pfnCallback, int afCmd, int ulRes ); + [DllImport("user32", EntryPoint = "DdeInitialize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DdeInitialize(int pidInst, int pfnCallback, int afCmd, int ulRes); - [DllImport( "advapi32", EntryPoint = "SetServiceBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetServiceBits( IntPtr hServiceStatus, int dwServiceBits, bool bSetBitsOn, bool bUpdateImmediately ); + [DllImport("advapi32", EntryPoint = "SetServiceBits", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetServiceBits(IntPtr hServiceStatus, int dwServiceBits, bool bSetBitsOn, bool bUpdateImmediately); - [DllImport( "lz32", EntryPoint = "CopyLZFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CopyLZFile( int n1, int n2 ); + [DllImport("lz32", EntryPoint = "CopyLZFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CopyLZFile(int n1, int n2); - [DllImport( "lz32", EntryPoint = "LZStart", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("lz32", EntryPoint = "LZStart", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int LZStart(); - [DllImport( "lz32", EntryPoint = "LZDone", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("lz32", EntryPoint = "LZDone", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern void LZDone(); - [DllImport( "winmm", EntryPoint = "mciGetYieldProc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mciGetYieldProc( int mciId, int pdwYieldData ); + [DllImport("winmm", EntryPoint = "mciGetYieldProc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mciGetYieldProc(int mciId, int pdwYieldData); - [DllImport( "winmm", EntryPoint = "mciSetYieldProc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int mciSetYieldProc( int mciId, int fpYieldProc, int dwYieldData ); + [DllImport("winmm", EntryPoint = "mciSetYieldProc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int mciSetYieldProc(int mciId, int fpYieldProc, int dwYieldData); - [DllImport( "winmm", EntryPoint = "midiOutGetNumDevs", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("winmm", EntryPoint = "midiOutGetNumDevs", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern int midiOutGetNumDevs(); - [DllImport( "winmm", EntryPoint = "mmioInstallIOProcA", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Winapi )] - public static extern int mmioInstallIOProcA( string fccIOProc, int pIOProc, int dwFlags ); + [DllImport("winmm", EntryPoint = "mmioInstallIOProcA", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)] + public static extern int mmioInstallIOProcA(string fccIOProc, int pIOProc, int dwFlags); - [DllImport( "shell32", EntryPoint = "CommandLineToArgv", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CommandLineToArgv( string lpCmdLine, int pNumArgs ); + [DllImport("shell32", EntryPoint = "CommandLineToArgv", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CommandLineToArgv(string lpCmdLine, int pNumArgs); - [DllImport( "advapi32", EntryPoint = "IsTextUnicode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsTextUnicode( IntPtr lpBuffer, int cb, IntPtr lpi ); + [DllImport("advapi32", EntryPoint = "IsTextUnicode", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsTextUnicode(IntPtr lpBuffer, int cb, IntPtr lpi); - [DllImport( "advapi32", EntryPoint = "NotifyChangeEventLog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int NotifyChangeEventLog( IntPtr hEventLog, IntPtr hEvent ); + [DllImport("advapi32", EntryPoint = "NotifyChangeEventLog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int NotifyChangeEventLog(IntPtr hEventLog, IntPtr hEvent); - [DllImport( "advapi32", EntryPoint = "SetThreadToken", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetThreadToken( int Thread, int Token ); + [DllImport("advapi32", EntryPoint = "SetThreadToken", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetThreadToken(int Thread, int Token); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct COMMCONFIG { public int dwSize; @@ -19197,132 +19197,132 @@ public struct COMMCONFIG } - [DllImport( "kernel32", EntryPoint = "CommConfigDialog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CommConfigDialog( string lpszName, IntPtr hWnd, ref COMMCONFIG lpCC ); + [DllImport("kernel32", EntryPoint = "CommConfigDialog", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CommConfigDialog(string lpszName, IntPtr hWnd, ref COMMCONFIG lpCC); - [DllImport( "kernel32", EntryPoint = "CreateIoCompletionPort", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateIoCompletionPort( int FileHandle, int ExistingCompletionPort, int CompletionKey, int NumberOfConcurrentThreads ); + [DllImport("kernel32", EntryPoint = "CreateIoCompletionPort", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateIoCompletionPort(int FileHandle, int ExistingCompletionPort, int CompletionKey, int NumberOfConcurrentThreads); - [DllImport( "kernel32", EntryPoint = "DisableThreadLibraryCalls", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DisableThreadLibraryCalls( IntPtr hLibModule ); + [DllImport("kernel32", EntryPoint = "DisableThreadLibraryCalls", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DisableThreadLibraryCalls(IntPtr hLibModule); - [DllImport( "kernel32", EntryPoint = "EnumResourceLanguages", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumResourceLanguages( IntPtr hModule, string lpType, string lpName, IntPtr lpEnumFunc, int lParam ); + [DllImport("kernel32", EntryPoint = "EnumResourceLanguages", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumResourceLanguages(IntPtr hModule, string lpType, string lpName, IntPtr lpEnumFunc, int lParam); - [DllImport( "kernel32", EntryPoint = "EnumResourceNames", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumResourceNames( IntPtr hModule, string lpType, IntPtr lpEnumFunc, int lParam ); + [DllImport("kernel32", EntryPoint = "EnumResourceNames", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumResourceNames(IntPtr hModule, string lpType, IntPtr lpEnumFunc, int lParam); - [DllImport( "kernel32", EntryPoint = "EnumResourceTypes", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumResourceTypes( IntPtr hModule, IntPtr lpEnumFunc, int lParam ); + [DllImport("kernel32", EntryPoint = "EnumResourceTypes", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumResourceTypes(IntPtr hModule, IntPtr lpEnumFunc, int lParam); - [DllImport( "kernel32", EntryPoint = "FreeEnvironmentStrings", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FreeEnvironmentStrings( string lpsz ); + [DllImport("kernel32", EntryPoint = "FreeEnvironmentStrings", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FreeEnvironmentStrings(string lpsz); - [DllImport( "kernel32", EntryPoint = "FreeLibraryAndExitThread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void FreeLibraryAndExitThread( IntPtr hLibModule, int dwExitCode ); + [DllImport("kernel32", EntryPoint = "FreeLibraryAndExitThread", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void FreeLibraryAndExitThread(IntPtr hLibModule, int dwExitCode); - [DllImport( "kernel32", EntryPoint = "FreeResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FreeResource( IntPtr hResData ); + [DllImport("kernel32", EntryPoint = "FreeResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FreeResource(IntPtr hResData); - [DllImport( "kernel32", EntryPoint = "GetCommConfig", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCommConfig( IntPtr hCommDev, ref COMMCONFIG lpCC, IntPtr lpdwSize ); + [DllImport("kernel32", EntryPoint = "GetCommConfig", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCommConfig(IntPtr hCommDev, ref COMMCONFIG lpCC, IntPtr lpdwSize); - [DllImport( "kernel32", EntryPoint = "GetCompressedFileSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCompressedFileSize( string lpFileName, IntPtr lpFileSizeHigh ); + [DllImport("kernel32", EntryPoint = "GetCompressedFileSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCompressedFileSize(string lpFileName, IntPtr lpFileSizeHigh); - [DllImport( "kernel32", EntryPoint = "GetDefaultCommConfig", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetDefaultCommConfig( string lpszName, ref COMMCONFIG lpCC, IntPtr lpdwSize ); + [DllImport("kernel32", EntryPoint = "GetDefaultCommConfig", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetDefaultCommConfig(string lpszName, ref COMMCONFIG lpCC, IntPtr lpdwSize); - [DllImport( "kernel32", EntryPoint = "GetHandleInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetHandleInformation( IntPtr hObject, IntPtr lpdwFlags ); + [DllImport("kernel32", EntryPoint = "GetHandleInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetHandleInformation(IntPtr hObject, IntPtr lpdwFlags); - [DllImport( "kernel32", EntryPoint = "GetProcessHeaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetProcessHeaps( int NumberOfHeaps, int ProcessHeaps ); + [DllImport("kernel32", EntryPoint = "GetProcessHeaps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetProcessHeaps(int NumberOfHeaps, int ProcessHeaps); - [DllImport( "kernel32", EntryPoint = "GetProcessWorkingSetSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetProcessWorkingSetSize( IntPtr hProcess, IntPtr lpMinimumWorkingSetSize, IntPtr lpMaximumWorkingSetSize ); + [DllImport("kernel32", EntryPoint = "GetProcessWorkingSetSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetProcessWorkingSetSize(IntPtr hProcess, IntPtr lpMinimumWorkingSetSize, IntPtr lpMaximumWorkingSetSize); - [DllImport( "kernel32", EntryPoint = "GetQueuedCompletionStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetQueuedCompletionStatus( int CompletionPort, IntPtr lpNumberOfBytesTransferred, IntPtr lpCompletionKey, IntPtr lpOverlapped, int dwMilliseconds ); + [DllImport("kernel32", EntryPoint = "GetQueuedCompletionStatus", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetQueuedCompletionStatus(int CompletionPort, IntPtr lpNumberOfBytesTransferred, IntPtr lpCompletionKey, IntPtr lpOverlapped, int dwMilliseconds); - [DllImport( "kernel32", EntryPoint = "GetSystemTimeAdjustment", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSystemTimeAdjustment( IntPtr lpTimeAdjustment, IntPtr lpTimeIncrement, IntPtr lpTimeAdjustmentDisabled ); + [DllImport("kernel32", EntryPoint = "GetSystemTimeAdjustment", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSystemTimeAdjustment(IntPtr lpTimeAdjustment, IntPtr lpTimeIncrement, IntPtr lpTimeAdjustmentDisabled); - [DllImport( "kernel32", EntryPoint = "GlobalCompact", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GlobalCompact( int dwMinFree ); + [DllImport("kernel32", EntryPoint = "GlobalCompact", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GlobalCompact(int dwMinFree); - [DllImport( "kernel32", EntryPoint = "GlobalFix", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void GlobalFix( IntPtr hMem ); + [DllImport("kernel32", EntryPoint = "GlobalFix", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void GlobalFix(IntPtr hMem); - [DllImport( "kernel32", EntryPoint = "GlobalUnfix", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void GlobalUnfix( IntPtr hMem ); + [DllImport("kernel32", EntryPoint = "GlobalUnfix", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void GlobalUnfix(IntPtr hMem); - [DllImport( "kernel32", EntryPoint = "GlobalWire", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GlobalWire( IntPtr hMem ); + [DllImport("kernel32", EntryPoint = "GlobalWire", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GlobalWire(IntPtr hMem); - [DllImport( "kernel32", EntryPoint = "GlobalUnWire", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GlobalUnWire( IntPtr hMem ); + [DllImport("kernel32", EntryPoint = "GlobalUnWire", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GlobalUnWire(IntPtr hMem); - [DllImport( "kernel32", EntryPoint = "IsBadCodePtr", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int IsBadCodePtr( IntPtr lpfn ); + [DllImport("kernel32", EntryPoint = "IsBadCodePtr", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int IsBadCodePtr(IntPtr lpfn); - [DllImport( "kernel32", EntryPoint = "LocalCompact", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LocalCompact( int uMinFree ); + [DllImport("kernel32", EntryPoint = "LocalCompact", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LocalCompact(int uMinFree); - [DllImport( "kernel32", EntryPoint = "LocalShrink", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LocalShrink( IntPtr hMem, int cbNewSize ); + [DllImport("kernel32", EntryPoint = "LocalShrink", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LocalShrink(IntPtr hMem, int cbNewSize); - [DllImport( "KERNEL32", EntryPoint = "RtlMoveMemory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern void ZeroMemory( object dest, int numBytes ); + [DllImport("KERNEL32", EntryPoint = "RtlMoveMemory", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern void ZeroMemory(object dest, int numBytes); - [DllImport( "kernel32", EntryPoint = "ReadFileEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ReadFileEx( IntPtr hFile, IntPtr lpBuffer, int nNumberOfBytesToRead, ref OVERLAPPED lpOverlapped, IntPtr lpCompletionRoutine ); + [DllImport("kernel32", EntryPoint = "ReadFileEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ReadFileEx(IntPtr hFile, IntPtr lpBuffer, int nNumberOfBytesToRead, ref OVERLAPPED lpOverlapped, IntPtr lpCompletionRoutine); - [DllImport( "kernel32", EntryPoint = "SetCommConfig", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetCommConfig( IntPtr hCommDev, ref COMMCONFIG lpCC, int dwSize ); + [DllImport("kernel32", EntryPoint = "SetCommConfig", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetCommConfig(IntPtr hCommDev, ref COMMCONFIG lpCC, int dwSize); - [DllImport( "kernel32", EntryPoint = "SetDefaultCommConfig", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetDefaultCommConfig( string lpszName, ref COMMCONFIG lpCC, int dwSize ); + [DllImport("kernel32", EntryPoint = "SetDefaultCommConfig", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetDefaultCommConfig(string lpszName, ref COMMCONFIG lpCC, int dwSize); - [DllImport( "kernel32", EntryPoint = "SetFileApisToANSI", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] + [DllImport("kernel32", EntryPoint = "SetFileApisToANSI", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] public static extern void SetFileApisToANSI(); - [DllImport( "kernel32", EntryPoint = "SetHandleInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetHandleInformation( IntPtr hObject, int dwMask, int dwFlags ); + [DllImport("kernel32", EntryPoint = "SetHandleInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetHandleInformation(IntPtr hObject, int dwMask, int dwFlags); - [DllImport( "kernel32", EntryPoint = "SetProcessWorkingSetSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetProcessWorkingSetSize( IntPtr hProcess, int dwMinimumWorkingSetSize, int dwMaximumWorkingSetSize ); + [DllImport("kernel32", EntryPoint = "SetProcessWorkingSetSize", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetProcessWorkingSetSize(IntPtr hProcess, int dwMinimumWorkingSetSize, int dwMaximumWorkingSetSize); - [DllImport( "kernel32", EntryPoint = "lstrcat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int lstrcat( string lpString1, string lpString2 ); + [DllImport("kernel32", EntryPoint = "lstrcat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int lstrcat(string lpString1, string lpString2); - [DllImport( "kernel32", EntryPoint = "lstrcpyn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int lstrcpyn( string lpString1, string lpString2, int iMaxLength ); + [DllImport("kernel32", EntryPoint = "lstrcpyn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int lstrcpyn(string lpString1, string lpString2, int iMaxLength); - [DllImport( "kernel32", EntryPoint = "lstrcpy", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int lstrcpy( string lpString1, string lpString2 ); + [DllImport("kernel32", EntryPoint = "lstrcpy", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int lstrcpy(string lpString1, string lpString2); - [DllImport( "kernel32", EntryPoint = "SetSystemTimeAdjustment", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetSystemTimeAdjustment( int dwTimeAdjustment, bool bTimeAdjustmentDisabled ); + [DllImport("kernel32", EntryPoint = "SetSystemTimeAdjustment", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetSystemTimeAdjustment(int dwTimeAdjustment, bool bTimeAdjustmentDisabled); - [DllImport( "kernel32", EntryPoint = "SetThreadAffinityMask", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetThreadAffinityMask( IntPtr hThread, int dwThreadAffinityMask ); + [DllImport("kernel32", EntryPoint = "SetThreadAffinityMask", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetThreadAffinityMask(IntPtr hThread, int dwThreadAffinityMask); - [DllImport( "kernel32", EntryPoint = "SetUnhandledExceptionFilter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetUnhandledExceptionFilter( IntPtr lpTopLevelExceptionFilter ); + [DllImport("kernel32", EntryPoint = "SetUnhandledExceptionFilter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetUnhandledExceptionFilter(IntPtr lpTopLevelExceptionFilter); - [DllImport( "kernel32", EntryPoint = "SystemTimeToTzSpecificLocalTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SystemTimeToTzSpecificLocalTime( ref TIME_ZONE_INFORMATION lpTimeZoneInformation, ref SYSTEMTIME lpUniversalTime, ref SYSTEMTIME lpLocalTime ); + [DllImport("kernel32", EntryPoint = "SystemTimeToTzSpecificLocalTime", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SystemTimeToTzSpecificLocalTime(ref TIME_ZONE_INFORMATION lpTimeZoneInformation, ref SYSTEMTIME lpUniversalTime, ref SYSTEMTIME lpLocalTime); - [DllImport( "kernel32", EntryPoint = "WriteFileEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WriteFileEx( IntPtr hFile, IntPtr lpBuffer, int nNumberOfBytesToWrite, ref OVERLAPPED lpOverlapped, IntPtr lpCompletionRoutine ); + [DllImport("kernel32", EntryPoint = "WriteFileEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WriteFileEx(IntPtr hFile, IntPtr lpBuffer, int nNumberOfBytesToWrite, ref OVERLAPPED lpOverlapped, IntPtr lpCompletionRoutine); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PIXELFORMATDESCRIPTOR { public int nSize; @@ -19354,166 +19354,166 @@ public struct PIXELFORMATDESCRIPTOR } - [DllImport( "gdi32", EntryPoint = "ChoosePixelFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ChoosePixelFormat( IntPtr hDC, PIXELFORMATDESCRIPTOR pPixelFormatDescriptor ); + [DllImport("gdi32", EntryPoint = "ChoosePixelFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ChoosePixelFormat(IntPtr hDC, PIXELFORMATDESCRIPTOR pPixelFormatDescriptor); - [DllImport( "gdi32", EntryPoint = "CreateDIBSection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateDIBSection( IntPtr hDC, BITMAPINFO pBitmapInfo, int un, IntPtr lplpVoid, IntPtr handle, int dw ); + [DllImport("gdi32", EntryPoint = "CreateDIBSection", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateDIBSection(IntPtr hDC, BITMAPINFO pBitmapInfo, int un, IntPtr lplpVoid, IntPtr handle, int dw); - [DllImport( "gdi32", EntryPoint = "DescribePixelFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DescribePixelFormat( IntPtr hDC, int n, int un, ref PIXELFORMATDESCRIPTOR lpPixelFormatDescriptor ); + [DllImport("gdi32", EntryPoint = "DescribePixelFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DescribePixelFormat(IntPtr hDC, int n, int un, ref PIXELFORMATDESCRIPTOR lpPixelFormatDescriptor); - [DllImport( "gdi32", EntryPoint = "EnumFonts", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumFonts( IntPtr hDC, string lpsz, IntPtr lpFontEnumProc, int lParam ); + [DllImport("gdi32", EntryPoint = "EnumFonts", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumFonts(IntPtr hDC, string lpsz, IntPtr lpFontEnumProc, int lParam); - [DllImport( "gdi32", EntryPoint = "EnumMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumMetaFile( IntPtr hDC, IntPtr hMetafile, IntPtr lpMFEnumProc, int lParam ); + [DllImport("gdi32", EntryPoint = "EnumMetaFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumMetaFile(IntPtr hDC, IntPtr hMetafile, IntPtr lpMFEnumProc, int lParam); - [DllImport( "gdi32", EntryPoint = "EnumObjects", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumObjects( IntPtr hDC, int n, IntPtr lpGOBJEnumProc, IntPtr lpVoid ); + [DllImport("gdi32", EntryPoint = "EnumObjects", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumObjects(IntPtr hDC, int n, IntPtr lpGOBJEnumProc, IntPtr lpVoid); - [DllImport( "gdi32", EntryPoint = "FixBrushOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FixBrushOrgEx( IntPtr hDC, int n1, int n2, ref POINTAPI lpPoint ); + [DllImport("gdi32", EntryPoint = "FixBrushOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FixBrushOrgEx(IntPtr hDC, int n1, int n2, ref POINTAPI lpPoint); - [DllImport( "gdi32", EntryPoint = "GetBrushOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetBrushOrgEx( IntPtr hDC, ref POINTAPI lpPoint ); + [DllImport("gdi32", EntryPoint = "GetBrushOrgEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetBrushOrgEx(IntPtr hDC, ref POINTAPI lpPoint); - [DllImport( "gdi32", EntryPoint = "GetDIBColorTable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetDIBColorTable( IntPtr hDC, int un1, int un2, RGBQUAD pRGBQuad ); + [DllImport("gdi32", EntryPoint = "GetDIBColorTable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetDIBColorTable(IntPtr hDC, int un1, int un2, RGBQUAD pRGBQuad); - [DllImport( "gdi32", EntryPoint = "GetPixelFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetPixelFormat( IntPtr hDC ); + [DllImport("gdi32", EntryPoint = "GetPixelFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetPixelFormat(IntPtr hDC); - [DllImport( "gdi32", EntryPoint = "LineDDA", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Winapi )] - public static extern int LineDDA( int n1, int n2, int n3, int n4, IntPtr lpLineDDAProc, int lParam ); + [DllImport("gdi32", EntryPoint = "LineDDA", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)] + public static extern int LineDDA(int n1, int n2, int n3, int n4, IntPtr lpLineDDAProc, int lParam); - [DllImport( "gdi32", EntryPoint = "SetAbortProc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetAbortProc( IntPtr hDC, IntPtr lpAbortProc ); + [DllImport("gdi32", EntryPoint = "SetAbortProc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetAbortProc(IntPtr hDC, IntPtr lpAbortProc); - [DllImport( "gdi32", EntryPoint = "SetDIBColorTable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetDIBColorTable( IntPtr hDC, int un1, int un2, RGBQUAD pcRGBQuad ); + [DllImport("gdi32", EntryPoint = "SetDIBColorTable", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetDIBColorTable(IntPtr hDC, int un1, int un2, RGBQUAD pcRGBQuad); - [DllImport( "gdi32", EntryPoint = "SetPixelFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetPixelFormat( IntPtr hDC, int n, PIXELFORMATDESCRIPTOR pcPixelFormatDescriptor ); + [DllImport("gdi32", EntryPoint = "SetPixelFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetPixelFormat(IntPtr hDC, int n, PIXELFORMATDESCRIPTOR pcPixelFormatDescriptor); - [DllImport( "gdi32", EntryPoint = "SwapBuffers", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SwapBuffers( IntPtr hDC ); + [DllImport("gdi32", EntryPoint = "SwapBuffers", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SwapBuffers(IntPtr hDC); - [DllImport( "kernel32", EntryPoint = "EnumCalendarInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumCalendarInfo( IntPtr lpCalInfoEnumProc, int Locale, int Calendar, int CalType ); + [DllImport("kernel32", EntryPoint = "EnumCalendarInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumCalendarInfo(IntPtr lpCalInfoEnumProc, int Locale, int Calendar, int CalType); - [DllImport( "kernel32", EntryPoint = "GetCurrencyFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetCurrencyFormat( int Locale, int dwFlags, string lpValue, ref CURRENCYFMT lpFormat, string lpCurrencyStr, int cchCurrency ); + [DllImport("kernel32", EntryPoint = "GetCurrencyFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetCurrencyFormat(int Locale, int dwFlags, string lpValue, ref CURRENCYFMT lpFormat, string lpCurrencyStr, int cchCurrency); - [DllImport( "kernel32", EntryPoint = "GetNumberFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetNumberFormat( int Locale, int dwFlags, string lpValue, ref NUMBERFMT lpFormat, string lpNumberStr, int cchNumber ); + [DllImport("kernel32", EntryPoint = "GetNumberFormat", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetNumberFormat(int Locale, int dwFlags, string lpValue, ref NUMBERFMT lpFormat, string lpNumberStr, int cchNumber); - [DllImport( "kernel32", EntryPoint = "GetStringTypeEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetStringTypeEx( int Locale, int dwInfoType, string lpSrcStr, int cchSrc, ref int lpCharType ); + [DllImport("kernel32", EntryPoint = "GetStringTypeEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetStringTypeEx(int Locale, int dwInfoType, string lpSrcStr, int cchSrc, ref int lpCharType); - [DllImport( "kernel32", EntryPoint = "GetStringTypeW", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.Winapi )] - public static extern int GetStringTypeW( int dwInfoType, string lpSrcStr, int cchSrc, ref int lpCharType ); + [DllImport("kernel32", EntryPoint = "GetStringTypeW", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)] + public static extern int GetStringTypeW(int dwInfoType, string lpSrcStr, int cchSrc, ref int lpCharType); - [DllImport( "kernel32", EntryPoint = "SetLocaleInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetLocaleInfo( int Locale, int LCType, string lpLCData ); + [DllImport("kernel32", EntryPoint = "SetLocaleInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetLocaleInfo(int Locale, int LCType, string lpLCData); - [DllImport( "winspool.drv", EntryPoint = "DeletePrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DeletePrinter( IntPtr hPrinter ); + [DllImport("winspool.drv", EntryPoint = "DeletePrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DeletePrinter(IntPtr hPrinter); - [DllImport( "winspool.drv", EntryPoint = "FindClosePrinterChangeNotification", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FindClosePrinterChangeNotification( IntPtr hChange ); + [DllImport("winspool.drv", EntryPoint = "FindClosePrinterChangeNotification", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FindClosePrinterChangeNotification(IntPtr hChange); - [DllImport( "winspool.drv", EntryPoint = "FindFirstPrinterChangeNotification", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FindFirstPrinterChangeNotification( IntPtr hPrinter, int fdwFlags, int fdwOptions, string pPrinterNotifyOptions ); + [DllImport("winspool.drv", EntryPoint = "FindFirstPrinterChangeNotification", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FindFirstPrinterChangeNotification(IntPtr hPrinter, int fdwFlags, int fdwOptions, string pPrinterNotifyOptions); - [DllImport( "winspool.drv", EntryPoint = "FindNextPrinterChangeNotification", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FindNextPrinterChangeNotification( IntPtr hChange, int pdwChange, string pvReserved, int ppPrinterNotifyInfo ); + [DllImport("winspool.drv", EntryPoint = "FindNextPrinterChangeNotification", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FindNextPrinterChangeNotification(IntPtr hChange, int pdwChange, string pvReserved, int ppPrinterNotifyInfo); - [DllImport( "winspool.drv", EntryPoint = "GetPrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetPrinter( IntPtr hPrinter, int Level, object pPrinter, int cbBuf, int pcbNeeded ); + [DllImport("winspool.drv", EntryPoint = "GetPrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetPrinter(IntPtr hPrinter, int Level, object pPrinter, int cbBuf, int pcbNeeded); - [DllImport( "winspool.drv", EntryPoint = "SetPrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetPrinter( IntPtr hPrinter, int Level, byte pPrinter, int Command ); + [DllImport("winspool.drv", EntryPoint = "SetPrinter", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetPrinter(IntPtr hPrinter, int Level, byte pPrinter, int Command); - [DllImport( "user32", EntryPoint = "BroadcastSystemMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int BroadcastSystemMessage( int dw, int pdw, int un, int wParam, int lParam ); + [DllImport("user32", EntryPoint = "BroadcastSystemMessage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int BroadcastSystemMessage(int dw, int pdw, int un, int wParam, int lParam); - [DllImport( "user32", EntryPoint = "CallWindowProc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CallWindowProc( IntPtr lpPrevWndFunc, IntPtr hWnd, int Msg, int wParam, int lParam ); + [DllImport("user32", EntryPoint = "CallWindowProc", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CallWindowProc(IntPtr lpPrevWndFunc, IntPtr hWnd, int Msg, int wParam, int lParam); - [DllImport( "user32", EntryPoint = "CascadeWindows", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CascadeWindows( IntPtr hwndParent, int wHow, RECT lpRect, int cKids, IntPtr lpkids ); + [DllImport("user32", EntryPoint = "CascadeWindows", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CascadeWindows(IntPtr hwndParent, int wHow, RECT lpRect, int cKids, IntPtr lpkids); - [DllImport( "user32", EntryPoint = "ChangeMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ChangeMenu( IntPtr hMenu, int cmd, string lpszNewItem, int cmdInsert, int flags ); + [DllImport("user32", EntryPoint = "ChangeMenu", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ChangeMenu(IntPtr hMenu, int cmd, string lpszNewItem, int cmdInsert, int flags); - [DllImport( "user32", EntryPoint = "CheckMenuRadioItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CheckMenuRadioItem( IntPtr hMenu, int un1, int un2, int un3, int un4 ); + [DllImport("user32", EntryPoint = "CheckMenuRadioItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CheckMenuRadioItem(IntPtr hMenu, int un1, int un2, int un3, int un4); - [DllImport( "user32", EntryPoint = "ChildWindowFromPoint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ChildWindowFromPoint( IntPtr hWndParent, POINTAPI pt ); + [DllImport("user32", EntryPoint = "ChildWindowFromPoint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ChildWindowFromPoint(IntPtr hWndParent, POINTAPI pt); - [DllImport( "user32", EntryPoint = "ChildWindowFromPointEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ChildWindowFromPointEx( IntPtr hWnd, POINTAPI pt, int un ); + [DllImport("user32", EntryPoint = "ChildWindowFromPointEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ChildWindowFromPointEx(IntPtr hWnd, POINTAPI pt, int un); - [DllImport( "user32", EntryPoint = "CloseDesktop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CloseDesktop( IntPtr hDesktop ); + [DllImport("user32", EntryPoint = "CloseDesktop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CloseDesktop(IntPtr hDesktop); - [DllImport( "user32", EntryPoint = "CloseWindowStation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CloseWindowStation( IntPtr hWinSta ); + [DllImport("user32", EntryPoint = "CloseWindowStation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CloseWindowStation(IntPtr hWinSta); - [DllImport( "user32", EntryPoint = "CopyImage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CopyImage( IntPtr handle, int un1, int n1, int n2, int un2 ); + [DllImport("user32", EntryPoint = "CopyImage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CopyImage(IntPtr handle, int un1, int n1, int n2, int un2); - [DllImport( "user32", EntryPoint = "CreateDesktop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateDesktop( string lpszDesktop, string lpszDevice, DEVMODE pDevmode, int dwFlags, int dwDesiredAccess, ref SECURITY_ATTRIBUTES lpsa ); + [DllImport("user32", EntryPoint = "CreateDesktop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateDesktop(string lpszDesktop, string lpszDevice, DEVMODE pDevmode, int dwFlags, int dwDesiredAccess, ref SECURITY_ATTRIBUTES lpsa); - [DllImport( "user32", EntryPoint = "CreateDialogIndirectParam", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateDialogIndirectParam( IntPtr hInstance, ref DLGTEMPLATE lpTemplate, IntPtr hWndParent, IntPtr lpDialogFunc, int dwInitParam ); + [DllImport("user32", EntryPoint = "CreateDialogIndirectParam", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateDialogIndirectParam(IntPtr hInstance, ref DLGTEMPLATE lpTemplate, IntPtr hWndParent, IntPtr lpDialogFunc, int dwInitParam); - [DllImport( "user32", EntryPoint = "CreateDialogParam", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateDialogParam( IntPtr hInstance, string lpName, IntPtr hWndParent, IntPtr lpDialogFunc, int lParamInit ); + [DllImport("user32", EntryPoint = "CreateDialogParam", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateDialogParam(IntPtr hInstance, string lpName, IntPtr hWndParent, IntPtr lpDialogFunc, int lParamInit); - [DllImport( "user32", EntryPoint = "CreateIconFromResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int CreateIconFromResource( byte presbits, int dwResSize, int fIcon, int dwVer ); + [DllImport("user32", EntryPoint = "CreateIconFromResource", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int CreateIconFromResource(byte presbits, int dwResSize, int fIcon, int dwVer); - [DllImport( "user32", EntryPoint = "DialogBoxIndirectParam", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DialogBoxIndirectParam( IntPtr hInstance, ref DLGTEMPLATE hDialogTemplate, IntPtr hWndParent, IntPtr lpDialogFunc, int dwInitParam ); + [DllImport("user32", EntryPoint = "DialogBoxIndirectParam", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DialogBoxIndirectParam(IntPtr hInstance, ref DLGTEMPLATE hDialogTemplate, IntPtr hWndParent, IntPtr lpDialogFunc, int dwInitParam); - [DllImport( "user32", EntryPoint = "DragDetect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DragDetect( IntPtr hWnd, POINTAPI pt ); + [DllImport("user32", EntryPoint = "DragDetect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DragDetect(IntPtr hWnd, POINTAPI pt); - [DllImport( "user32", EntryPoint = "DragObject", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DragObject( IntPtr hWnd1, IntPtr hWnd2, int un, int dw, IntPtr hCursor ); + [DllImport("user32", EntryPoint = "DragObject", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DragObject(IntPtr hWnd1, IntPtr hWnd2, int un, int dw, IntPtr hCursor); - [DllImport( "user32", EntryPoint = "DrawAnimatedRects", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DrawAnimatedRects( IntPtr hWnd, int idAni, ref RECT lprcFrom, ref RECT lprcTo ); + [DllImport("user32", EntryPoint = "DrawAnimatedRects", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DrawAnimatedRects(IntPtr hWnd, int idAni, ref RECT lprcFrom, ref RECT lprcTo); - [DllImport( "user32", EntryPoint = "DrawCaption", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DrawCaption( IntPtr hWnd, IntPtr hDC, RECT pcRect, int un ); + [DllImport("user32", EntryPoint = "DrawCaption", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DrawCaption(IntPtr hWnd, IntPtr hDC, RECT pcRect, int un); - [DllImport( "user32", EntryPoint = "DrawEdge", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DrawEdge( IntPtr hdc, RECT qrc, int edge, int grfFlags ); + [DllImport("user32", EntryPoint = "DrawEdge", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DrawEdge(IntPtr hdc, RECT qrc, int edge, int grfFlags); - [DllImport( "user32", EntryPoint = "DrawFrameControl", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DrawFrameControl( IntPtr hDC, ref RECT lpRect, int un1, int un2 ); + [DllImport("user32", EntryPoint = "DrawFrameControl", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DrawFrameControl(IntPtr hDC, ref RECT lpRect, int un1, int un2); - [DllImport( "user32", EntryPoint = "DrawIconEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DrawIconEx( IntPtr hdc, int xLeft, int yTop, IntPtr hIcon, int cxWidth, int cyWidth, int istepIfAniCur, IntPtr hbrFlickerFreeDraw, int diFlags ); + [DllImport("user32", EntryPoint = "DrawIconEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DrawIconEx(IntPtr hdc, int xLeft, int yTop, IntPtr hIcon, int cxWidth, int cyWidth, int istepIfAniCur, IntPtr hbrFlickerFreeDraw, int diFlags); - [DllImport( "user32", EntryPoint = "DrawState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DrawState( IntPtr hDC, IntPtr hBrush, IntPtr lpDrawStateProc, int lParam, int wParam, int n1, int n2, int n3, int n4, int un ); + [DllImport("user32", EntryPoint = "DrawState", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DrawState(IntPtr hDC, IntPtr hBrush, IntPtr lpDrawStateProc, int lParam, int wParam, int n1, int n2, int n3, int n4, int un); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DRAWTEXTPARAMS { public int cbSize; @@ -19524,50 +19524,50 @@ public struct DRAWTEXTPARAMS } - [DllImport( "user32", EntryPoint = "DrawTextEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int DrawTextEx( IntPtr hDC, string lpsz, int n, ref RECT lpRect, int un, ref DRAWTEXTPARAMS lpDrawTextParams ); + [DllImport("user32", EntryPoint = "DrawTextEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int DrawTextEx(IntPtr hDC, string lpsz, int n, ref RECT lpRect, int un, ref DRAWTEXTPARAMS lpDrawTextParams); - [DllImport( "user32", EntryPoint = "EnumChildWindows", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumChildWindows( IntPtr hWndParent, IntPtr lpEnumFunc, int lParam ); + [DllImport("user32", EntryPoint = "EnumChildWindows", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumChildWindows(IntPtr hWndParent, IntPtr lpEnumFunc, int lParam); - [DllImport( "user32", EntryPoint = "EnumDesktops", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumDesktops( IntPtr hwinsta, IntPtr lpEnumFunc, int lParam ); + [DllImport("user32", EntryPoint = "EnumDesktops", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumDesktops(IntPtr hwinsta, IntPtr lpEnumFunc, int lParam); - [DllImport( "user32", EntryPoint = "EnumDesktopWindows", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumDesktopWindows( IntPtr hDesktop, IntPtr lpfn, int lParam ); + [DllImport("user32", EntryPoint = "EnumDesktopWindows", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumDesktopWindows(IntPtr hDesktop, IntPtr lpfn, int lParam); - [DllImport( "user32", EntryPoint = "EnumPropsEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumPropsEx( IntPtr hWnd, IntPtr lpEnumFunc, int lParam ); + [DllImport("user32", EntryPoint = "EnumPropsEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumPropsEx(IntPtr hWnd, IntPtr lpEnumFunc, int lParam); - [DllImport( "user32", EntryPoint = "EnumProps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumProps( IntPtr hWnd, IntPtr lpEnumFunc ); + [DllImport("user32", EntryPoint = "EnumProps", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumProps(IntPtr hWnd, IntPtr lpEnumFunc); - [DllImport( "user32", EntryPoint = "EnumThreadWindows", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumThreadWindows( int dwThreadId, IntPtr lpfn, int lParam ); + [DllImport("user32", EntryPoint = "EnumThreadWindows", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumThreadWindows(int dwThreadId, IntPtr lpfn, int lParam); - [DllImport( "user32", EntryPoint = "EnumWindows", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumWindows( IntPtr lpEnumFunc, int lParam ); + [DllImport("user32", EntryPoint = "EnumWindows", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumWindows(IntPtr lpEnumFunc, int lParam); - [DllImport( "user32", EntryPoint = "EnumWindowStations", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int EnumWindowStations( IntPtr lpEnumFunc, int lParam ); + [DllImport("user32", EntryPoint = "EnumWindowStations", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int EnumWindowStations(IntPtr lpEnumFunc, int lParam); - [DllImport( "user32", EntryPoint = "FindWindowEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int FindWindowEx( IntPtr hWnd1, IntPtr hWnd2, string lpsz1, string lpsz2 ); + [DllImport("user32", EntryPoint = "FindWindowEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int FindWindowEx(IntPtr hWnd1, IntPtr hWnd2, string lpsz1, string lpsz2); - [DllImport( "user32", EntryPoint = "GetKeyboardLayoutList", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetKeyboardLayoutList( int nBuff, IntPtr lpList ); + [DllImport("user32", EntryPoint = "GetKeyboardLayoutList", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetKeyboardLayoutList(int nBuff, IntPtr lpList); - [DllImport( "user32", EntryPoint = "GetKeyboardLayout", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetKeyboardLayout( int dwLayout ); + [DllImport("user32", EntryPoint = "GetKeyboardLayout", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetKeyboardLayout(int dwLayout); - [DllImport( "user32", EntryPoint = "GetMenuContextHelpId", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetMenuContextHelpId( IntPtr hMenu ); + [DllImport("user32", EntryPoint = "GetMenuContextHelpId", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetMenuContextHelpId(IntPtr hMenu); - [DllImport( "user32", EntryPoint = "GetMenuDefaultItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetMenuDefaultItem( IntPtr hMenu, int fByPos, int gmdiFlags ); + [DllImport("user32", EntryPoint = "GetMenuDefaultItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetMenuDefaultItem(IntPtr hMenu, int fByPos, int gmdiFlags); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MENUITEMINFO { public int cbSize; @@ -19584,13 +19584,13 @@ public struct MENUITEMINFO } - [DllImport( "user32", EntryPoint = "GetMenuItemInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetMenuItemInfo( IntPtr hMenu, int un, int b, ref MENUITEMINFO lpMenuItemInfo ); + [DllImport("user32", EntryPoint = "GetMenuItemInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetMenuItemInfo(IntPtr hMenu, int un, int b, ref MENUITEMINFO lpMenuItemInfo); - [DllImport( "user32", EntryPoint = "GetMenuItemRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetMenuItemRect( IntPtr hWnd, IntPtr hMenu, int uItem, ref RECT lprcItem ); + [DllImport("user32", EntryPoint = "GetMenuItemRect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetMenuItemRect(IntPtr hWnd, IntPtr hMenu, int uItem, ref RECT lprcItem); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SCROLLINFO { public int cbSize; @@ -19603,43 +19603,43 @@ public struct SCROLLINFO } - [DllImport( "user32", EntryPoint = "GetScrollInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetScrollInfo( IntPtr hWnd, int n, ref SCROLLINFO lpScrollInfo ); + [DllImport("user32", EntryPoint = "GetScrollInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetScrollInfo(IntPtr hWnd, int n, ref SCROLLINFO lpScrollInfo); - [DllImport( "user32", EntryPoint = "GetSysColorBrush", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetSysColorBrush( int nIndex ); + [DllImport("user32", EntryPoint = "GetSysColorBrush", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetSysColorBrush(int nIndex); - [DllImport( "user32", EntryPoint = "GetUserObjectInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetUserObjectInformation( IntPtr hObj, int nIndex, object pvInfo, int nLength, IntPtr lpnLengthNeeded ); + [DllImport("user32", EntryPoint = "GetUserObjectInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetUserObjectInformation(IntPtr hObj, int nIndex, object pvInfo, int nLength, IntPtr lpnLengthNeeded); - [DllImport( "user32", EntryPoint = "GetWindowContextHelpId", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWindowContextHelpId( IntPtr hWnd ); + [DllImport("user32", EntryPoint = "GetWindowContextHelpId", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWindowContextHelpId(IntPtr hWnd); - [DllImport( "user32", EntryPoint = "GetWindowRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GetWindowRgn( IntPtr hWnd, IntPtr hRgn ); + [DllImport("user32", EntryPoint = "GetWindowRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GetWindowRgn(IntPtr hWnd, IntPtr hRgn); - [DllImport( "user32", EntryPoint = "GrayString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int GrayString( IntPtr hDC, IntPtr hBrush, IntPtr lpOutputFunc, IntPtr lpData, int nCount, int X, int Y, int nWidth, int nHeight ); + [DllImport("user32", EntryPoint = "GrayString", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int GrayString(IntPtr hDC, IntPtr hBrush, IntPtr lpOutputFunc, IntPtr lpData, int nCount, int X, int Y, int nWidth, int nHeight); - [DllImport( "user32", EntryPoint = "InsertMenuItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int InsertMenuItem( IntPtr hMenu, int un, bool b, ref MENUITEMINFO lpcMenuItemInfo ); + [DllImport("user32", EntryPoint = "InsertMenuItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int InsertMenuItem(IntPtr hMenu, int un, bool b, ref MENUITEMINFO lpcMenuItemInfo); - [DllImport( "user32", EntryPoint = "LoadCursorFromFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LoadCursorFromFile( string lpFileName ); + [DllImport("user32", EntryPoint = "LoadCursorFromFile", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LoadCursorFromFile(string lpFileName); - [DllImport( "user32", EntryPoint = "LoadImage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LoadImage( IntPtr hInst, string lpsz, int un1, int n1, int n2, int un2 ); + [DllImport("user32", EntryPoint = "LoadImage", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LoadImage(IntPtr hInst, string lpsz, int un1, int n1, int n2, int un2); - [DllImport( "user32", EntryPoint = "LookupIconIdFromDirectoryEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int LookupIconIdFromDirectoryEx( byte presbits, bool fIcon, int cxDesired, int cyDesired, int Flags ); + [DllImport("user32", EntryPoint = "LookupIconIdFromDirectoryEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int LookupIconIdFromDirectoryEx(byte presbits, bool fIcon, int cxDesired, int cyDesired, int Flags); - [DllImport( "user32", EntryPoint = "MapVirtualKeyEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MapVirtualKeyEx( int uCode, int uMapType, int dwhkl ); + [DllImport("user32", EntryPoint = "MapVirtualKeyEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MapVirtualKeyEx(int uCode, int uMapType, int dwhkl); - [DllImport( "user32", EntryPoint = "MenuItemFromPoint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MenuItemFromPoint( IntPtr hWnd, IntPtr hMenu, POINTAPI ptScreen ); + [DllImport("user32", EntryPoint = "MenuItemFromPoint", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MenuItemFromPoint(IntPtr hWnd, IntPtr hMenu, POINTAPI ptScreen); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MSGBOXPARAMS { public int cbSize; @@ -19655,22 +19655,22 @@ public struct MSGBOXPARAMS } - [DllImport( "user32", EntryPoint = "MessageBoxIndirect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int MessageBoxIndirect( ref MSGBOXPARAMS lpMsgBoxParams ); + [DllImport("user32", EntryPoint = "MessageBoxIndirect", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int MessageBoxIndirect(ref MSGBOXPARAMS lpMsgBoxParams); - [DllImport( "user32", EntryPoint = "OpenDesktop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenDesktop( string lpszDesktop, int dwFlags, bool fInherit, int dwDesiredAccess ); + [DllImport("user32", EntryPoint = "OpenDesktop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenDesktop(string lpszDesktop, int dwFlags, bool fInherit, int dwDesiredAccess); - [DllImport( "user32", EntryPoint = "OpenInputDesktop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenInputDesktop( int dwFlags, bool fInherit, int dwDesiredAccess ); + [DllImport("user32", EntryPoint = "OpenInputDesktop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenInputDesktop(int dwFlags, bool fInherit, int dwDesiredAccess); - [DllImport( "user32", EntryPoint = "OpenWindowStation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int OpenWindowStation( string lpszWinSta, bool fInherit, int dwDesiredAccess ); + [DllImport("user32", EntryPoint = "OpenWindowStation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int OpenWindowStation(string lpszWinSta, bool fInherit, int dwDesiredAccess); - [DllImport( "user32", EntryPoint = "PaintDesktop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int PaintDesktop( IntPtr hdc ); + [DllImport("user32", EntryPoint = "PaintDesktop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int PaintDesktop(IntPtr hdc); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct WNDCLASSEX { public int cbSize; @@ -19688,67 +19688,67 @@ public struct WNDCLASSEX } - [DllImport( "user32", EntryPoint = "RegisterClassEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int RegisterClassEx( WNDCLASSEX pcWndClassEx ); + [DllImport("user32", EntryPoint = "RegisterClassEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int RegisterClassEx(WNDCLASSEX pcWndClassEx); - [DllImport( "user32", EntryPoint = "SetMenuContextHelpId", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetMenuContextHelpId( IntPtr hMenu, int dw ); + [DllImport("user32", EntryPoint = "SetMenuContextHelpId", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetMenuContextHelpId(IntPtr hMenu, int dw); - [DllImport( "user32", EntryPoint = "SetMenuDefaultItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetMenuDefaultItem( IntPtr hMenu, int uItem, int fByPos ); + [DllImport("user32", EntryPoint = "SetMenuDefaultItem", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetMenuDefaultItem(IntPtr hMenu, int uItem, int fByPos); - [DllImport( "user32", EntryPoint = "SetMenuItemInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetMenuItemInfo( IntPtr hMenu, int un, bool b, ref MENUITEMINFO lpcMenuItemInfo ); + [DllImport("user32", EntryPoint = "SetMenuItemInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetMenuItemInfo(IntPtr hMenu, int un, bool b, ref MENUITEMINFO lpcMenuItemInfo); - [DllImport( "user32", EntryPoint = "SetMessageExtraInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetMessageExtraInfo( int lParam ); + [DllImport("user32", EntryPoint = "SetMessageExtraInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetMessageExtraInfo(int lParam); - [DllImport( "user32", EntryPoint = "SetMessageQueue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetMessageQueue( int cMessagesMax ); + [DllImport("user32", EntryPoint = "SetMessageQueue", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetMessageQueue(int cMessagesMax); - [DllImport( "user32", EntryPoint = "SetProcessWindowStation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetProcessWindowStation( IntPtr hWinSta ); + [DllImport("user32", EntryPoint = "SetProcessWindowStation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetProcessWindowStation(IntPtr hWinSta); - [DllImport( "user32", EntryPoint = "SetScrollInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetScrollInfo( IntPtr hWnd, int n, ref SCROLLINFO lpcScrollInfo, bool b ); + [DllImport("user32", EntryPoint = "SetScrollInfo", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetScrollInfo(IntPtr hWnd, int n, ref SCROLLINFO lpcScrollInfo, bool b); - [DllImport( "user32", EntryPoint = "SetSystemCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetSystemCursor( IntPtr hcur, int id ); + [DllImport("user32", EntryPoint = "SetSystemCursor", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetSystemCursor(IntPtr hcur, int id); - [DllImport( "user32", EntryPoint = "SetThreadDesktop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetThreadDesktop( IntPtr hDesktop ); + [DllImport("user32", EntryPoint = "SetThreadDesktop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetThreadDesktop(IntPtr hDesktop); - [DllImport( "user32", EntryPoint = "SetTimer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetTimer( IntPtr hWnd, int nIDEvent, int uElapse, IntPtr lpTimerFunc ); + [DllImport("user32", EntryPoint = "SetTimer", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetTimer(IntPtr hWnd, int nIDEvent, int uElapse, IntPtr lpTimerFunc); - [DllImport( "user32", EntryPoint = "SetUserObjectInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetUserObjectInformation( IntPtr hObj, int nIndex, object pvInfo, int nLength ); + [DllImport("user32", EntryPoint = "SetUserObjectInformation", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetUserObjectInformation(IntPtr hObj, int nIndex, object pvInfo, int nLength); - [DllImport( "user32", EntryPoint = "SetWindowContextHelpId", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetWindowContextHelpId( IntPtr hWnd, int dw ); + [DllImport("user32", EntryPoint = "SetWindowContextHelpId", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetWindowContextHelpId(IntPtr hWnd, int dw); - [DllImport( "user32", EntryPoint = "SetWindowRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetWindowRgn( IntPtr hWnd, IntPtr hRgn, bool bRedraw ); + [DllImport("user32", EntryPoint = "SetWindowRgn", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetWindowRgn(IntPtr hWnd, IntPtr hRgn, bool bRedraw); - [DllImport( "user32", EntryPoint = "SetWindowsHook", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetWindowsHook( int nFilterType, int pfnFilterProc ); + [DllImport("user32", EntryPoint = "SetWindowsHook", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetWindowsHook(int nFilterType, int pfnFilterProc); - [DllImport( "user32", EntryPoint = "SetWindowsHookEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SetWindowsHookEx( int idHook, IntPtr lpfn, IntPtr hmod, int dwThreadId ); + [DllImport("user32", EntryPoint = "SetWindowsHookEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SetWindowsHookEx(int idHook, IntPtr lpfn, IntPtr hmod, int dwThreadId); - [DllImport( "user32", EntryPoint = "ShowWindowAsync", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ShowWindowAsync( IntPtr hWnd, int nCmdShow ); + [DllImport("user32", EntryPoint = "ShowWindowAsync", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ShowWindowAsync(IntPtr hWnd, int nCmdShow); - [DllImport( "user32", EntryPoint = "SwitchDesktop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int SwitchDesktop( IntPtr hDesktop ); + [DllImport("user32", EntryPoint = "SwitchDesktop", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int SwitchDesktop(IntPtr hDesktop); - [DllImport( "user32", EntryPoint = "TileWindows", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int TileWindows( IntPtr hwndParent, int wHow, ref RECT lpRect, int cKids, IntPtr lpKids ); + [DllImport("user32", EntryPoint = "TileWindows", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int TileWindows(IntPtr hwndParent, int wHow, ref RECT lpRect, int cKids, IntPtr lpKids); - [DllImport( "user32", EntryPoint = "ToAsciiEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int ToAsciiEx( int uVirtKey, int uScanCode, ref byte lpKeyState, ref int lpChar, int uFlags, int dwhkl ); + [DllImport("user32", EntryPoint = "ToAsciiEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int ToAsciiEx(int uVirtKey, int uScanCode, ref byte lpKeyState, ref int lpChar, int uFlags, int dwhkl); - [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Auto )] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct TPMPARAMS { public int cbSize; @@ -19756,59 +19756,59 @@ public struct TPMPARAMS } - [DllImport( "user32", EntryPoint = "TrackPopupMenuEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int TrackPopupMenuEx( IntPtr hMenu, int un, int n1, int n2, IntPtr hWnd, ref TPMPARAMS lpTPMParams ); + [DllImport("user32", EntryPoint = "TrackPopupMenuEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int TrackPopupMenuEx(IntPtr hMenu, int un, int n1, int n2, IntPtr hWnd, ref TPMPARAMS lpTPMParams); - [DllImport( "user32", EntryPoint = "UnhookWindowsHook", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int UnhookWindowsHook( int nCode, int pfnFilterProc ); + [DllImport("user32", EntryPoint = "UnhookWindowsHook", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int UnhookWindowsHook(int nCode, int pfnFilterProc); - [DllImport( "user32", EntryPoint = "VkKeyScanEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int VkKeyScanEx( byte ch, int dwhkl ); + [DllImport("user32", EntryPoint = "VkKeyScanEx", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int VkKeyScanEx(byte ch, int dwhkl); - [DllImport( "mpr", EntryPoint = "WNetGetUniversalName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi )] - public static extern int WNetGetUniversalName( string lpLocalPath, int dwInfoLevel, IntPtr lpBuffer, IntPtr lpBufferSize ); + [DllImport("mpr", EntryPoint = "WNetGetUniversalName", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = false, CallingConvention = CallingConvention.Winapi)] + public static extern int WNetGetUniversalName(string lpLocalPath, int dwInfoLevel, IntPtr lpBuffer, IntPtr lpBufferSize); - public const int INVALID_HANDLE_VALUE = unchecked( (int)( -1 ) ); + public const int INVALID_HANDLE_VALUE = unchecked((int)(-1)); //DrawEdge Constants - public const int BDR_RAISEDOUTER = unchecked( (int)( 0x1 ) ); - public const int BDR_SUNKENOUTER = unchecked( (int)( 0x2 ) ); - public const int BDR_RAISEDINNER = unchecked( (int)( 0x4 ) ); - public const int BDR_SUNKENINNER = unchecked( (int)( 0x8 ) ); - - public const int BDR_OUTER = unchecked( (int)( 0x3 ) ); - public const int BDR_INNER = unchecked( (int)( 0xC ) ); - public const int BDR_RAISED = unchecked( (int)( 0x5 ) ); - public const int BDR_SUNKEN = unchecked( (int)( 0xA ) ); - - public const int EDGE_RAISED = unchecked( (int)( ( BDR_RAISEDOUTER | BDR_RAISEDINNER ) ) ); - public const int EDGE_SUNKEN = unchecked( (int)( ( BDR_SUNKENOUTER | BDR_SUNKENINNER ) ) ); - public const int EDGE_ETCHED = unchecked( (int)( ( BDR_SUNKENOUTER | BDR_RAISEDINNER ) ) ); - public const int EDGE_BUMP = unchecked( (int)( ( BDR_RAISEDOUTER | BDR_SUNKENINNER ) ) ); - - public const int BF_LEFT = unchecked( (int)( 0x1 ) ); - public const int BF_TOP = unchecked( (int)( 0x2 ) ); - public const int BF_RIGHT = unchecked( (int)( 0x4 ) ); - public const int BF_BOTTOM = unchecked( (int)( 0x8 ) ); - - public const int BF_TOPLEFT = unchecked( (int)( ( BF_TOP | BF_LEFT ) ) ); - public const int BF_TOPRIGHT = unchecked( (int)( ( BF_TOP | BF_RIGHT ) ) ); - public const int BF_BOTTOMLEFT = unchecked( (int)( ( BF_BOTTOM | BF_LEFT ) ) ); - public const int BF_BOTTOMRIGHT = unchecked( (int)( ( BF_BOTTOM | BF_RIGHT ) ) ); - public const int BF_RECT = unchecked( (int)( ( BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM ) ) ); - - public const int BF_DIAGONAL = unchecked( (int)( 0x10 ) ); + public const int BDR_RAISEDOUTER = unchecked((int)(0x1)); + public const int BDR_SUNKENOUTER = unchecked((int)(0x2)); + public const int BDR_RAISEDINNER = unchecked((int)(0x4)); + public const int BDR_SUNKENINNER = unchecked((int)(0x8)); + + public const int BDR_OUTER = unchecked((int)(0x3)); + public const int BDR_INNER = unchecked((int)(0xC)); + public const int BDR_RAISED = unchecked((int)(0x5)); + public const int BDR_SUNKEN = unchecked((int)(0xA)); + + public const int EDGE_RAISED = unchecked((int)((BDR_RAISEDOUTER | BDR_RAISEDINNER))); + public const int EDGE_SUNKEN = unchecked((int)((BDR_SUNKENOUTER | BDR_SUNKENINNER))); + public const int EDGE_ETCHED = unchecked((int)((BDR_SUNKENOUTER | BDR_RAISEDINNER))); + public const int EDGE_BUMP = unchecked((int)((BDR_RAISEDOUTER | BDR_SUNKENINNER))); + + public const int BF_LEFT = unchecked((int)(0x1)); + public const int BF_TOP = unchecked((int)(0x2)); + public const int BF_RIGHT = unchecked((int)(0x4)); + public const int BF_BOTTOM = unchecked((int)(0x8)); + + public const int BF_TOPLEFT = unchecked((int)((BF_TOP | BF_LEFT))); + public const int BF_TOPRIGHT = unchecked((int)((BF_TOP | BF_RIGHT))); + public const int BF_BOTTOMLEFT = unchecked((int)((BF_BOTTOM | BF_LEFT))); + public const int BF_BOTTOMRIGHT = unchecked((int)((BF_BOTTOM | BF_RIGHT))); + public const int BF_RECT = unchecked((int)((BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM))); + + public const int BF_DIAGONAL = unchecked((int)(0x10)); // For diagonal lines, the BF_RECT flags specify the end point of // the vector bounded by the rectangle parameter. - public const int BF_DIAGONAL_ENDTOPRIGHT = unchecked( (int)( ( BF_DIAGONAL | BF_TOP | BF_RIGHT ) ) ); - public const int BF_DIAGONAL_ENDTOPLEFT = unchecked( (int)( ( BF_DIAGONAL | BF_TOP | BF_LEFT ) ) ); - public const int BF_DIAGONAL_ENDBOTTOMLEFT = unchecked( (int)( ( BF_DIAGONAL | BF_BOTTOM | BF_LEFT ) ) ); - public const int BF_DIAGONAL_ENDBOTTOMRIGHT = unchecked( (int)( ( BF_DIAGONAL | BF_BOTTOM | BF_RIGHT ) ) ); - - public const int BF_MIDDLE = unchecked( (int)( 0x800 ) );// Fill in the middle. - public const int BF_SOFT = unchecked( (int)( 0x1000 ) );// Use for softer buttons. - public const int BF_ADJUST = unchecked( (int)( 0x2000 ) );// Calculate the space left over. - public const int BF_FLAT = unchecked( (int)( 0x4000 ) );// For flat rather than 3-D borders. - public const int BF_MONO = unchecked( (int)( 0x8000 ) );// For monochrome borders. + public const int BF_DIAGONAL_ENDTOPRIGHT = unchecked((int)((BF_DIAGONAL | BF_TOP | BF_RIGHT))); + public const int BF_DIAGONAL_ENDTOPLEFT = unchecked((int)((BF_DIAGONAL | BF_TOP | BF_LEFT))); + public const int BF_DIAGONAL_ENDBOTTOMLEFT = unchecked((int)((BF_DIAGONAL | BF_BOTTOM | BF_LEFT))); + public const int BF_DIAGONAL_ENDBOTTOMRIGHT = unchecked((int)((BF_DIAGONAL | BF_BOTTOM | BF_RIGHT))); + + public const int BF_MIDDLE = unchecked((int)(0x800));// Fill in the middle. + public const int BF_SOFT = unchecked((int)(0x1000));// Use for softer buttons. + public const int BF_ADJUST = unchecked((int)(0x2000));// Calculate the space left over. + public const int BF_FLAT = unchecked((int)(0x4000));// For flat rather than 3-D borders. + public const int BF_MONO = unchecked((int)(0x8000));// For monochrome borders. } diff --git a/TrayMe/Win32Ex.cs b/TrayMe/Win32Ex.cs index 25c2693..c9ad243 100644 --- a/TrayMe/Win32Ex.cs +++ b/TrayMe/Win32Ex.cs @@ -7,29 +7,29 @@ /// internal class Win32Ex : Win32 { - public static string GetWindowText( IntPtr hWnd ) + public static string GetWindowText(IntPtr hWnd) { int cch; IntPtr lpString; string sResult; // !!!!! System.Text.Encoding - if( IsWindow( hWnd ) == 0 ) + if (IsWindow(hWnd) == 0) return ""; - if( Win32.IsWindowUnicode( hWnd ) != 0 ) + if (Win32.IsWindowUnicode(hWnd) != 0) { // Allocate new Unicode string - lpString = Marshal.AllocHGlobal( ( cch = ( Win32.GetWindowTextLengthW( hWnd ) + 1 ) ) * 2 ); + lpString = Marshal.AllocHGlobal((cch = (Win32.GetWindowTextLengthW(hWnd) + 1)) * 2); // Get window Unicode text - Win32.GetWindowTextW( hWnd, lpString, cch ); + Win32.GetWindowTextW(hWnd, lpString, cch); // Get managed string from Unicode string - sResult = Marshal.PtrToStringUni( lpString, cch ); + sResult = Marshal.PtrToStringUni(lpString, cch); // Free allocated Unicode string - Marshal.FreeHGlobal( lpString ); + Marshal.FreeHGlobal(lpString); lpString = IntPtr.Zero; // Return managed string @@ -38,16 +38,16 @@ public static string GetWindowText( IntPtr hWnd ) else { // Allocate new ANSI string - lpString = Marshal.AllocHGlobal( ( cch = ( Win32.GetWindowTextLengthA( hWnd ) + 1 ) ) ); + lpString = Marshal.AllocHGlobal((cch = (Win32.GetWindowTextLengthA(hWnd) + 1))); // Get window ANSI text - Win32.GetWindowTextA( hWnd, lpString, cch ); + Win32.GetWindowTextA(hWnd, lpString, cch); // Get managed string from ANSI string - sResult = Marshal.PtrToStringAnsi( lpString, cch ); + sResult = Marshal.PtrToStringAnsi(lpString, cch); // Free allocated ANSI string - Marshal.FreeHGlobal( lpString ); + Marshal.FreeHGlobal(lpString); lpString = IntPtr.Zero; // Return managed string @@ -55,7 +55,7 @@ public static string GetWindowText( IntPtr hWnd ) } } - public static string GetClassName( IntPtr hWnd ) + public static string GetClassName(IntPtr hWnd) { const int windowClassNameLength = 255; int cch; @@ -63,22 +63,22 @@ public static string GetClassName( IntPtr hWnd ) string sResult; // !!!!! System.Text.Encoding - if( IsWindow( hWnd ) == 0 ) + if (IsWindow(hWnd) == 0) return ""; - if( Win32.IsWindowUnicode( hWnd ) != 0 ) + if (Win32.IsWindowUnicode(hWnd) != 0) { // Allocate new Unicode string - lpString = Marshal.AllocHGlobal( ( cch = ( windowClassNameLength + 1 ) ) * 2 ); + lpString = Marshal.AllocHGlobal((cch = (windowClassNameLength + 1)) * 2); // Get window class Unicode text - Win32.GetClassNameW( hWnd, lpString, cch ); + Win32.GetClassNameW(hWnd, lpString, cch); // Get managed string from Unicode string - sResult = Marshal.PtrToStringUni( lpString, cch ); + sResult = Marshal.PtrToStringUni(lpString, cch); // Free allocated Unicode string - Marshal.FreeHGlobal( lpString ); + Marshal.FreeHGlobal(lpString); lpString = IntPtr.Zero; // Return managed string @@ -87,16 +87,16 @@ public static string GetClassName( IntPtr hWnd ) else { // Allocate new ANSI string - lpString = Marshal.AllocHGlobal( ( cch = ( Win32.GetWindowTextLengthA( hWnd ) + 1 ) ) ); + lpString = Marshal.AllocHGlobal((cch = (Win32.GetWindowTextLengthA(hWnd) + 1))); // Get window class ANSI text - Win32.GetClassNameA( hWnd, lpString, cch ); + Win32.GetClassNameA(hWnd, lpString, cch); // Get managed string from ANSI string - sResult = Marshal.PtrToStringAnsi( lpString, cch ); + sResult = Marshal.PtrToStringAnsi(lpString, cch); // Free allocated ANSI string - Marshal.FreeHGlobal( lpString ); + Marshal.FreeHGlobal(lpString); lpString = IntPtr.Zero; // Return managed string @@ -110,67 +110,67 @@ public static void DoEvents() } // Retrieves the window from the client point - public static IntPtr WindowFromPoint( IntPtr hClientWnd, int xPoint, int yPoint ) + public static IntPtr WindowFromPoint(IntPtr hClientWnd, int xPoint, int yPoint) { POINTAPI pt; pt.x = xPoint; pt.y = yPoint; - Win32.ClientToScreen( hClientWnd, ref pt ); + Win32.ClientToScreen(hClientWnd, ref pt); - return (IntPtr)Win32.WindowFromPoint( pt.x, pt.y ); + return (IntPtr)Win32.WindowFromPoint(pt.x, pt.y); } - public static bool HighlightWindow( IntPtr hWnd ) + public static bool HighlightWindow(IntPtr hWnd) { IntPtr hDC; // The DC of the window. RECT rt = new RECT(); // Rectangle area of the window. // Get the window DC of the window. - if( ( hDC = (IntPtr)GetWindowDC( hWnd ) ) == IntPtr.Zero ) + if ((hDC = (IntPtr)GetWindowDC(hWnd)) == IntPtr.Zero) return false; // Get the screen coordinates of the rectangle of the window. - GetWindowRect( hWnd, ref rt ); + GetWindowRect(hWnd, ref rt); rt.right -= rt.left; rt.left = 0; rt.bottom -= rt.top; rt.top = 0; // Draw a border in the DC covering the entire window area of the window. - IntPtr hRgn = (IntPtr)CreateRectRgnIndirect( ref rt ); - GetWindowRgn( hWnd, hRgn ); - SetROP2( hDC, R2_NOT ); - FrameRgn( hDC, hRgn, (IntPtr)GetStockObject( WHITE_BRUSH ), 3, 3 ); - DeleteObject( hRgn ); + IntPtr hRgn = (IntPtr)CreateRectRgnIndirect(ref rt); + GetWindowRgn(hWnd, hRgn); + SetROP2(hDC, R2_NOT); + FrameRgn(hDC, hRgn, (IntPtr)GetStockObject(WHITE_BRUSH), 3, 3); + DeleteObject(hRgn); // Finally release the DC. - ReleaseDC( hWnd, hDC ); + ReleaseDC(hWnd, hDC); return true; } - public static bool IsRelativeWindow( IntPtr hWnd, IntPtr hRelativeWindow, bool bProcessAncestor ) + public static bool IsRelativeWindow(IntPtr hWnd, IntPtr hRelativeWindow, bool bProcessAncestor) { int dwProcess = new int(), dwProcessOwner = new int(); int dwThread = new int(), dwThreadOwner = new int(); ; // Failsafe - if( hWnd == IntPtr.Zero ) + if (hWnd == IntPtr.Zero) return false; - if( hRelativeWindow == IntPtr.Zero ) + if (hRelativeWindow == IntPtr.Zero) return false; - if( hWnd == hRelativeWindow ) + if (hWnd == hRelativeWindow) return true; // Get processes and threads - dwThread = Win32.GetWindowThreadProcessId( hWnd, ref dwProcess ); - dwThreadOwner = Win32.GetWindowThreadProcessId( hRelativeWindow, ref dwProcessOwner ); + dwThread = Win32.GetWindowThreadProcessId(hWnd, ref dwProcess); + dwThreadOwner = Win32.GetWindowThreadProcessId(hRelativeWindow, ref dwProcessOwner); // Get relative info - if( bProcessAncestor ) - return ( dwProcess == dwProcessOwner ); - return ( dwThread == dwThreadOwner ); + if (bProcessAncestor) + return (dwProcess == dwProcessOwner); + return (dwThread == dwThreadOwner); } } diff --git a/TrayMeDll/Main.cpp b/TrayMeDll/Main.cpp index bbb4e4e..f69b77f 100644 --- a/TrayMeDll/Main.cpp +++ b/TrayMeDll/Main.cpp @@ -23,8 +23,8 @@ #endif // Disable size [32/64 bit] conversion warnings -#pragma warning( disable : 4311 ) -#pragma warning( disable : 4312 ) +#pragma warning(disable : 4311) +#pragma warning(disable : 4312) @@ -40,7 +40,7 @@ // Notice: seen by all instances of this Dll -#pragma data_seg( ".shared" ) +#pragma data_seg(".shared") volatile bool g_bSubclassed = false; UINT WM_TRAYME_HOOKEX = NULL; @@ -49,12 +49,12 @@ HWND g_hWnd = NULL; HHOOK g_hHook = NULL; HMENU g_hMenu = NULL; int g_nHotKeyAtom = 0; -int g_nHotKey = MOD_CONTROL | MOD_SHIFT; // TODO: Make customizable +int g_nHotKey = MOD_CONTROL | MOD_SHIFT; // TODO: Make customizable char g_chHotKey = 'M'; #pragma data_seg() -#pragma comment( linker, "/SECTION:.shared,RWS" ) +#pragma comment(linker, "/SECTION:.shared,RWS") @@ -70,20 +70,20 @@ bool bWin9x = false; // New & old window procedure of the subclassed window WNDPROC g_OldProc = NULL; -LRESULT CALLBACK NewProc( HWND, UINT, WPARAM, LPARAM ); +LRESULT CALLBACK NewProc(HWND, UINT, WPARAM, LPARAM); // Local Function Declarations //----------------------------- -bool LocalUnmapDll( bool bIndirectUnmap ); +bool LocalUnmapDll(bool bIndirectUnmap); void GetVersionWin9x(); -bool DoTrayContextMenu( HWND hWnd ); -bool ShowTrayedWindow( HWND hWnd ); +bool DoTrayContextMenu(HWND hWnd); +bool ShowTrayedWindow(HWND hWnd); bool FreeLibraryAndExit(); -DWORD WINAPI DllTerminationProc( LPVOID lpParameter ); +DWORD WINAPI DllTerminationProc(LPVOID lpParameter); @@ -92,7 +92,7 @@ DWORD WINAPI DllTerminationProc( LPVOID lpParameter ); BOOL WINAPI IsSubclassed() { - return ( ( g_bSubclassed )?( TRUE ):( FALSE ) ); + return ((g_bSubclassed) ? (TRUE) : (FALSE)); } @@ -100,35 +100,35 @@ BOOL WINAPI IsSubclassed() // Entry Point of Dll // ------------------- -BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) +BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { - MessageBeep( MB_ICONASTERISK ); - - if( ul_reason_for_call == DLL_PROCESS_ATTACH ) - { - // TODO: Not supported in CE - DisableThreadLibraryCalls( g_hDll = (HINSTANCE)hModule ); - - // TODO: Not supported in CE - // Register Ansi windows message - if( WM_TRAYME_HOOKEX == NULL ) - WM_TRAYME_HOOKEX = RegisterWindowMessageA( "TRAYME@@WM_TRAYME_HOOKEX" ); - if( WM_TRAYME_TRAYNOTIFY == NULL ) - WM_TRAYME_TRAYNOTIFY = RegisterWindowMessageA( "TRAYME@@WM_TRAYME_TRAYNOTIFY" ); - } - else if( ul_reason_for_call == DLL_PROCESS_DETACH ) - { - if( g_hWnd ) - { - if ( IsWindow( g_hWnd ) == FALSE ) - g_hWnd = NULL; - } - - if( !g_hWnd ) - g_bSubclassed = false; - } - - return TRUE; + MessageBeep(MB_ICONASTERISK); + + if (ul_reason_for_call == DLL_PROCESS_ATTACH) + { + // TODO: Not supported in CE + DisableThreadLibraryCalls(g_hDll = (HINSTANCE)hModule); + + // TODO: Not supported in CE + // Register Ansi windows message + if (WM_TRAYME_HOOKEX == NULL) + WM_TRAYME_HOOKEX = RegisterWindowMessageA("TRAYME@@WM_TRAYME_HOOKEX"); + if (WM_TRAYME_TRAYNOTIFY == NULL) + WM_TRAYME_TRAYNOTIFY = RegisterWindowMessageA("TRAYME@@WM_TRAYME_TRAYNOTIFY"); + } + else if (ul_reason_for_call == DLL_PROCESS_DETACH) + { + if (g_hWnd) + { + if (IsWindow(g_hWnd) == FALSE) + g_hWnd = NULL; + } + + if (!g_hWnd) + g_bSubclassed = false; + } + + return TRUE; } @@ -162,141 +162,141 @@ BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserv // reference count reaches zero. // -LRESULT HookProc( int code, WPARAM wParam, LPARAM lParam ) +LRESULT HookProc(int code, WPARAM wParam, LPARAM lParam) { - char lib_name [MAX_PATH]; - bool bInjectMessage; - - // Failsafe - if( g_hWnd == NULL ) - return CallNextHookEx( g_hHook, code, wParam, lParam ); - if( IsWindow( g_hWnd ) == 0 ) - return CallNextHookEx( g_hHook, code, wParam, lParam ); - - // Get window version - if( !bWin9x_Known ) - { - GetVersionWin9x(); - bWin9x_Known = true; - } - - // Get hook value - if (bWin9x) - bInjectMessage = (((LPMSG)lParam)->message == WM_TRAYME_HOOKEX); - else - bInjectMessage = (((LPCWPSTRUCT)lParam)->message == WM_TRAYME_HOOKEX); - - if( bInjectMessage ) - { - bool bHook; - - // Get hook value - if( bWin9x ) - bHook = ( ( (LPMSG)lParam )->wParam != 0 ); - else - bHook = ( ( (LPCWPSTRUCT)lParam )->wParam != 0 ); - - // Set window procedure - if( bHook ) - { - // Unhook the hook - UnhookWindowsHookEx( g_hHook ); - - // already subclassed? - if( g_bSubclassed ) - return CallNextHookEx( g_hHook, code, wParam, lParam ); - - // Increase the reference count of the DLL (via LoadLibrary), so it's NOT unmapped once the hook is removed - GetModuleFileNameA(g_hDll, lib_name, MAX_PATH); - if( !LoadLibraryA( lib_name ) ) - return CallNextHookEx( g_hHook, code, wParam, lParam ); - - // Subclass window - if( IsWindowUnicode( g_hWnd ) == 0 ) - { - if( ( g_OldProc = (WNDPROC)SetWindowLongPtrA( g_hWnd, GWL_WNDPROC, (SAFE_LONG_PTR)NewProc ) ) == NULL ) - { - FreeLibrary( g_hDll ); - return CallNextHookEx( g_hHook, code, wParam, lParam ); - } - } - else - { - if ( ( g_OldProc = (WNDPROC)SetWindowLongPtrW( g_hWnd, GWL_WNDPROC, (SAFE_LONG_PTR)NewProc ) ) == NULL ) - { - FreeLibrary( g_hDll ); - return CallNextHookEx( g_hHook, code, wParam, lParam ); - } - } - - - // Register hotkey - g_nHotKeyAtom = GlobalAddAtom( "TrayMe HotKey" ); - if( g_nHotKeyAtom != 0 ) - RegisterHotKey( g_hWnd, g_nHotKeyAtom, g_nHotKey, g_chHotKey ); - - // Success - MessageBeep( MB_OK ); - g_bSubclassed = true; - } - else - { - bool bIndirectUnhook; - - if( bWin9x ) - { - if( !bHook ) - bIndirectUnhook = ( ( (LPMSG)lParam )->lParam != 0 ); - } - else - { - if( !bHook ) - bIndirectUnhook = ( ( (LPCWPSTRUCT)lParam )->lParam != 0 ); - } - - // Unhook the hook - UnhookWindowsHookEx( g_hHook ); - - // Unregister hotkey - if( g_nHotKeyAtom != 0 ) - { - UnregisterHotKey( g_hWnd, g_nHotKeyAtom ); - GlobalDeleteAtom( g_nHotKeyAtom ); - g_nHotKeyAtom = 0; - } - - // Unmap Dll - if( !g_bSubclassed ) - return NULL; - - // Show window (if not already shown) - ShowTrayedWindow( g_hWnd ); - - // If failed to restore old window procedure => don't unmap the DLL either. - // Why? Because then process would call "unmapped" NewProc and crash!! - if( IsWindowUnicode( g_hWnd ) == 0 ) - { - if( (WNDPROC)SetWindowLongPtrA( g_hWnd, GWL_WNDPROC, (SAFE_LONG_PTR)g_OldProc ) == 0 ) - return CallNextHookEx( g_hHook, code, wParam, lParam ); - } - else - { - if( (WNDPROC)SetWindowLongPtrW( g_hWnd, GWL_WNDPROC, (SAFE_LONG_PTR)g_OldProc ) == 0 ) - return CallNextHookEx( g_hHook, code, wParam, lParam ); - } - - // Success - g_bSubclassed = false; - MessageBeep( MB_OK ); - - if( bIndirectUnhook ) - FreeLibraryAndExit(); - else - FreeLibrary( g_hDll ); - } - } - - return CallNextHookEx( g_hHook, code, wParam, lParam ); + char lib_name [MAX_PATH]; + bool bInjectMessage; + + // Failsafe + if (g_hWnd == NULL) + return CallNextHookEx(g_hHook, code, wParam, lParam); + if (IsWindow(g_hWnd) == 0) + return CallNextHookEx(g_hHook, code, wParam, lParam); + + // Get window version + if (!bWin9x_Known) + { + GetVersionWin9x(); + bWin9x_Known = true; + } + + // Get hook value + if (bWin9x) + bInjectMessage = (((LPMSG)lParam)->message == WM_TRAYME_HOOKEX); + else + bInjectMessage = (((LPCWPSTRUCT)lParam)->message == WM_TRAYME_HOOKEX); + + if (bInjectMessage) + { + bool bHook; + + // Get hook value + if (bWin9x) + bHook = (((LPMSG)lParam)->wParam != 0); + else + bHook = (((LPCWPSTRUCT)lParam)->wParam != 0); + + // Set window procedure + if (bHook) + { + // Unhook the hook + UnhookWindowsHookEx(g_hHook); + + // already subclassed? + if (g_bSubclassed) + return CallNextHookEx(g_hHook, code, wParam, lParam); + + // Increase the reference count of the DLL (via LoadLibrary), so it's NOT unmapped once the hook is removed + GetModuleFileNameA(g_hDll, lib_name, MAX_PATH); + if (!LoadLibraryA(lib_name)) + return CallNextHookEx(g_hHook, code, wParam, lParam); + + // Subclass window + if (IsWindowUnicode(g_hWnd) == 0) + { + if ((g_OldProc = (WNDPROC)SetWindowLongPtrA(g_hWnd, GWL_WNDPROC, (SAFE_LONG_PTR)NewProc)) == NULL) + { + FreeLibrary(g_hDll); + return CallNextHookEx(g_hHook, code, wParam, lParam); + } + } + else + { + if ((g_OldProc = (WNDPROC)SetWindowLongPtrW(g_hWnd, GWL_WNDPROC, (SAFE_LONG_PTR)NewProc)) == NULL) + { + FreeLibrary(g_hDll); + return CallNextHookEx(g_hHook, code, wParam, lParam); + } + } + + + // Register hotkey + g_nHotKeyAtom = GlobalAddAtom("TrayMe HotKey"); + if (g_nHotKeyAtom != 0) + RegisterHotKey(g_hWnd, g_nHotKeyAtom, g_nHotKey, g_chHotKey); + + // Success + MessageBeep(MB_OK); + g_bSubclassed = true; + } + else + { + bool bIndirectUnhook; + + if (bWin9x) + { + if (!bHook) + bIndirectUnhook = (((LPMSG)lParam)->lParam != 0); + } + else + { + if (!bHook) + bIndirectUnhook = (((LPCWPSTRUCT)lParam)->lParam != 0); + } + + // Unhook the hook + UnhookWindowsHookEx(g_hHook); + + // Unregister hotkey + if (g_nHotKeyAtom != 0) + { + UnregisterHotKey(g_hWnd, g_nHotKeyAtom); + GlobalDeleteAtom(g_nHotKeyAtom); + g_nHotKeyAtom = 0; + } + + // Unmap Dll + if (!g_bSubclassed) + return NULL; + + // Show window (if not already shown) + ShowTrayedWindow(g_hWnd); + + // If failed to restore old window procedure => don't unmap the DLL either. + // Why? Because then process would call "unmapped" NewProc and crash!! + if (IsWindowUnicode(g_hWnd) == 0) + { + if ((WNDPROC)SetWindowLongPtrA(g_hWnd, GWL_WNDPROC, (SAFE_LONG_PTR)g_OldProc) == 0) + return CallNextHookEx(g_hHook, code, wParam, lParam); + } + else + { + if ((WNDPROC)SetWindowLongPtrW(g_hWnd, GWL_WNDPROC, (SAFE_LONG_PTR)g_OldProc) == 0) + return CallNextHookEx(g_hHook, code, wParam, lParam); + } + + // Success + g_bSubclassed = false; + MessageBeep(MB_OK); + + if (bIndirectUnhook) + FreeLibraryAndExit(); + else + FreeLibrary(g_hDll); + } + } + + return CallNextHookEx(g_hHook, code, wParam, lParam); } @@ -313,68 +313,68 @@ LRESULT HookProc( int code, WPARAM wParam, LPARAM lParam ) // 0 - failure; // -BOOL WINAPI InjectDll( HWND hWnd ) +BOOL WINAPI InjectDll(HWND hWnd) { - static bool g_bIsSubclassing = false; - - // Failsafe - if( g_bSubclassed ) - return TRUE; - if( g_bIsSubclassing ) - return FALSE; - g_bIsSubclassing = true; - - - // Set global vars - if( !IsWindow( hWnd ) ) - { - g_bIsSubclassing = false; - return FALSE; - } - g_hWnd = hWnd; - - // Get window version - if( !bWin9x_Known ) - { - GetVersionWin9x(); - bWin9x_Known = true; - } - - // Hook window - if( ( g_hHook = SetWindowsHookExA( ( ( bWin9x )?( WH_GETMESSAGE ):( WH_CALLWNDPROC ) ), (HOOKPROC)HookProc, g_hDll, GetWindowThreadProcessId( hWnd, NULL ) ) ) == NULL ) - { - g_bIsSubclassing = false; - return FALSE; - } - - // By the time SendMessage returns, the window has already been subclassed - if( bWin9x ) - { - if( IsWindowUnicode( g_hWnd ) ) - { - while( !PostMessageW( g_hWnd, WM_TRAYME_HOOKEX, 1, 0 ) ) - { } - } - else - { - while( !PostMessageA( g_hWnd, WM_TRAYME_HOOKEX, 1, 0 ) ) - { } - } - } - else - { - if( IsWindowUnicode( g_hWnd ) ) - SendMessageW( g_hWnd, WM_TRAYME_HOOKEX, 1, 0 ); - else - SendMessageA( g_hWnd, WM_TRAYME_HOOKEX, 1, 0 ); - } - - // Check for subclassing - while( !g_bSubclassed ) - { } - - g_bIsSubclassing = false; - return TRUE; + static bool g_bIsSubclassing = false; + + // Failsafe + if (g_bSubclassed) + return TRUE; + if (g_bIsSubclassing) + return FALSE; + g_bIsSubclassing = true; + + + // Set global vars + if (!IsWindow(hWnd)) + { + g_bIsSubclassing = false; + return FALSE; + } + g_hWnd = hWnd; + + // Get window version + if (!bWin9x_Known) + { + GetVersionWin9x(); + bWin9x_Known = true; + } + + // Hook window + if ((g_hHook = SetWindowsHookExA(((bWin9x) ? (WH_GETMESSAGE) : (WH_CALLWNDPROC)), (HOOKPROC)HookProc, g_hDll, GetWindowThreadProcessId(hWnd, NULL))) == NULL) + { + g_bIsSubclassing = false; + return FALSE; + } + + // By the time SendMessage returns, the window has already been subclassed + if (bWin9x) + { + if (IsWindowUnicode(g_hWnd)) + { + while (!PostMessageW(g_hWnd, WM_TRAYME_HOOKEX, 1, 0)) + {} + } + else + { + while(!PostMessageA(g_hWnd, WM_TRAYME_HOOKEX, 1, 0)) + {} + } + } + else + { + if (IsWindowUnicode(g_hWnd)) + SendMessageW(g_hWnd, WM_TRAYME_HOOKEX, 1, 0); + else + SendMessageA(g_hWnd, WM_TRAYME_HOOKEX, 1, 0); + } + + // Check for subclassing + while (!g_bSubclassed) + {} + + g_bIsSubclassing = false; + return TRUE; } @@ -391,64 +391,64 @@ BOOL WINAPI InjectDll( HWND hWnd ) BOOL WINAPI UnmapDll() { - return ( ( LocalUnmapDll( false ) )?( TRUE ):( FALSE ) ); + return ((LocalUnmapDll(false)) ? (TRUE) : (FALSE)); } -bool LocalUnmapDll( bool bIndirectUnmap ) +bool LocalUnmapDll(bool bIndirectUnmap) { - static bool g_bIsUnSubclassing = false; - - // Failsafe - if( !g_bSubclassed ) - return TRUE; - if( g_bIsUnSubclassing ) - return FALSE; - if( !IsWindow( g_hWnd )) - { - g_bSubclassed = false; - return TRUE; - } - g_bIsUnSubclassing = true; - - // Get window version - if( !bWin9x_Known ) - GetVersionWin9x(); - - if( ( g_hHook = SetWindowsHookExA( ( ( bWin9x )?( WH_GETMESSAGE ):( WH_CALLWNDPROC ) ), (HOOKPROC)HookProc, g_hDll, GetWindowThreadProcessId( g_hWnd, NULL ) ) ) == NULL ) - { - g_bIsUnSubclassing = false; - return FALSE; - } - - // By the time SendMessage returns, the window has already been subclassed - if( bWin9x ) - { - if( IsWindowUnicode( g_hWnd ) ) - { - while( !PostMessageW( g_hWnd, WM_TRAYME_HOOKEX, 0, ( ( bIndirectUnmap )?( 1 ):( 0 ) ) ) ) - { } - } - else - { - while( !PostMessageA( g_hWnd, WM_TRAYME_HOOKEX, 0, ( ( bIndirectUnmap )?( 1 ):( 0 ) ) ) ) - { } - } - } - else - { - if( IsWindowUnicode( g_hWnd ) ) - SendMessageW( g_hWnd, WM_TRAYME_HOOKEX, 0, ( ( bIndirectUnmap )?( 1 ):( 0 ) ) ); - else - SendMessageA( g_hWnd, WM_TRAYME_HOOKEX, 0, ( ( bIndirectUnmap )?( 1 ):( 0 ) ) ); - } - - // Check for subclassing - while( g_bSubclassed ) - { } - - g_bIsUnSubclassing = false; - g_hWnd = NULL; - return TRUE; + static bool g_bIsUnSubclassing = false; + + // Failsafe + if (!g_bSubclassed) + return TRUE; + if (g_bIsUnSubclassing) + return FALSE; + if (!IsWindow(g_hWnd)) + { + g_bSubclassed = false; + return TRUE; + } + g_bIsUnSubclassing = true; + + // Get window version + if (!bWin9x_Known) + GetVersionWin9x(); + + if ((g_hHook = SetWindowsHookExA(((bWin9x) ? (WH_GETMESSAGE) : (WH_CALLWNDPROC)), (HOOKPROC)HookProc, g_hDll, GetWindowThreadProcessId(g_hWnd, NULL))) == NULL) + { + g_bIsUnSubclassing = false; + return FALSE; + } + + // By the time SendMessage returns, the window has already been subclassed + if (bWin9x) + { + if (IsWindowUnicode(g_hWnd)) + { + while (!PostMessageW(g_hWnd, WM_TRAYME_HOOKEX, 0, ((bIndirectUnmap) ? (1) : (0)))) + {} + } + else + { + while (!PostMessageA(g_hWnd, WM_TRAYME_HOOKEX, 0, ((bIndirectUnmap) ? (1) : (0)))) + {} + } + } + else + { + if (IsWindowUnicode(g_hWnd)) + SendMessageW(g_hWnd, WM_TRAYME_HOOKEX, 0, ((bIndirectUnmap) ? (1) : (0))); + else + SendMessageA(g_hWnd, WM_TRAYME_HOOKEX, 0, ((bIndirectUnmap) ? (1) : (0))); + } + + // Check for subclassing + while (g_bSubclassed) + {} + + g_bIsUnSubclassing = false; + g_hWnd = NULL; + return TRUE; } @@ -458,163 +458,163 @@ bool LocalUnmapDll( bool bIndirectUnmap ) LRESULT CALLBACK NewProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - LRESULT lResult; - - union - { - NOTIFYICONDATAA nidA; - NOTIFYICONDATAW nidW; - }; - - union - { - CHAR chTempA [1024]; - WCHAR chTempW [1024]; - }; - - - // Test tray removal - if( uMsg == WM_TRAYME_TRAYNOTIFY ) - { - // Subclassed window - if (wParam == ID_TRAYME_TRAYEDWINDOW) - { - switch(lParam) - { - case WM_RBUTTONUP: - DoTrayContextMenu( hWnd ); - break; - - case WM_LBUTTONDBLCLK: - if( ShowTrayedWindow( hWnd ) ) - return TRUE; - break; - } - } - - return 0; - } - else if( uMsg == WM_HOTKEY ) - { - if( (int)wParam == g_nHotKeyAtom ) - { - if( IsWindow( hWnd ) ) - { - if( IsWindowVisible( hWnd ) ) - SendMessage( hWnd, WM_CLOSE, 0, 0 ); - else - ShowTrayedWindow( hWnd ); - - return 0; - } - } - } - else - { - switch (uMsg) - { - // Workaround to Outlook Express 'feature' - case WM_DISPLAYCHANGE: - if( IsWindowVisible( hWnd ) == FALSE ) - return 0; - break; - - case WM_SYSCOMMAND: - if( wParam != SC_CLOSE ) - break; - case WM_CLOSE: - // Get window version - if ( !bWin9x_Known ) - { - GetVersionWin9x(); - bWin9x_Known = true; - } - - if( g_bInTray ) - { - ShowWindow( hWnd, SW_HIDE ); - return 0; - } - - // Set up charset-specific info - if( IsWindowUnicode( hWnd ) ) - { - // Set up notify icon - nidW.cbSize = sizeof (NOTIFYICONDATAW); - nidW.hWnd = hWnd; nidW.uID = ID_TRAYME_TRAYEDWINDOW; - nidW.uCallbackMessage = WM_TRAYME_TRAYNOTIFY; - nidW.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; - - // Get text - rsize_t chTempW_size = sizeof( chTempW ); - if( GetWindowTextW(hWnd, chTempW, (int)chTempW_size ) == 0) chTempW[0] = NULL; - wcsncpy_s( nidW.szTip, chTempW, chTempW_size ); - - // Create/copy icon - if( ( ( nidW.hIcon = (HICON)SendMessageW( hWnd, WM_GETICON, ( ( bWin9x ) ? ( ICON_SMALL ) : ( 2 ) ), 0 ) ) == NULL ) && ( ( nidW.hIcon = (HICON)GetClassLongW( hWnd, GCL_HICONSM ) ) == NULL ) ) - if ( ( ( nidW.hIcon = (HICON)SendMessageW( hWnd, WM_GETICON, ICON_BIG, 0 ) ) == NULL ) && ( ( nidW.hIcon = (HICON)GetClassLongW( hWnd, GCL_HICON ) ) == NULL ) ) - nidW.hIcon = (HICON)LoadImageW( NULL, MAKEINTRESOURCEW( 32512 ), IMAGE_ICON, 0, 0, LR_CREATEDIBSECTION ); - - // Add to System Tray - if( Shell_NotifyIconW( NIM_ADD, &nidW ) == 0 ) - return 0; - } - else - { - // Set up notify icon - nidA.cbSize = sizeof( NOTIFYICONDATAA ); - nidA.hWnd = hWnd; nidA.uID = ID_TRAYME_TRAYEDWINDOW; - nidA.uCallbackMessage = WM_TRAYME_TRAYNOTIFY; - nidA.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; - - // Get text - size_t chTempA_size = sizeof( chTempA ); - if( GetWindowTextA( hWnd, chTempA, (int)chTempA_size ) == 0 ) - chTempA[0] = NULL; - strncpy_s( nidA.szTip, chTempA, chTempA_size ); - - // Create/copy icon - if( ( ( nidA.hIcon = (HICON)SendMessageA( hWnd, WM_GETICON, ( (bWin9x) ? (ICON_SMALL) : ( 2 ) ), 0 ) ) == NULL ) && ( ( nidA.hIcon = (HICON)GetClassLongA( hWnd, GCL_HICONSM ) ) == NULL ) ) - if( ( ( nidA.hIcon = (HICON)SendMessageA( hWnd, WM_GETICON, ICON_BIG, 0 ) ) == NULL ) && ( ( nidA.hIcon = (HICON)GetClassLongA( hWnd, GCL_HICON ) ) == NULL ) ) - nidA.hIcon = (HICON)LoadImageA( NULL, MAKEINTRESOURCEA( 32512 ), IMAGE_ICON, 0, 0, LR_CREATEDIBSECTION ); - - // Add to System Tray - if( Shell_NotifyIconA( NIM_ADD, &nidA ) == 0 ) - return 0; - } - - // Hide window - g_bInTray = true; - ShowWindow( hWnd, SW_HIDE ); - return 0; - - case WM_DESTROY: - // Unregister hotkey - if( g_nHotKeyAtom != 0 ) - { - UnregisterHotKey(g_hWnd, g_nHotKeyAtom); - GlobalDeleteAtom(g_nHotKeyAtom); - g_nHotKeyAtom = 0; - } - - // Unsubclass window - if( IsWindowUnicode( hWnd ) ) - SetWindowLongPtrW( g_hWnd, GWL_WNDPROC, (SAFE_LONG_PTR)g_OldProc ); - else - SetWindowLongPtrA( g_hWnd, GWL_WNDPROC, (SAFE_LONG_PTR)g_OldProc ); - - // Handle current message - lResult = CallWindowProc( g_OldProc, hWnd, uMsg, wParam, lParam ); - - // Unmap the library and exit in separate thread - FreeLibraryAndExit(); - - // Successful destruction of window and Dll unmapping - return lResult; - } - } - - return CallWindowProc( g_OldProc, hWnd, uMsg, wParam, lParam ); + LRESULT lResult; + + union + { + NOTIFYICONDATAA nidA; + NOTIFYICONDATAW nidW; + }; + + union + { + CHAR chTempA [1024]; + WCHAR chTempW [1024]; + }; + + + // Test tray removal + if (uMsg == WM_TRAYME_TRAYNOTIFY) + { + // Subclassed window + if (wParam == ID_TRAYME_TRAYEDWINDOW) + { + switch (lParam) + { + case WM_RBUTTONUP: + DoTrayContextMenu(hWnd); + break; + + case WM_LBUTTONDBLCLK: + if (ShowTrayedWindow(hWnd)) + return TRUE; + break; + } + } + + return 0; + } + else if (uMsg == WM_HOTKEY) + { + if ((int)wParam == g_nHotKeyAtom) + { + if (IsWindow(hWnd)) + { + if (IsWindowVisible(hWnd)) + SendMessage(hWnd, WM_CLOSE, 0, 0); + else + ShowTrayedWindow(hWnd); + + return 0; + } + } + } + else + { + switch (uMsg) + { + // Workaround to Outlook Express 'feature' + case WM_DISPLAYCHANGE: + if (IsWindowVisible(hWnd) == FALSE) + return 0; + break; + + case WM_SYSCOMMAND: + if (wParam != SC_CLOSE) + break; + case WM_CLOSE: + // Get window version + if (!bWin9x_Known) + { + GetVersionWin9x(); + bWin9x_Known = true; + } + + if (g_bInTray) + { + ShowWindow(hWnd, SW_HIDE); + return 0; + } + + // Set up charset-specific info + if (IsWindowUnicode(hWnd)) + { + // Set up notify icon + nidW.cbSize = sizeof (NOTIFYICONDATAW); + nidW.hWnd = hWnd; nidW.uID = ID_TRAYME_TRAYEDWINDOW; + nidW.uCallbackMessage = WM_TRAYME_TRAYNOTIFY; + nidW.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; + + // Get text + rsize_t chTempW_size = sizeof(chTempW); + if (GetWindowTextW(hWnd, chTempW, (int)chTempW_size) == 0) chTempW[0] = NULL; + wcsncpy_s(nidW.szTip, chTempW, chTempW_size); + + // Create/copy icon + if (((nidW.hIcon = (HICON)SendMessageW(hWnd, WM_GETICON, ((bWin9x) ? (ICON_SMALL) : (2)), 0)) == NULL) && ((nidW.hIcon = (HICON)GetClassLongW(hWnd, GCL_HICONSM)) == NULL)) + if (((nidW.hIcon = (HICON)SendMessageW(hWnd, WM_GETICON, ICON_BIG, 0)) == NULL) && ((nidW.hIcon = (HICON)GetClassLongW(hWnd, GCL_HICON)) == NULL)) + nidW.hIcon = (HICON)LoadImageW(NULL, MAKEINTRESOURCEW(32512), IMAGE_ICON, 0, 0, LR_CREATEDIBSECTION); + + // Add to System Tray + if (Shell_NotifyIconW(NIM_ADD, &nidW) == 0) + return 0; + } + else + { + // Set up notify icon + nidA.cbSize = sizeof(NOTIFYICONDATAA); + nidA.hWnd = hWnd; nidA.uID = ID_TRAYME_TRAYEDWINDOW; + nidA.uCallbackMessage = WM_TRAYME_TRAYNOTIFY; + nidA.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; + + // Get text + size_t chTempA_size = sizeof(chTempA); + if (GetWindowTextA(hWnd, chTempA, (int)chTempA_size) == 0) + chTempA[0] = NULL; + strncpy_s(nidA.szTip, chTempA, chTempA_size); + + // Create/copy icon + if (((nidA.hIcon = (HICON)SendMessageA(hWnd, WM_GETICON, ((bWin9x) ? (ICON_SMALL) : (2)), 0)) == NULL) && ((nidA.hIcon = (HICON)GetClassLongA(hWnd, GCL_HICONSM)) == NULL)) + if (((nidA.hIcon = (HICON)SendMessageA(hWnd, WM_GETICON, ICON_BIG, 0)) == NULL) && ((nidA.hIcon = (HICON)GetClassLongA(hWnd, GCL_HICON)) == NULL)) + nidA.hIcon = (HICON)LoadImageA(NULL, MAKEINTRESOURCEA(32512), IMAGE_ICON, 0, 0, LR_CREATEDIBSECTION); + + // Add to System Tray + if (Shell_NotifyIconA(NIM_ADD, &nidA) == 0) + return 0; + } + + // Hide window + g_bInTray = true; + ShowWindow(hWnd, SW_HIDE); + return 0; + + case WM_DESTROY: + // Unregister hotkey + if (g_nHotKeyAtom != 0) + { + UnregisterHotKey(g_hWnd, g_nHotKeyAtom); + GlobalDeleteAtom(g_nHotKeyAtom); + g_nHotKeyAtom = 0; + } + + // Unsubclass window + if (IsWindowUnicode(hWnd)) + SetWindowLongPtrW(g_hWnd, GWL_WNDPROC, (SAFE_LONG_PTR)g_OldProc); + else + SetWindowLongPtrA(g_hWnd, GWL_WNDPROC, (SAFE_LONG_PTR)g_OldProc); + + // Handle current message + lResult = CallWindowProc(g_OldProc, hWnd, uMsg, wParam, lParam); + + // Unmap the library and exit in separate thread + FreeLibraryAndExit(); + + // Successful destruction of window and Dll unmapping + return lResult; + } + } + + return CallWindowProc(g_OldProc, hWnd, uMsg, wParam, lParam); } @@ -624,165 +624,165 @@ LRESULT CALLBACK NewProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) void GetVersionWin9x() { - OSVERSIONINFO osvi; + OSVERSIONINFO osvi; - // Get version info - osvi.dwOSVersionInfoSize = sizeof( OSVERSIONINFO ); - GetVersionEx( &osvi ); + // Get version info + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&osvi); - // Get Win9x value - bWin9x = ( ( osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS ) && ( osvi.dwMajorVersion == 4 ) ); + // Get Win9x value + bWin9x = ((osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) && (osvi.dwMajorVersion == 4)); } -bool DoTrayContextMenu( HWND hWnd ) +bool DoTrayContextMenu(HWND hWnd) { - HMENU hMenu; - - if( ( hMenu= CreatePopupMenu() ) == NULL ) - return false; - - if( IsWindowUnicode( hWnd ) ) - { - MENUITEMINFOW miiw; - ZeroMemory(&miiw, sizeof(miiw)); - miiw.cbSize = sizeof(miiw); - miiw.wID = (WORD)(1); - if( bWin9x ) - { - miiw.fMask = (MIIM_ID | MIIM_STATE | MIIM_TYPE); - miiw.fType = (MFT_STRING); - miiw.fState = (MFS_ENABLED | MFS_DEFAULT); - } - else - { - miiw.fMask = (MIIM_ID | MIIM_STATE | MIIM_STRING); - miiw.fState = (MFS_ENABLED | MFS_DEFAULT); - } - miiw.dwTypeData = L"&Show"; - miiw.cch = 4; - InsertMenuItemW(hMenu, 0, TRUE, &miiw); - - AppendMenuW(hMenu, (MF_SEPARATOR), 0, NULL); - AppendMenuW(hMenu, (MF_STRING | MF_ENABLED), 2, L"Un&tray Me"); - } - else - { - MENUITEMINFOA miia; - ZeroMemory( &miia, sizeof( miia ) ); - miia.cbSize = sizeof( miia ); miia.wID = (WORD)( 1 ); - if ( bWin9x ) - { - miia.fMask = MIIM_ID | MIIM_STATE | MIIM_TYPE; - miia.fType = MFT_STRING; - miia.fState = MFS_ENABLED | MFS_DEFAULT; - } - else - { - miia.fMask = MIIM_ID | MIIM_STATE | MIIM_STRING; - miia.fState = MFS_ENABLED | MFS_DEFAULT; - } - miia.dwTypeData = "&Show"; - miia.cch = 4; - InsertMenuItemA( hMenu, 0, TRUE, &miia ); - - AppendMenuA( hMenu, MF_SEPARATOR, 0, NULL ); - AppendMenuA( hMenu, MF_STRING | MF_ENABLED, 2, "Un&tray Me" ); - } - - // HACK: Use menu trick to get rid of 'feature' - POINT pt; - GetCursorPos( &pt ); - INT nResult = TrackPopupMenuEx( hMenu, TPM_RETURNCMD | TPM_NONOTIFY | TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RIGHTBUTTON, ( pt.x + 1), pt.y, hWnd, NULL ); - DestroyMenu( hMenu ); - - // Get selection - switch( nResult ) - { - case 1: - ShowTrayedWindow( hWnd ); - break; - - case 2: - LocalUnmapDll( true ); - break; - } - - // Success - return ( nResult != 0 ); + HMENU hMenu; + + if ((hMenu= CreatePopupMenu()) == NULL) + return false; + + if (IsWindowUnicode(hWnd)) + { + MENUITEMINFOW miiw; + ZeroMemory(&miiw, sizeof(miiw)); + miiw.cbSize = sizeof(miiw); + miiw.wID = (WORD)(1); + if (bWin9x) + { + miiw.fMask = (MIIM_ID | MIIM_STATE | MIIM_TYPE); + miiw.fType = (MFT_STRING); + miiw.fState = (MFS_ENABLED | MFS_DEFAULT); + } + else + { + miiw.fMask = (MIIM_ID | MIIM_STATE | MIIM_STRING); + miiw.fState = (MFS_ENABLED | MFS_DEFAULT); + } + miiw.dwTypeData = L"&Show"; + miiw.cch = 4; + InsertMenuItemW(hMenu, 0, TRUE, &miiw); + + AppendMenuW(hMenu, (MF_SEPARATOR), 0, NULL); + AppendMenuW(hMenu, (MF_STRING | MF_ENABLED), 2, L"Un&tray Me"); + } + else + { + MENUITEMINFOA miia; + ZeroMemory(&miia, sizeof(miia)); + miia.cbSize = sizeof(miia); miia.wID = (WORD)(1); + if (bWin9x) + { + miia.fMask = MIIM_ID | MIIM_STATE | MIIM_TYPE; + miia.fType = MFT_STRING; + miia.fState = MFS_ENABLED | MFS_DEFAULT; + } + else + { + miia.fMask = MIIM_ID | MIIM_STATE | MIIM_STRING; + miia.fState = MFS_ENABLED | MFS_DEFAULT; + } + miia.dwTypeData = "&Show"; + miia.cch = 4; + InsertMenuItemA(hMenu, 0, TRUE, &miia); + + AppendMenuA(hMenu, MF_SEPARATOR, 0, NULL); + AppendMenuA(hMenu, MF_STRING | MF_ENABLED, 2, "Un&tray Me"); + } + + // HACK: Use menu trick to get rid of 'feature' + POINT pt; + GetCursorPos(&pt); + INT nResult = TrackPopupMenuEx(hMenu, TPM_RETURNCMD | TPM_NONOTIFY | TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RIGHTBUTTON, (pt.x + 1), pt.y, hWnd, NULL); + DestroyMenu(hMenu); + + // Get selection + switch (nResult) + { + case 1: + ShowTrayedWindow(hWnd); + break; + + case 2: + LocalUnmapDll(true); + break; + } + + // Success + return (nResult != 0); } bool ShowTrayedWindow (HWND hWnd) { - union - { - NOTIFYICONDATAA nidA; - NOTIFYICONDATAW nidW; - }; - - if ( !g_bInTray ) - return false; - - // Get window version - if ( !bWin9x_Known ) - { - GetVersionWin9x(); - bWin9x_Known = true; - } - - // Set up charset-specific info - if( IsWindowUnicode( hWnd ) ) - { - // Delete tray icon - nidW.cbSize = sizeof( NOTIFYICONDATAW ); - nidW.hWnd = hWnd; nidW.uID = ID_TRAYME_TRAYEDWINDOW; - if( Shell_NotifyIconW( NIM_DELETE, &nidW ) == 0 ) - return false; - } - else - { - // Delete tray icon - nidA.cbSize = sizeof( NOTIFYICONDATAA ); - nidA.hWnd = hWnd; nidA.uID = ID_TRAYME_TRAYEDWINDOW; - if( Shell_NotifyIconA( NIM_DELETE, &nidA ) == 0 ) - return false; - } - - // Show window - ShowWindow( hWnd, SW_SHOWNORMAL ); - SetForegroundWindow( hWnd ); - g_bInTray = false; - - return true; + union + { + NOTIFYICONDATAA nidA; + NOTIFYICONDATAW nidW; + }; + + if (!g_bInTray) + return false; + + // Get window version + if (!bWin9x_Known) + { + GetVersionWin9x(); + bWin9x_Known = true; + } + + // Set up charset-specific info + if (IsWindowUnicode(hWnd)) + { + // Delete tray icon + nidW.cbSize = sizeof(NOTIFYICONDATAW); + nidW.hWnd = hWnd; nidW.uID = ID_TRAYME_TRAYEDWINDOW; + if (Shell_NotifyIconW(NIM_DELETE, &nidW) == 0) + return false; + } + else + { + // Delete tray icon + nidA.cbSize = sizeof(NOTIFYICONDATAA); + nidA.hWnd = hWnd; nidA.uID = ID_TRAYME_TRAYEDWINDOW; + if (Shell_NotifyIconA(NIM_DELETE, &nidA) == 0) + return false; + } + + // Show window + ShowWindow(hWnd, SW_SHOWNORMAL); + SetForegroundWindow(hWnd); + g_bInTray = false; + + return true; } // Unmaps the Dll and creates a new thread for exiting bool FreeLibraryAndExit() { - HANDLE hThread; + HANDLE hThread; - // Create termination thread, then resume it and close the handle - hThread = CreateThread( NULL, 0, DllTerminationProc, (LPVOID)g_hDll, CREATE_SUSPENDED, 0 ); - SetThreadPriority( hThread, THREAD_PRIORITY_IDLE ); - ResumeThread( hThread ); - CloseHandle( hThread ); + // Create termination thread, then resume it and close the handle + hThread = CreateThread(NULL, 0, DllTerminationProc, (LPVOID)g_hDll, CREATE_SUSPENDED, 0); + SetThreadPriority(hThread, THREAD_PRIORITY_IDLE); + ResumeThread(hThread); + CloseHandle(hThread); - return true; + return true; } // Unmaps the Dll and exits the thread -DWORD WINAPI DllTerminationProc( LPVOID lpParameter ) +DWORD WINAPI DllTerminationProc(LPVOID lpParameter) { - // TODO: WaitForSingleObject() ? - // Wait enough time for the DLL to stop being used - Sleep( 200 ); + // TODO: WaitForSingleObject() ? + // Wait enough time for the DLL to stop being used + Sleep(200); - // No longer subclassed - g_bSubclassed = false; + // No longer subclassed + g_bSubclassed = false; - // Double-beep for error - MessageBeep( MB_OK ); + // Double-beep for error + MessageBeep(MB_OK); - // Unmap DLL - FreeLibraryAndExitThread( (HMODULE)lpParameter, 0 ); - return 0; + // Unmap DLL + FreeLibraryAndExitThread((HMODULE)lpParameter, 0); + return 0; } diff --git a/TrayMeDll/Main.h b/TrayMeDll/Main.h index 2385474..013c21e 100644 --- a/TrayMeDll/Main.h +++ b/TrayMeDll/Main.h @@ -9,6 +9,6 @@ #define HOOKDLL_API __declspec(dllexport) // Public functions -HOOKDLL_API BOOL WINAPI IsSubclassed (); -HOOKDLL_API BOOL WINAPI InjectDll ( HWND hWnd ); -HOOKDLL_API BOOL WINAPI UnmapDll (); +HOOKDLL_API BOOL WINAPI IsSubclassed(); +HOOKDLL_API BOOL WINAPI InjectDll(HWND hWnd); +HOOKDLL_API BOOL WINAPI UnmapDll();