读书人

Pocket PC与PC之间复制文件用C#怎么实

发布时间: 2012-01-13 22:43:30 作者: rapoo

Pocket PC与PC之间复制文件用C#如何实现
如题。

用 VS2005.net C#编写一段程序在PC上运行,负责从PC到Pocket PC和 Pocket PC到PC.

//代码如下:
[DllImport( "rapi.dll ", CharSet = CharSet.Auto)]
static extern unsafe System.IntPtr CeCreateFile(
string FileName, // file name
uint DesiredAccess, // access mode
uint ShareMode, // share mode
uint SecurityAttributes, // Security Attributes
uint CreationDisposition, // how to create
uint FlagsAndAttributes, // file attributes
int hTemplateFile // handle to template file
);

const uint GENERIC_READ = 0x80000000;
const uint OPEN_EXISTING = 3;

handle = CeCreateFile(existingFileName, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0);

提示错误信息:
FatalExcutionEngineError was deteted
Get information about MDAs

不知道如何解决?

[解决办法]
我来帮顶了
[解决办法]
不懂 友情UP

读书人网 >C#

热点推荐