C#从PC应用程序获取Pocket PC文件版本信息 [英] C# Get Pocket PC file version info from a PC application

查看:129
本文介绍了C#从PC应用程序获取Pocket PC文件版本信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力寻找一种方法来将exe的文件版本信息从Pocket PC(运行Compact Framework 1.0)传输到PC应用程序(在VS2008中开发,C#).

在PPC上,我使用以下命令:
System.Reflection.Assembly.GetExecutingAssembly().GetName.Version

获取版本字符串.我正在尝试从PC上的应用程序检索此字符串,该应用程序使用RAPI调用在其中传输一些文件.

但是,在将文件从Pocket PC传输到PC之前,我希望PC上的应用程序检查Pocket PC上的可执行文件的版本号.

到目前为止,我发现的所有示例都是针对C ++的,并使用GetFileVersionInfo()VerQueryValue().

不确定如何在C#中执行此操作.

有没有办法可以从PC使用RAPI.Invoke()在Pocket PC上调用System.Reflection.Assembly.GetExecutingAssembly().GetName.Version?

I''ve been struggling to find a way to get an exe''s file version info from a Pocket PC (running Compact Framework 1.0) to a PC application (developed in VS2008, C#).

On the PPC I use the following:
System.Reflection.Assembly.GetExecutingAssembly().GetName.Version

to get the version string. I''m trying to retrieve this string from an application on the PC which transfers some files across using RAPI calls.

However, before the files are transferred from the Pocket PC to the PC, I''d like the application on the PC to check the version number of an executable on the Pocket PC.

All examples I''ve found so far are for C++ and use GetFileVersionInfo() and VerQueryValue().

Not sure how to do this in C#.

Is there a way I can use RAPI.Invoke() from the PC to call System.Reflection.Assembly.GetExecutingAssembly().GetName.Version on the Pocket PC?

推荐答案

您是否尝试过FileVersionInfo.GetVersionInfo("exefilename) [

您是否尝试过 FileVersionInfo.GetVersionInfo("exefilename") [ ^ ]?


您好,亨利,谢谢您的答复.

对不起,如果我没有说清楚.我想从PC调用一种方法,以在Pocket PC与ActiveSync停靠并连接时查询它.

因此,从PC上查询Pocket PC并在Pocket PC上获取exe文件的版本.

本质上,我有一个从Pocket PC复制文件的实用程序,但是在复制这些文件之前,我想从PC上的实用程序检查Pocket PC上exe的版本.
Hi Henry, thanks for the reply.

Sorry if I didn''t make myself clear. I want to call a method from the PC to query the Pocket PC while it is docked and connected with ActiveSync.

So, from the PC, query the Pocket PC and get the version of an exe file on the Pocket PC.

Essentially, I have a utility program that copies files from the Pocket PC, but before I copy these files, I want to check the version of the exe on the Pocket PC from the utility program on the PC.


这篇关于C#从PC应用程序获取Pocket PC文件版本信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆