From 9a30897a4147cf0b07559aa0f323403456a634cb Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sun, 22 Apr 2007 07:49:38 +0000 Subject: [PATCH] *** empty log message *** --- ase/ase.sln | 2 +- ase/com/Awk.h | 6 +- ase/com/AwkExtio.h | 4 +- ase/com/Buffer.h | 4 +- ase/com/asecom.cpp | 4 +- ase/com/asecom.idl | 6 +- ase/test/cnt/AwkForm.Designer.cs | 381 ++++++++++++++++++ ase/test/cnt/AwkForm.cs | 87 ++++ ase/test/cnt/AwkForm.resx | 123 ++++++ ase/test/cnt/Program.cs | 20 + ase/test/cnt/Properties/AssemblyInfo.cs | 33 ++ ase/test/cnt/Properties/Resources.Designer.cs | 71 ++++ ase/test/cnt/Properties/Resources.resx | 117 ++++++ ase/test/cnt/Properties/Settings.Designer.cs | 30 ++ ase/test/cnt/Properties/Settings.settings | 7 + ase/test/com/AwkForm.frm | 90 ++--- ase/test/com/ase.vbp | 4 +- ase/test/com/asetestcom_net.csproj | 86 ++++ 18 files changed, 1015 insertions(+), 60 deletions(-) create mode 100644 ase/test/cnt/AwkForm.Designer.cs create mode 100644 ase/test/cnt/AwkForm.cs create mode 100644 ase/test/cnt/AwkForm.resx create mode 100644 ase/test/cnt/Program.cs create mode 100644 ase/test/cnt/Properties/AssemblyInfo.cs create mode 100644 ase/test/cnt/Properties/Resources.Designer.cs create mode 100644 ase/test/cnt/Properties/Resources.resx create mode 100644 ase/test/cnt/Properties/Settings.Designer.cs create mode 100644 ase/test/cnt/Properties/Settings.settings create mode 100644 ase/test/com/asetestcom_net.csproj diff --git a/ase/ase.sln b/ase/ase.sln index 9fa19adc..432fc73d 100644 --- a/ase/ase.sln +++ b/ase/ase.sln @@ -44,7 +44,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "asecom_net", "com\asecom_ne {963AF7B5-12E6-42B6-8CBE-89136C1A109B} = {963AF7B5-12E6-42B6-8CBE-89136C1A109B} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "asetestcom_net", "asetestcom_net\asetestcom_net.csproj", "{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "asetestcom_net", "test\com\asetestcom_net.csproj", "{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}" ProjectSection(ProjectDependencies) = postProject {89660879-3897-4078-A9C3-9C4667233E0A} = {89660879-3897-4078-A9C3-9C4667233E0A} EndProjectSection diff --git a/ase/com/Awk.h b/ase/com/Awk.h index d02d4079..bb82274a 100644 --- a/ase/com/Awk.h +++ b/ase/com/Awk.h @@ -1,5 +1,5 @@ /* - * $Id: Awk.h,v 1.22 2007-04-21 12:40:44 bacon Exp $ + * $Id: Awk.h,v 1.23 2007-04-22 07:47:15 bacon Exp $ * * {License} */ @@ -21,13 +21,13 @@ // CAwk class CAwk : - public IDispatchImpl, + public IDispatchImpl, public ISupportErrorInfo, /*public CComObjectRoot,*/ public CComObjectRootEx, public CComCoClass, public IConnectionPointContainerImpl, - public IProvideClassInfo2Impl<&CLSID_Awk, &DIID_IAwkEvents, &LIBID_ASELib>, + public IProvideClassInfo2Impl<&CLSID_Awk, &DIID_IAwkEvents, &LIBID_ASECOM>, public CProxyIAwkEvents< CAwk > { diff --git a/ase/com/AwkExtio.h b/ase/com/AwkExtio.h index 907b0d1c..281a692e 100644 --- a/ase/com/AwkExtio.h +++ b/ase/com/AwkExtio.h @@ -1,5 +1,5 @@ /* - * $Id: AwkExtio.h,v 1.10 2007-04-15 13:15:35 bacon Exp $ + * $Id: AwkExtio.h,v 1.11 2007-04-22 07:47:15 bacon Exp $ * * {License} */ @@ -15,7 +15,7 @@ class ATL_NO_VTABLE CAwkExtio : public CComObjectRootEx, public CComCoClass, - public IDispatchImpl + public IDispatchImpl { public: BSTR name; diff --git a/ase/com/Buffer.h b/ase/com/Buffer.h index 6cfc7f23..b50b6d27 100644 --- a/ase/com/Buffer.h +++ b/ase/com/Buffer.h @@ -1,5 +1,5 @@ /* - * $Id: Buffer.h,v 1.6 2007-03-24 05:18:32 bacon Exp $ + * $Id: Buffer.h,v 1.7 2007-04-22 07:47:15 bacon Exp $ * * {License} */ @@ -13,7 +13,7 @@ class ATL_NO_VTABLE CBuffer : public CComObjectRootEx, public CComCoClass, - public IDispatchImpl + public IDispatchImpl { public: BSTR str; diff --git a/ase/com/asecom.cpp b/ase/com/asecom.cpp index d70423a3..dd00895a 100644 --- a/ase/com/asecom.cpp +++ b/ase/com/asecom.cpp @@ -1,5 +1,5 @@ /* - * $Id: asecom.cpp,v 1.2 2007-03-24 05:49:57 bacon Exp $ + * $Id: asecom.cpp,v 1.3 2007-04-22 07:47:15 bacon Exp $ * * {License} */ @@ -34,7 +34,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) { if (dwReason == DLL_PROCESS_ATTACH) { - _Module.Init(ObjectMap, hInstance, &LIBID_ASELib); + _Module.Init(ObjectMap, hInstance, &LIBID_ASECOM); DisableThreadLibraryCalls(hInstance); } else if (dwReason == DLL_PROCESS_DETACH) diff --git a/ase/com/asecom.idl b/ase/com/asecom.idl index 8b4eed7d..500db842 100644 --- a/ase/com/asecom.idl +++ b/ase/com/asecom.idl @@ -1,5 +1,5 @@ /* - * $Id: asecom.idl,v 1.6 2007-04-21 12:40:44 bacon Exp $ + * $Id: asecom.idl,v 1.7 2007-04-22 07:47:15 bacon Exp $ */ import "oaidl.idl"; @@ -152,13 +152,13 @@ interface IAwk : IDispatch HRESULT UseLongLong([in] VARIANT_BOOL newVal); }; -/* ASELib */ +/* ASECOM */ [ uuid(F9C69806-16A1-4162-998A-876B33C470BF), version(1.0), helpstring("ASE 1.0 Type Library") ] -library ASELib +library ASECOM { importlib("stdole32.tlb"); importlib("stdole2.tlb"); diff --git a/ase/test/cnt/AwkForm.Designer.cs b/ase/test/cnt/AwkForm.Designer.cs new file mode 100644 index 00000000..a8e9c77b --- /dev/null +++ b/ase/test/cnt/AwkForm.Designer.cs @@ -0,0 +1,381 @@ +namespace asetestcom_net +{ + partial class AwkForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.tbxSourceInput = new System.Windows.Forms.TextBox(); + this.btnRun = new System.Windows.Forms.Button(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.panel1 = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.panel3 = new System.Windows.Forms.Panel(); + this.tbxSourceOutput = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.panel4 = new System.Windows.Forms.Panel(); + this.tbxConsoleInput = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.panel5 = new System.Windows.Forms.Panel(); + this.tbxConsoleOutput = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.statusStrip1 = new System.Windows.Forms.StatusStrip(); + this.cbxEntryPoint = new System.Windows.Forms.ComboBox(); + this.panel2 = new System.Windows.Forms.Panel(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.chkPassArgumentsToEntryPoint = new System.Windows.Forms.CheckBox(); + this.btnClearAllArguments = new System.Windows.Forms.Button(); + this.btnAddArgument = new System.Windows.Forms.Button(); + this.tbxArgument = new System.Windows.Forms.TextBox(); + this.lbxArguments = new System.Windows.Forms.ListBox(); + this.tableLayoutPanel1.SuspendLayout(); + this.panel1.SuspendLayout(); + this.panel3.SuspendLayout(); + this.panel4.SuspendLayout(); + this.panel5.SuspendLayout(); + this.panel2.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // tbxSourceInput + // + this.tbxSourceInput.Dock = System.Windows.Forms.DockStyle.Fill; + this.tbxSourceInput.Location = new System.Drawing.Point(0, 19); + this.tbxSourceInput.Multiline = true; + this.tbxSourceInput.Name = "tbxSourceInput"; + this.tbxSourceInput.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.tbxSourceInput.Size = new System.Drawing.Size(240, 230); + this.tbxSourceInput.TabIndex = 1; + this.tbxSourceInput.WordWrap = false; + // + // btnRun + // + this.btnRun.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnRun.Location = new System.Drawing.Point(76, 303); + this.btnRun.Name = "btnRun"; + this.btnRun.Size = new System.Drawing.Size(75, 23); + this.btnRun.TabIndex = 2; + this.btnRun.Text = "Run"; + this.btnRun.UseVisualStyleBackColor = true; + this.btnRun.Click += new System.EventHandler(this.btnRun_Click); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 2; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.panel3, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.panel4, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.panel5, 1, 1); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(157, 0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 2; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(492, 510); + this.tableLayoutPanel1.TabIndex = 2; + // + // panel1 + // + this.panel1.Controls.Add(this.tbxSourceInput); + this.panel1.Controls.Add(this.label1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(3, 3); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(240, 249); + this.panel1.TabIndex = 5; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Dock = System.Windows.Forms.DockStyle.Top; + this.label1.Location = new System.Drawing.Point(0, 0); + this.label1.Name = "label1"; + this.label1.Padding = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.label1.Size = new System.Drawing.Size(68, 19); + this.label1.TabIndex = 2; + this.label1.Text = "Source Input"; + // + // panel3 + // + this.panel3.Controls.Add(this.tbxSourceOutput); + this.panel3.Controls.Add(this.label2); + this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel3.Location = new System.Drawing.Point(249, 3); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(240, 249); + this.panel3.TabIndex = 6; + // + // tbxSourceOutput + // + this.tbxSourceOutput.Dock = System.Windows.Forms.DockStyle.Fill; + this.tbxSourceOutput.Location = new System.Drawing.Point(0, 19); + this.tbxSourceOutput.Multiline = true; + this.tbxSourceOutput.Name = "tbxSourceOutput"; + this.tbxSourceOutput.ReadOnly = true; + this.tbxSourceOutput.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.tbxSourceOutput.Size = new System.Drawing.Size(240, 230); + this.tbxSourceOutput.TabIndex = 2; + this.tbxSourceOutput.WordWrap = false; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Dock = System.Windows.Forms.DockStyle.Top; + this.label2.Location = new System.Drawing.Point(0, 0); + this.label2.Name = "label2"; + this.label2.Padding = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.label2.Size = new System.Drawing.Size(76, 19); + this.label2.TabIndex = 0; + this.label2.Text = "Source Output"; + // + // panel4 + // + this.panel4.Controls.Add(this.tbxConsoleInput); + this.panel4.Controls.Add(this.label3); + this.panel4.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel4.Location = new System.Drawing.Point(3, 258); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(240, 249); + this.panel4.TabIndex = 7; + // + // tbxConsoleInput + // + this.tbxConsoleInput.Dock = System.Windows.Forms.DockStyle.Fill; + this.tbxConsoleInput.Location = new System.Drawing.Point(0, 19); + this.tbxConsoleInput.Multiline = true; + this.tbxConsoleInput.Name = "tbxConsoleInput"; + this.tbxConsoleInput.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.tbxConsoleInput.Size = new System.Drawing.Size(240, 230); + this.tbxConsoleInput.TabIndex = 3; + this.tbxConsoleInput.WordWrap = false; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Dock = System.Windows.Forms.DockStyle.Top; + this.label3.Location = new System.Drawing.Point(0, 0); + this.label3.Name = "label3"; + this.label3.Padding = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.label3.Size = new System.Drawing.Size(72, 19); + this.label3.TabIndex = 0; + this.label3.Text = "Console Input"; + // + // panel5 + // + this.panel5.Controls.Add(this.tbxConsoleOutput); + this.panel5.Controls.Add(this.label4); + this.panel5.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel5.Location = new System.Drawing.Point(249, 258); + this.panel5.Name = "panel5"; + this.panel5.Size = new System.Drawing.Size(240, 249); + this.panel5.TabIndex = 8; + // + // tbxConsoleOutput + // + this.tbxConsoleOutput.Dock = System.Windows.Forms.DockStyle.Fill; + this.tbxConsoleOutput.Location = new System.Drawing.Point(0, 19); + this.tbxConsoleOutput.Multiline = true; + this.tbxConsoleOutput.Name = "tbxConsoleOutput"; + this.tbxConsoleOutput.ReadOnly = true; + this.tbxConsoleOutput.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.tbxConsoleOutput.Size = new System.Drawing.Size(240, 230); + this.tbxConsoleOutput.TabIndex = 4; + this.tbxConsoleOutput.WordWrap = false; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Dock = System.Windows.Forms.DockStyle.Top; + this.label4.Location = new System.Drawing.Point(0, 0); + this.label4.Name = "label4"; + this.label4.Padding = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.label4.Size = new System.Drawing.Size(80, 19); + this.label4.TabIndex = 0; + this.label4.Text = "Console Output"; + // + // statusStrip1 + // + this.statusStrip1.Location = new System.Drawing.Point(0, 510); + this.statusStrip1.Name = "statusStrip1"; + this.statusStrip1.Size = new System.Drawing.Size(649, 22); + this.statusStrip1.TabIndex = 3; + this.statusStrip1.Text = "statusStrip1"; + // + // cbxEntryPoint + // + this.cbxEntryPoint.Dock = System.Windows.Forms.DockStyle.Fill; + this.cbxEntryPoint.FormattingEnabled = true; + this.cbxEntryPoint.Location = new System.Drawing.Point(3, 16); + this.cbxEntryPoint.Name = "cbxEntryPoint"; + this.cbxEntryPoint.Size = new System.Drawing.Size(147, 21); + this.cbxEntryPoint.TabIndex = 1; + // + // panel2 + // + this.panel2.AutoScroll = true; + this.panel2.Controls.Add(this.btnRun); + this.panel2.Controls.Add(this.groupBox2); + this.panel2.Controls.Add(this.groupBox1); + this.panel2.Dock = System.Windows.Forms.DockStyle.Left; + this.panel2.Location = new System.Drawing.Point(0, 0); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(157, 510); + this.panel2.TabIndex = 5; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.cbxEntryPoint); + this.groupBox2.Location = new System.Drawing.Point(0, 4); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(153, 45); + this.groupBox2.TabIndex = 1; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Entry Point"; + // + // groupBox1 + // + this.groupBox1.AutoSize = true; + this.groupBox1.Controls.Add(this.chkPassArgumentsToEntryPoint); + this.groupBox1.Controls.Add(this.btnClearAllArguments); + this.groupBox1.Controls.Add(this.btnAddArgument); + this.groupBox1.Controls.Add(this.tbxArgument); + this.groupBox1.Controls.Add(this.lbxArguments); + this.groupBox1.Location = new System.Drawing.Point(0, 51); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(154, 247); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Arguments"; + // + // chkPassArgumentsToEntryPoint + // + this.chkPassArgumentsToEntryPoint.AutoSize = true; + this.chkPassArgumentsToEntryPoint.Location = new System.Drawing.Point(19, 211); + this.chkPassArgumentsToEntryPoint.Name = "chkPassArgumentsToEntryPoint"; + this.chkPassArgumentsToEntryPoint.Size = new System.Drawing.Size(119, 17); + this.chkPassArgumentsToEntryPoint.TabIndex = 4; + this.chkPassArgumentsToEntryPoint.Text = "Pass To Entry Point"; + this.chkPassArgumentsToEntryPoint.UseVisualStyleBackColor = true; + // + // btnClearAllArguments + // + this.btnClearAllArguments.Location = new System.Drawing.Point(3, 181); + this.btnClearAllArguments.Name = "btnClearAllArguments"; + this.btnClearAllArguments.Size = new System.Drawing.Size(145, 22); + this.btnClearAllArguments.TabIndex = 3; + this.btnClearAllArguments.Text = "Clear All"; + this.btnClearAllArguments.UseVisualStyleBackColor = true; + this.btnClearAllArguments.Click += new System.EventHandler(this.btnClearAllArguments_Click); + // + // btnAddArgument + // + this.btnAddArgument.Location = new System.Drawing.Point(87, 154); + this.btnAddArgument.Name = "btnAddArgument"; + this.btnAddArgument.Size = new System.Drawing.Size(61, 22); + this.btnAddArgument.TabIndex = 2; + this.btnAddArgument.Text = "Add"; + this.btnAddArgument.UseVisualStyleBackColor = true; + this.btnAddArgument.Click += new System.EventHandler(this.btnAddArgument_Click); + // + // tbxArgument + // + this.tbxArgument.Location = new System.Drawing.Point(3, 155); + this.tbxArgument.Name = "tbxArgument"; + this.tbxArgument.Size = new System.Drawing.Size(83, 20); + this.tbxArgument.TabIndex = 1; + // + // lbxArguments + // + this.lbxArguments.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbxArguments.FormattingEnabled = true; + this.lbxArguments.Location = new System.Drawing.Point(3, 16); + this.lbxArguments.Name = "lbxArguments"; + this.lbxArguments.Size = new System.Drawing.Size(147, 134); + this.lbxArguments.TabIndex = 0; + // + // AwkForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(649, 532); + this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.panel2); + this.Controls.Add(this.statusStrip1); + this.Name = "AwkForm"; + this.Text = "ASE.COM.NET.AWK"; + this.tableLayoutPanel1.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.panel4.ResumeLayout(false); + this.panel4.PerformLayout(); + this.panel5.ResumeLayout(false); + this.panel5.PerformLayout(); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox tbxSourceInput; + private System.Windows.Forms.Button btnRun; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.TextBox tbxSourceOutput; + private System.Windows.Forms.TextBox tbxConsoleInput; + private System.Windows.Forms.TextBox tbxConsoleOutput; + private System.Windows.Forms.StatusStrip statusStrip1; + private System.Windows.Forms.ComboBox cbxEntryPoint; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Button btnClearAllArguments; + private System.Windows.Forms.Button btnAddArgument; + private System.Windows.Forms.TextBox tbxArgument; + private System.Windows.Forms.ListBox lbxArguments; + private System.Windows.Forms.CheckBox chkPassArgumentsToEntryPoint; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Panel panel5; + private System.Windows.Forms.Label label4; + } +} \ No newline at end of file diff --git a/ase/test/cnt/AwkForm.cs b/ase/test/cnt/AwkForm.cs new file mode 100644 index 00000000..a0782000 --- /dev/null +++ b/ase/test/cnt/AwkForm.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using System.IO; + +namespace asetestcom_net +{ + public partial class AwkForm : Form + { + public AwkForm() + { + InitializeComponent(); + } + + private void btnRun_Click(object sender, EventArgs e) + { + ASE.Awk awk = new ASE.StdAwk (); + + //System.Text.Encoding.Default + awk.SourceInputStream = new MemoryStream (UnicodeEncoding.UTF8.GetBytes(tbxSourceInput.Text)); + awk.SourceOutputStream = new MemoryStream(); + + awk.ConsoleInputStream = new MemoryStream(UnicodeEncoding.UTF8.GetBytes(tbxConsoleInput.Text)); + awk.ConsoleOutputStream = new MemoryStream(); + + tbxSourceOutput.Text = ""; + tbxConsoleOutput.Text = ""; + + if (!awk.Parse()) + { + MessageBox.Show(awk.ErrorMessage); + } + else + { + MemoryStream s = (MemoryStream)awk.SourceOutputStream; + tbxSourceOutput.Text = UnicodeEncoding.UTF8.GetString(s.GetBuffer()); + + awk.EntryPoint = cbxEntryPoint.Text; + awk.ArgumentsToEntryPoint = chkPassArgumentsToEntryPoint.Checked; + + bool n; + int nargs = lbxArguments.Items.Count; + if (nargs > 0) + { + string[] args = new string[nargs]; + for (int i = 0; i < nargs; i++) + args[i] = lbxArguments.Items[i].ToString(); + n = awk.Run(args); + } + else n = awk.Run(); + + if (!n) + { + MessageBox.Show(awk.ErrorMessage); + } + else + { + MemoryStream c = (MemoryStream)awk.ConsoleOutputStream; + tbxConsoleOutput.Text = UnicodeEncoding.UTF8.GetString(c.GetBuffer()); + } + } + + //awk.Close(); + } + + + private void btnAddArgument_Click(object sender, EventArgs e) + { + if (tbxArgument.Text.Length > 0) + { + lbxArguments.Items.Add(tbxArgument.Text); + tbxArgument.Text = ""; + tbxArgument.Focus(); + } + } + + private void btnClearAllArguments_Click(object sender, EventArgs e) + { + lbxArguments.Items.Clear(); + } + + } +} \ No newline at end of file diff --git a/ase/test/cnt/AwkForm.resx b/ase/test/cnt/AwkForm.resx new file mode 100644 index 00000000..b9c202bf --- /dev/null +++ b/ase/test/cnt/AwkForm.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/ase/test/cnt/Program.cs b/ase/test/cnt/Program.cs new file mode 100644 index 00000000..0cdfaf15 --- /dev/null +++ b/ase/test/cnt/Program.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace asetestcom_net +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new AwkForm()); + } + } +} \ No newline at end of file diff --git a/ase/test/cnt/Properties/AssemblyInfo.cs b/ase/test/cnt/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..7b032d3a --- /dev/null +++ b/ase/test/cnt/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("asetestcom_net")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("asetestcom_net")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("7cd62543-7cf6-4b69-90b9-be0becdbfa19")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ase/test/cnt/Properties/Resources.Designer.cs b/ase/test/cnt/Properties/Resources.Designer.cs new file mode 100644 index 00000000..4f130cd2 --- /dev/null +++ b/ase/test/cnt/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.42 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace asetestcom_net.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("asetestcom_net.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/ase/test/cnt/Properties/Resources.resx b/ase/test/cnt/Properties/Resources.resx new file mode 100644 index 00000000..af7dbebb --- /dev/null +++ b/ase/test/cnt/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ase/test/cnt/Properties/Settings.Designer.cs b/ase/test/cnt/Properties/Settings.Designer.cs new file mode 100644 index 00000000..9dbbed63 --- /dev/null +++ b/ase/test/cnt/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.42 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace asetestcom_net.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/ase/test/cnt/Properties/Settings.settings b/ase/test/cnt/Properties/Settings.settings new file mode 100644 index 00000000..39645652 --- /dev/null +++ b/ase/test/cnt/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ase/test/com/AwkForm.frm b/ase/test/com/AwkForm.frm index 2d62b3b8..039c1037 100644 --- a/ase/test/com/AwkForm.frm +++ b/ase/test/com/AwkForm.frm @@ -197,7 +197,7 @@ Attribute VB_Exposed = False Option Explicit Option Base 0 Dim source_first As Boolean -Public WithEvents Awk As ASELib.Awk +Public WithEvents Awk As ASECOM.Awk Attribute Awk.VB_VarHelpID = -1 Private Sub btnAddArgument_Click() @@ -222,7 +222,7 @@ Private Sub btnExecute_Click() ConsoleOut.Text = "" SourceOut.Text = "" - Set Awk = New ASELib.Awk + Set Awk = New ASECOM.Awk Awk.ExplicitVariable = True Awk.ImplicitVariable = True @@ -284,15 +284,15 @@ Private Sub btnExecute_Click() End Sub -Function Awk_OpenSource(ByVal mode As ASELib.AwkSourceMode) As Long +Function Awk_OpenSource(ByVal mode As ASECOM.AwkSourceMode) As Long Awk_OpenSource = 1 End Function -Function Awk_CloseSource(ByVal mode As ASELib.AwkSourceMode) As Long +Function Awk_CloseSource(ByVal mode As ASECOM.AwkSourceMode) As Long Awk_CloseSource = 0 End Function -Function Awk_ReadSource(ByVal buf As ASELib.Buffer) As Long +Function Awk_ReadSource(ByVal buf As ASECOM.Buffer) As Long If source_first Then buf.value = SourceIn.Text Awk_ReadSource = Len(buf.value) @@ -302,7 +302,7 @@ Function Awk_ReadSource(ByVal buf As ASELib.Buffer) As Long End If End Function -Function Awk_WriteSource(ByVal buf As ASELib.Buffer) As Long +Function Awk_WriteSource(ByVal buf As ASECOM.Buffer) As Long Dim value As String Dim l As Integer @@ -312,18 +312,18 @@ Function Awk_WriteSource(ByVal buf As ASELib.Buffer) As Long Awk_WriteSource = Len(value) End Function -Function Awk_OpenExtio(ByVal extio As ASELib.AwkExtio) As Long +Function Awk_OpenExtio(ByVal extio As ASECOM.AwkExtio) As Long Awk_OpenExtio = -1 Select Case extio.Type - Case ASELib.AWK_EXTIO_CONSOLE - If extio.mode = ASELib.AWK_EXTIO_CONSOLE_READ Then + Case ASECOM.AWK_EXTIO_CONSOLE + If extio.mode = ASECOM.AWK_EXTIO_CONSOLE_READ Then extio.Handle = New AwkExtioConsole With extio.Handle .EOF = False End With Awk_OpenExtio = 1 - ElseIf extio.mode = ASELib.AWK_EXTIO_CONSOLE_WRITE Then + ElseIf extio.mode = ASECOM.AWK_EXTIO_CONSOLE_WRITE Then extio.Handle = New AwkExtioConsole With extio.Handle .EOF = False @@ -331,20 +331,20 @@ Function Awk_OpenExtio(ByVal extio As ASELib.AwkExtio) As Long Awk_OpenExtio = 1 End If - Case ASELib.AWK_EXTIO_FILE - If extio.mode = ASELib.AWK_EXTIO_FILE_READ Then + Case ASECOM.AWK_EXTIO_FILE + If extio.mode = ASECOM.AWK_EXTIO_FILE_READ Then extio.Handle = FreeFile On Error GoTo ErrorTrap Open extio.name For Input As #extio.Handle On Error GoTo 0 Awk_OpenExtio = 1 - ElseIf extio.mode = ASELib.AWK_EXTIO_FILE_WRITE Then + ElseIf extio.mode = ASECOM.AWK_EXTIO_FILE_WRITE Then extio.Handle = FreeFile On Error GoTo ErrorTrap Open extio.name For Output As #extio.Handle On Error GoTo 0 Awk_OpenExtio = 1 - ElseIf extio.mode = ASELib.AWK_EXTIO_FILE_APPEND Then + ElseIf extio.mode = ASECOM.AWK_EXTIO_FILE_APPEND Then extio.Handle = FreeFile On Error GoTo ErrorTrap Open extio.name For Append As #extio.Handle @@ -352,9 +352,9 @@ Function Awk_OpenExtio(ByVal extio As ASELib.AwkExtio) As Long Awk_OpenExtio = 1 End If - Case ASELib.AWK_EXTIO_PIPE + Case ASECOM.AWK_EXTIO_PIPE Awk_OpenExtio = -1 - Case ASELib.AWK_EXTIO_COPROC + Case ASECOM.AWK_EXTIO_COPROC Awk_OpenExtio = -1 End Select @@ -364,74 +364,74 @@ ErrorTrap: Exit Function End Function -Function Awk_CloseExtio(ByVal extio As ASELib.AwkExtio) As Long +Function Awk_CloseExtio(ByVal extio As ASECOM.AwkExtio) As Long Awk_CloseExtio = -1 Select Case extio.Type - Case ASELib.AWK_EXTIO_CONSOLE - If extio.mode = ASELib.AWK_EXTIO_CONSOLE_READ Or _ - extio.mode = ASELib.AWK_EXTIO_CONSOLE_WRITE Then + Case ASECOM.AWK_EXTIO_CONSOLE + If extio.mode = ASECOM.AWK_EXTIO_CONSOLE_READ Or _ + extio.mode = ASECOM.AWK_EXTIO_CONSOLE_WRITE Then extio.Handle = Nothing Awk_CloseExtio = 0 End If - Case ASELib.AWK_EXTIO_FILE - If extio.mode = ASELib.AWK_EXTIO_FILE_READ Or _ - extio.mode = ASELib.AWK_EXTIO_FILE_WRITE Or _ - extio.mode = ASELib.AWK_EXTIO_FILE_APPEND Then + Case ASECOM.AWK_EXTIO_FILE + If extio.mode = ASECOM.AWK_EXTIO_FILE_READ Or _ + extio.mode = ASECOM.AWK_EXTIO_FILE_WRITE Or _ + extio.mode = ASECOM.AWK_EXTIO_FILE_APPEND Then Close #extio.Handle Awk_CloseExtio = 0 End If - Case ASELib.AWK_EXTIO_PIPE + Case ASECOM.AWK_EXTIO_PIPE Awk_CloseExtio = -1 - Case ASELib.AWK_EXTIO_COPROC + Case ASECOM.AWK_EXTIO_COPROC Awk_CloseExtio = -1 End Select End Function -Function Awk_ReadExtio(ByVal extio As ASELib.AwkExtio, ByVal buf As ASELib.Buffer) As Long +Function Awk_ReadExtio(ByVal extio As ASECOM.AwkExtio, ByVal buf As ASECOM.Buffer) As Long Awk_ReadExtio = -1 Select Case extio.Type - Case ASELib.AWK_EXTIO_CONSOLE - If extio.mode = ASELib.AWK_EXTIO_CONSOLE_READ Then + Case ASECOM.AWK_EXTIO_CONSOLE + If extio.mode = ASECOM.AWK_EXTIO_CONSOLE_READ Then Awk_ReadExtio = ReadExtioConsole(extio, buf) End If - Case ASELib.AWK_EXTIO_FILE - If extio.mode = ASELib.AWK_EXTIO_FILE_READ Then + Case ASECOM.AWK_EXTIO_FILE + If extio.mode = ASECOM.AWK_EXTIO_FILE_READ Then Awk_ReadExtio = ReadExtioFile(extio, buf) End If - Case ASELib.AWK_EXTIO_PIPE + Case ASECOM.AWK_EXTIO_PIPE Awk_ReadExtio = -1 - Case ASELib.AWK_EXTIO_COPROC + Case ASECOM.AWK_EXTIO_COPROC Awk_ReadExtio = -1 End Select End Function -Function Awk_WriteExtio(ByVal extio As ASELib.AwkExtio, ByVal buf As ASELib.Buffer) As Long +Function Awk_WriteExtio(ByVal extio As ASECOM.AwkExtio, ByVal buf As ASECOM.Buffer) As Long Awk_WriteExtio = -1 Select Case extio.Type - Case ASELib.AWK_EXTIO_CONSOLE - If extio.mode = ASELib.AWK_EXTIO_CONSOLE_WRITE Then + Case ASECOM.AWK_EXTIO_CONSOLE + If extio.mode = ASECOM.AWK_EXTIO_CONSOLE_WRITE Then Awk_WriteExtio = WriteExtioConsole(extio, buf) End If - Case ASELib.AWK_EXTIO_FILE - If extio.mode = ASELib.AWK_EXTIO_FILE_WRITE Or _ - extio.mode = ASELib.AWK_EXTIO_FILE_APPEND Then + Case ASECOM.AWK_EXTIO_FILE + If extio.mode = ASECOM.AWK_EXTIO_FILE_WRITE Or _ + extio.mode = ASECOM.AWK_EXTIO_FILE_APPEND Then Awk_WriteExtio = WriteExtioFile(extio, buf) End If - Case ASELib.AWK_EXTIO_PIPE + Case ASECOM.AWK_EXTIO_PIPE Awk_WriteExtio = -1 - Case ASELib.AWK_EXTIO_COPROC + Case ASECOM.AWK_EXTIO_COPROC Awk_WriteExtio = -1 End Select End Function -Function ReadExtioConsole(ByVal extio As ASELib.AwkExtio, ByVal buf As ASELib.Buffer) As Long +Function ReadExtioConsole(ByVal extio As ASECOM.AwkExtio, ByVal buf As ASECOM.Buffer) As Long Dim value As String If Not extio.Handle.EOF Then @@ -444,7 +444,7 @@ Function ReadExtioConsole(ByVal extio As ASELib.AwkExtio, ByVal buf As ASELib.Bu End If End Function -Function ReadExtioFile(ByVal extio As ASELib.AwkExtio, ByVal buf As ASELib.Buffer) As Long +Function ReadExtioFile(ByVal extio As ASECOM.AwkExtio, ByVal buf As ASECOM.Buffer) As Long Dim value As String If EOF(extio.Handle) Then @@ -467,7 +467,7 @@ ErrorTrap: Exit Function End Function -Function WriteExtioConsole(ByVal extio As ASELib.AwkExtio, ByVal buf As ASELib.Buffer) As Long +Function WriteExtioConsole(ByVal extio As ASECOM.AwkExtio, ByVal buf As ASECOM.Buffer) As Long Dim value As String value = buf.value @@ -475,7 +475,7 @@ Function WriteExtioConsole(ByVal extio As ASELib.AwkExtio, ByVal buf As ASELib.B WriteExtioConsole = Len(value) End Function -Function WriteExtioFile(ByVal extio As ASELib.AwkExtio, ByVal buf As ASELib.Buffer) As Long +Function WriteExtioFile(ByVal extio As ASECOM.AwkExtio, ByVal buf As ASECOM.Buffer) As Long Dim value As String WriteExtioFile = -1 diff --git a/ase/test/com/ase.vbp b/ase/test/com/ase.vbp index a9f48796..360de112 100644 --- a/ase/test/com/ase.vbp +++ b/ase/test/com/ase.vbp @@ -1,6 +1,6 @@ Type=Exe Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\WINDOWS\System32\stdole2.tlb#OLE Automation -Reference=*\G{F9C69806-16A1-4162-998A-876B33C470BF}#1.0#0#..\..\release\lib\asecom.dll#ASE Awk 1.0 Type Library +Reference=*\G{F9C69806-16A1-4162-998A-876B33C470BF}#1.0#0#..\..\release\lib\asecom.dll#ASE 1.0 Type Library Form=AwkForm.frm Class=AwkExtioConsole; AwkExtioConsole.cls IconForm="AwkForm" @@ -9,7 +9,7 @@ HelpFile="" Title="ase" ExeName32="ase.exe" Command32="" -Name="ASECOM" +Name="ASECOMVB6" HelpContextID="0" CompatibleMode="0" MajorVer=1 diff --git a/ase/test/com/asetestcom_net.csproj b/ase/test/com/asetestcom_net.csproj new file mode 100644 index 00000000..12a156af --- /dev/null +++ b/ase/test/com/asetestcom_net.csproj @@ -0,0 +1,86 @@ + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {F14B75D8-3ED7-4621-B5B9-E96A80B5D809} + WinExe + Properties + asetestcom_net + asetestcom_net + + + true + full + false + ..\..\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\..\Release\ + TRACE + prompt + 4 + + + + False + ..\release\lib\asecom_net.dll + + + False + ..\release\lib\Interop.ASECOM.dll + + + + + + + + + + + Form + + + AwkForm.cs + + + + + Designer + AwkForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + +