[英]C# exe not working on target platform x86
so, I'm trying to log accesses to my shared files on the network (I'm modifying Abdollah Zawari's ShareMoniter ), i do this by starting openfiles.exe like so: 因此,我试图记录对网络上共享文件的访问(我正在修改Abdollah Zawari的ShareMoniter ),我可以这样启动openfiles.exe来做到这一点:
var process = new Process();
process.StartInfo.FileName = "openfiles.exe";
process.StartInfo.Arguments = "/query /FO CSV /v";
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.RedirectStandardOutput = true;
try
{
process.Start();
if ((process.StandardOutput != null))
{
var result = process.StandardOutput.ReadToEnd().Trim().Replace("\"", "");
var lines = result.Split('\n');...
I want to log the results in an Access database, but jet.Oledb.4.0 or ace.oledb.12.0 only work when I set the project's target platform to x86. 我想将结果记录在Access数据库中,但是jet.Oledb.4.0或ace.oledb.12.0仅在将项目的目标平台设置为x86时才起作用。
problem is, openfiles.exe doesn't return anything when i run the project for x86 (openfiles.exe starts and ends with no apparent error, but an empty string "" is returned) 问题是,当我为x86运行项目时,openfiles.exe不会返回任何内容(openfiles.exe的开始和结束都没有明显的错误,但返回的是空字符串“”)
I'm very much a newbie, especially in these fields, so any advice on the matter would be greatly appreciated 我是一个新手,尤其是在这些领域,所以对此事的任何建议将不胜感激
thanks in advence 提前感谢
The version of the Oledb you are using does not support 64bit, you need to use a newer version that works on both 32 & 64 bit. 您使用的Oledb版本不支持64位,您需要使用在32位和64位版本上均可使用的较新版本。 Use the Microsoft Access Database Engine 2010 instead to access the database and things will be fine.
而是使用Microsoft Access数据库引擎2010来访问数据库,一切都会好起来的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.