【发布时间】:2010-09-01 19:33:34
【问题描述】:
关于现在已修复的my previous problem,我在 //code here 部分遇到了另一个问题:/
foreach (ManagementObject obj in ObjSearcher.Get())
{
ManagementBaseObject inputArgs = obj.GetMethodParameters("CopyEx");
inputArgs["FileName"] = "\\c:\\1stuff";
inputArgs["Recursive"] = true;
ManagementBaseObject outParams = obj.InvokeMethod("CopyEx", inputArgs, null);
uint ret = (uint)(outParams.Properties["ReturnValue"].Value);
}
我不断得到返回值 9,即“无效名称”。 我不知道什么名字无效,也不知道如何修复它。两个文件夹都存在。
【问题讨论】:
-
文件名中前导反斜杠 ("\\") 的用途是什么?这是无效的。