Shared memory
-
I have an application in MFC which creates shared memory using CreateFileMapping where I share a Struct object. In another console application in C++, I am accessing the shared memory using OpenFileMapping function and so the struct object is changed/accessed in both the applications. Now, I want to redevelop my MFC Application in WPF C#. Is it possible to share the memory with the same console application as I have done earlier in MFC. Please advise
-
I have an application in MFC which creates shared memory using CreateFileMapping where I share a Struct object. In another console application in C++, I am accessing the shared memory using OpenFileMapping function and so the struct object is changed/accessed in both the applications. Now, I want to redevelop my MFC Application in WPF C#. Is it possible to share the memory with the same console application as I have done earlier in MFC. Please advise
I know that the latest .Net frameworks offer classes for file mapping. Search "C# File mapping"
The difficult we do right away... ...the impossible takes slightly longer.
-
I have an application in MFC which creates shared memory using CreateFileMapping where I share a Struct object. In another console application in C++, I am accessing the shared memory using OpenFileMapping function and so the struct object is changed/accessed in both the applications. Now, I want to redevelop my MFC Application in WPF C#. Is it possible to share the memory with the same console application as I have done earlier in MFC. Please advise
Memory-mapped files have been supported in .NET Framework since 4.0: Memory-Mapped Files | Microsoft Docs[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
I know that the latest .Net frameworks offer classes for file mapping. Search "C# File mapping"
The difficult we do right away... ...the impossible takes slightly longer.
Is it possible that the 2 applications that share the memory (File mapping) be developed in C# and C++ respectively. Example: One application in C# to create shared memory Other application 2 in C++ opens and shares the memory file mapping.