views:

439

answers:

2

I am writing a test program to copy some file in Applicaiton 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.

A: 

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

MusiGenesis
A: 

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";

Alien01
That makes no sense. You can't copy from a device to a desktop machine with CopyFile - certainly not from an app running on the device, without some form of infrastructure behind it. CopyFile won't do it.
ctacke
This works man...check it out first....U need to specify destination driectory as \\Release\\Of course you need to be connected to the device..
Alien01
You should have been more clear in your original post that you were attached via KITL and had RELFSD installed in the image. Those are requisite for this to work and it will *only* work while that connection exists, meaning it's absolutely useless outside of the debug environment on your bench.
ctacke