【发布时间】:2017-10-21 22:09:29
【问题描述】:
我在 C++/CX 中使用 UWP API 中的 CreateFileAsync 方法时遇到问题。 这是我要执行的代码:
create_task(folder->CreateFileAsync(destination_file, Windows::Storage::CreationCollisionOption::OpenIfExists)).
then(
[this](StorageFile^ dest_file)
{
//do something here
});
CreateFileAsync 的调用似乎是成功的,因为我的文件是在正确的位置创建的。
但是,我的 lambda 函数 (//do something here) 中的代码永远不会执行。
谁能解释我做错了什么?
【问题讨论】: