Working with device emulator

Jul 10, 2009 at 7:01 PM

Hi, guys :D

Does this library work with device emulator or do i need to attach a real device to the PC? i successfully built the library, added the reference to another project, "imported" tha namespace (using OpenNETCF.Desktop.Communication;) and tried to copy a file from the (emulated) device, no exceptions but no copy. I'll show you what i'm doing, maybe the RAPI works with the emulator and i'm just doing something wrong.

 

first approach:

using (RAPI rapi = new RAPI())

{

     rapi.Connect(true);

     rapi.CopyFileFromDevice(@"C:\test.txt", @"\test.txt");

     rapi.Disconnect();

}

also tried @"My Device\test.txt" without success

 

second approach:

private void copy_file()

{

    rapi.CopyFileFromDevice(@"C:\test.txt", @"\test.txt");

     rapi.Disconnect();

}

rapi.RAPIConnected += copy_file;

rapi.Connect(True);

 

 

i'll appreciate your help.

 

Coordinator
Jul 16, 2009 at 5:45 AM

I've not actually tested it, but theoretically it should work fine with the emulator.  It would require that you use the Emulator Manager to "dock" the emulator, which would in turn cause ActiveSync to connect with the virtual device.  At that point RAPI wouldn't know it's not a real, physical device.

Oct 2, 2009 at 4:41 PM

i use emulators all the time (ppc2003, windows mobile 5, windows mobile 6) - and yes, it works.  as stated above, it must be "virtually docked".