Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Bringing DCOM remoting functionality to Windows CE and .NET CF2.0

, 17 Apr 2006 CPOL
This article shows how to use DCOM on Windows CE 5.0. We will add full DCOM rich error information, and implement a DCOM interface between a Windows XP .NET 2.0 client and Windows CE DCOM server. With this code, it is possible to code .NET remoting alike functionality through DCOM interop.
namespace ControlRoom
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
        private System.Windows.Forms.MainMenu mainMenu1;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.mainMenu1 = new System.Windows.Forms.MainMenu();
            this.btnCreate = new System.Windows.Forms.Button();
            this.btnDialGate = new System.Windows.Forms.Button();
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.textBox2 = new System.Windows.Forms.TextBox();
            this.btnCloseGate = new System.Windows.Forms.Button();
            this.label1 = new System.Windows.Forms.Label();
            this.btnDestroy = new System.Windows.Forms.Button();
            this.SuspendLayout();
            // 
            // btnCreate
            // 
            this.btnCreate.Location = new System.Drawing.Point(14, 46);
            this.btnCreate.Name = "btnCreate";
            this.btnCreate.Size = new System.Drawing.Size(154, 26);
            this.btnCreate.TabIndex = 0;
            this.btnCreate.Text = "Enter Control room";
            this.btnCreate.Click += new System.EventHandler(this.btnCreate_Click);
            // 
            // btnDialGate
            // 
            this.btnDialGate.Location = new System.Drawing.Point(15, 78);
            this.btnDialGate.Name = "btnDialGate";
            this.btnDialGate.Size = new System.Drawing.Size(153, 24);
            this.btnDialGate.TabIndex = 1;
            this.btnDialGate.Text = "Dial gate";
            this.btnDialGate.Click += new System.EventHandler(this.btnDialGate_Click);
            // 
            // textBox1
            // 
            this.textBox1.Location = new System.Drawing.Point(180, 79);
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(64, 23);
            this.textBox1.TabIndex = 2;
            this.textBox1.Text = "textBox1";
            // 
            // textBox2
            // 
            this.textBox2.Location = new System.Drawing.Point(180, 145);
            this.textBox2.Name = "textBox2";
            this.textBox2.Size = new System.Drawing.Size(137, 23);
            this.textBox2.TabIndex = 3;
            this.textBox2.Text = "textBox2";
            // 
            // btnCloseGate
            // 
            this.btnCloseGate.Location = new System.Drawing.Point(15, 112);
            this.btnCloseGate.Name = "btnCloseGate";
            this.btnCloseGate.Size = new System.Drawing.Size(152, 23);
            this.btnCloseGate.TabIndex = 4;
            this.btnCloseGate.Text = "Close gate";
            this.btnCloseGate.Click += new System.EventHandler(this.btnCloseGate_Click);
            // 
            // label1
            // 
            this.label1.Location = new System.Drawing.Point(18, 151);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(148, 16);
            this.label1.Text = "Gate opened to planet";
            // 
            // btnDestroy
            // 
            this.btnDestroy.Location = new System.Drawing.Point(14, 172);
            this.btnDestroy.Name = "btnDestroy";
            this.btnDestroy.Size = new System.Drawing.Size(152, 23);
            this.btnDestroy.TabIndex = 5;
            this.btnDestroy.Text = "Leave Control room";
            this.btnDestroy.Click += new System.EventHandler(this.btnDestroy_Click);
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
            this.AutoScroll = true;
            this.ClientSize = new System.Drawing.Size(320, 207);
            this.Controls.Add(this.btnDestroy);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.btnCloseGate);
            this.Controls.Add(this.textBox2);
            this.Controls.Add(this.textBox1);
            this.Controls.Add(this.btnDialGate);
            this.Controls.Add(this.btnCreate);
            this.Menu = this.mainMenu1;
            this.Name = "Form1";
            this.Text = "ControlRoom";
            this.Closing += new System.ComponentModel.CancelEventHandler(this.Form1_Closing);
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.Button btnCreate;
        private System.Windows.Forms.Button btnDialGate;
        private System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.TextBox textBox2;
        private System.Windows.Forms.Button btnCloseGate;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Button btnDestroy;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Werner Willemsens
Team Leader
Belgium Belgium
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150123.1 | Last Updated 17 Apr 2006
Article Copyright 2006 by Werner Willemsens
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid