本文整理汇总了C#中SHFILEOPSTRUCT.CopyFrom方法的典型用法代码示例。如果您正苦于以下问题:C# SHFILEOPSTRUCT.CopyFrom方法的具体用法?C# SHFILEOPSTRUCT.CopyFrom怎么用?C# SHFILEOPSTRUCT.CopyFrom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SHFILEOPSTRUCT
的用法示例。
在下文中一共展示了SHFILEOPSTRUCT.CopyFrom方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SHFileOperation
// this function needs to carry out the specified operation. This
// parameter must contain a valid value that is not NULL. You are
// responsibile for validating the value. If you do not validate it,
// you will experience unexpected results.
public static Int32 SHFileOperation(ref SHFILEOPSTRUCT lpFileOp)
{
MachineType mt = GetMachineType();
Int32 result;
switch (mt)
{
case MachineType.win32:
SHFILEOPSTRUCT32 fos32 = new SHFILEOPSTRUCT32(lpFileOp);
result = SHFileOperation32(ref fos32);
lpFileOp.CopyFrom(fos32);
break;
case MachineType.win64:
SHFILEOPSTRUCT64 fos64 = new SHFILEOPSTRUCT64(lpFileOp);
result = SHFileOperation64(ref fos64);
lpFileOp.CopyFrom(fos64);
break;
default:
throw new ArgumentException("Hell, what kind of computer are you using? It's not 32 and not 64 bit");
}
return result;
}