Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 669525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:09:37+00:00 2026-05-14T00:09:37+00:00

I have a project in which I would need to copy files found within

  • 0

I have a project in which I would need to copy files found within a PDA (in my case, it’s a MC3000 if that makes any difference). I have ActiveSync installed and it create the syncronisation folder for me just fine. However, I would like to be able to read the content of the PDA not only in its MyDocument Folder so I can’t use this (Plus it have to work with 20+ possible PDA of the same model, thus making 20+ directory)

Is there a way to do some IO inside the PDA, while it is docked and sync with ActiveSync that is.

I can see the ‘Mobile Device’ in Explorer.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:09:38+00:00Added an answer on May 14, 2026 at 12:09 am

    Use RAPI. It’s a codeplex project that provides managed wrapper classes for Rapi.dll and ActiveSync. It lets desktop .NET apps communicate with tethered mobile devices. The wrapper originated within the OpenNetCF project, but is now managed separately.

    You can use the whole RAPI project DLL as it ships from that project, or just use the subset of code that you need. I needed to create files on the device when it connected, so I didn’t need the performance statistics stuff, or the device registry stuff that is included in Rapi. So I just grabbed the 3 source files I needed…

    The way it works for me, is this:

    • Use ActiveSync (DccManSink) to detect mobile device connection/disconnect status
    • Use the RAPI wrapper to copy files to the device, create files on the device, copy files from the device, and so on.

    private DccMan DeviceConnectionMgr;
    private int AdviceCode;
    private int ConnectionStatus = 1;
    private System.Threading.AutoResetEvent DeviceConnectionNotification = new System.Threading.AutoResetEvent(false);
    
    
    public void OnConnectionError()
    {
        ConnectionStatus = -1;
        DeviceConnectionNotification.Set();
    }
    
    public void OnIpAssigned(int address)
    {
        ConnectionStatus = 0;
        DeviceConnectionNotification.Set();
    }
    
    
    private void btnCopyToDevice_Click(object sender, EventArgs e)
    {
        // copy the database (in the form of an XML file) to the connected device
        Cursor.Current = Cursors.WaitCursor;
    
        // register for events and wait.
        this.DeviceConnectionMgr = new DccMan();
    
        DccManSink deviceEvents = new DccManSink();
        deviceEvents.IPChange += new IPAddrHandler(this.OnIpAssigned);
        deviceEvents.Error += new ErrorHandler(this.OnConnectionError);
        ((IDccMan)DeviceConnectionMgr).Advise(deviceEvents, out this.AdviceCode);
    
        // should do this asynchronously, with a timeout; too lazy.
        this.statusLabel.Text = "Waiting for a Windows Mobile device to connect....";
    
        this.Update();
        Application.DoEvents();  // allow the form to update
    
        bool exitSynchContextBeforeWait = false;
        DeviceConnectionNotification.WaitOne(SECONDS_TO_WAIT_FOR_DEVICE * 1000, exitSynchContextBeforeWait);
    
        if (ConnectionStatus == 0)
        {
            this.statusLabel.Text = "The Device is now connected.";
            this.Update();
            Application.DoEvents();  // allow the form to update
    
            RAPI deviceConnection = new RAPI();
            deviceConnection.Connect(true, 120);  // wait up to 2 minutes until connected
            if (deviceConnection.Connected)
            {
                this.statusLabel.Text = "Copying the database file to the connected Windows Mobile device.";
                this.Update();
                Application.DoEvents();  // allow the form to update
                string destPath = "\\Storage Card\\Application Data\\MyApp\\db.xml";
                deviceConnection.CopyFileToDevice(sourceFile,
                                                  destPath,
                                                  true);
    
                this.statusLabel.Text = "Successfully copied the file to the Windows Mobile device....";
            }
            else
            {
                this.statusLabel.Text = "Oh, wait, it seems the Windows Mobile device isn't really connected? Sorry.";
            }
    
        }
        else
        {
            this.statusLabel.Text = "Could not copy the file because the Device does not seem to be connected.";
        }
    
        Cursor.Current = Cursors.Default;
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On a small embedded system project we have some code which we would like
I have a .NET project which references another assembly that is built outside of
I am fairly new to MySQL and have a project in which I need
I have a project which is source controlled using Subversion and VisualSVN. Since the
I have C++ project (VS2005) which includes header file with version number in #define
I have a Rails project which I neglected to build tests for (for shame!)
I have a Rails project which has a Postgres database for the actual application
We have a git project which has quite a big history. Specifically, early in
I have a new project which simply put, is an attempt to formalize the
I have a Silverlight Project which passes data using the Data Contract to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.