我在sharepoint事件接收器中有以下代码,用于将.oft文件复制到文档库中并将其粘贴到新目标(另一个文档库)中: -
SPDocumentLibrary template = (SPDocumentLibrary)properties.Web.GetList(properties.Web.ServerRelativeUrl + "/Templates/");
SPListItem templetefile = null;
foreach (SPListItem i in template.Items)
{
if (i.Name.ToLower().Contains("project"))
{
templetefile = i;
}
}
byte[] fileBytes = templetefile.File.OpenBinary();
string destUrl = properties.Web.ServerRelativeUrl + "/" + projectid.RootFolder.Url +".oft";
SPFile destFile = projectid.RootFolder.Files.Add(destUrl, fileBytes, false);
Run Code Online (Sandbox Code Playgroud)
现在我的代码运行良好.但我不确定我是否可以在复制后访问.OFT文件,并修改其主题(按主题我的意思是我的电子邮件主题)?
用一些其他字节序列(例如90)替换一个字节序列(例如67 67 67)的最有效方法是什么.序列可以具有不同的长度.
我想覆盖 exe 中的字节。
所以我需要生成一个随机字符串,将其转换,然后将其写入exe。
我需要以这种格式覆盖你在那里看到的 4 个十六进制字符串 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (8-4-4-4-12) 需要破折号,所以这对我来说也是一个问题。
这是第一个字符串的位置。


我完全不知道如何开始这个,我如何用随机字符串以正确的格式覆盖这 4 个字符串(十六进制,所以随机只能是 0123456789abcdef)
任何帮助深表感谢。