locked
Windows Mobile MDM HHT application conversion from XP Active Synch to W7 Windows Mobile Device Center RRS feed

  • Question

  • Hello

    I desperately need some help and advice I am working on a in house Mobile device (Windows Mobile 5 and 6 devices) which has been working on XP since 2008 but does't work on Windows 7 and the reason for that is the OPENTCF.DesktopCommunication is based on activesynch.

    There was no source code available for the application however I was able to use JustComple to decode the MDM.exe the original code was was developed in VS2005 C# I have been able to compile and convert to a 2008 solution.  The application launches ok in W7 it is only when you try to communicate with a Windows Mobile device it throws the following error

    ************** Exception Text **************
    System.NotImplementedException: The method or operation is not implemented.
       at OpenNETCF.Desktop.Communication.IDccMan.ConnectNow()
       at OpenNETCF.Desktop.Communication.ActiveSync.ConnectNow()
       at MDM.Form1.bnConnect_Click(Object sender, EventArgs e)
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
    ----------------------------------------
    MDM
        Assembly Version: 2.2.2.0
        Win32 Version: 2.2.2
        CodeBase: file:///C:/Program%20Files%20(x86)/JLP/MDM/MDM.exe
    ----------------------------------------
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.5458 (Win7SP1GDR.050727-5400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    OpenNETCF.Desktop.Communication
        Assembly Version: 2.9.5125.34088
        Win32 Version: 2.9.5125.34088
        CodeBase: file:///C:/Program%20Files%20(x86)/JLP/MDM/OpenNETCF.Desktop.Communication.DLL
    ----------------------------------------
    System.DirectoryServices
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.DirectoryServices/2.0.0.0__b03f5f7f11d50a3a/System.DirectoryServices.dll
    ----------------------------------------
    System.Configuration
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

    I am very new to Visual Studio so my knowledge at the moment is limited I have been able to to view the source code and this is how the desktop communication is configured

    Form1.cs

    public Form1()
    {
    this.InitializeComponent();
    try
    {
    this.m_rapi = new RAPI();
    this.m_rapi.ActiveSync.ConnectAsGuestOnly = true;
    this.m_rapi.ActiveSync.AutoConnect = false;
    this.m_rapi.ActiveSync.Active += new ActiveHandler(this.ActiveSync_Active);
    this.m_rapi.ActiveSync.Disconnect += new DisconnectHandler(this.ActiveSync_Disconnect);
    this.m_rapi.ActiveSync.Listen += new ListenHandler(this.ActiveSync_Listen);
    this.m_rapi.ActiveSync.Answer += new AnswerHandler(this.ActiveSync_Answer);
    this.m_rapi.RAPIConnected += new RAPIConnectedHandler(this.m_rapi_RAPIConnected);
    this.m_rapi.RAPIDisconnected += new RAPIConnectedHandler(this.m_rapi_RAPIDisconnected);

    I know Windows 7 and WMDC uses RAPI.dll but can't figure how to implement this into the solution , the enviroment is Windows 7 x64 , MDM is a 32bit app

    Wednesday, February 12, 2014 4:13 PM