作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在 Azure 存储中上传 blob,并且上传成功。现在,下一步是使用 C++ 代码处理 blob。由于Azure函数不支持C++,我如何处理blob?
最佳答案
Azure Function 支持运行 .exe
可执行文件。因此,我建议生成您的 cpp 程序 exe 文件,然后将其上传到 Azure Function 并运行以下示例代码。
using System;
public static void Run(TimerInfo myTimer, TraceWriter log)
{
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = @"D:\home\site\wwwroot\TimerTriggerCSharp1\testfunc.exe";
process.StartInfo.Arguments = "";
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.Start();
string output = process.StandardOutput.ReadToEnd();
string err = process.StandardError.ReadToEnd();
process.WaitForExit();
log.Info($"C# Timer trigger function executed at: {DateTime.Now}");
}
关于azure - 如何在 Azure 中使用事件网格触发 C++ 代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56428852/
我是一名优秀的程序员,十分优秀!