Question

I am writing a test program to copy some file in Application data folder on device to release directory on desktop.

I am not sure how to access release dir on desktop?

Is there any shell command to do that?

Basically I want to write c++ program that will run on device to accomplish this task.

Was it helpful?

Solution 2

I found the solution

There is API called CoyFile that can copy to release dir.

CopyFile(Src file,Dest file,FALSE);

Destination file can be given as

ce::wstring = L"\release\foo.txt";

OTHER TIPS

This article gives a description of how to use RAPI to copy files from the WinCE device to your PC:

http://www.codeguru.com/cpp/w-p/ce/article.php/c3521

However, RAPI is something that only runs on the PC, so it won't work for your purposes.

There are a few ways to handle device-initiated communication like you want to do. In my world (.NET/C#) it is easy to set up a simple ASP.NET web service running on the PC and have the device talk to it (to upload a file the device would send the file as a byte array, and the web service would then save it to the desktop).

Since you're not using .NET, your best solution is probably FTP from the device. Here is an article that shows how to do it:

http://msdn.microsoft.com/en-us/library/ms901267.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top