Hi :-)
Did ever anybody have problems registering the MSCECOMM.DLL on a pocket pc?
Neither regsvr2.exe will do it for me nor *.dll imports, that is to say: My
program executes the DllRegisterServer() method, but does not give me the
opportunity to set the progID to "CECOMM.Comm.1" afterwards, although this
is for sure the correct progID.
Here is some code:
using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Data;
using Odyssey.CFCOM;
using System.Runtime.InteropServices;
namespace SmartDeviceApplication3
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private ComControl o = new ComControl();
public Form1()
{
Console.WriteLine("Its still running");
o.ProgID = null;
Console.WriteLine("still running perfectly");
o.ProgID = "CECOMM.Comm.1";
Console.WriteLine("exception is thrown");
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
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.Text = "Form1";
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[DllImport("MSCEComm.dll", EntryPoint="DllRegisterServer")]
private static extern void DllRegisterServer();
static void Main()
{
ComObject.AddLicense("correct license here");
DllRegisterServer();
Application.Run(new Form1());
}
}
}