从 .NET C# DLL 更新 MFC 对话框中的进度条

Updating progress bar in MFC dialog from .NET C# DLL

我看过这个article,但我需要相反的东西,但发现它很混乱。

我有一个 C# DLL 正在执行一项使用互操作自动化 Outlook 的冗长任务。

此 DLL 方法是从我在 MFC 中的 CDialog 函数调用的。

我的对话框有一个进度条控件。是否可以从 .NET DLL 更新对话框中的进度条?

我的问题有道理吗?

文章 Calling an Exported Function in an EXE from Within a DLL 将帮助您仅从 dll 调用 exe 函数。

但是,您可以创建 named mutex, to sync process or dll progress. named mutex can be accessible from C++ as well as C#. Creating named Mutex in c# exe and Accessing it a dll in c++