Is there any way to share a mutex between a UWP app and a desktop bridge app in the same package? They seem to have different namespaces; using the same name doesn't yield the same object between the processes. The UWP app's objects are, according to WinObj
, stored in a special namespace under AppContainerNamedObjects\{APP_SID}
rather than under BaseNamedObjects
like usual. However, the desktop app - despite running from the same app bundle - does use the BaseNamedObjects
namespace, and consequently the two processes can't share synchronization objects.
Is there any way around this? The best I've thought of involves silly things like checking for files to exist or not, but this is both overly complicated and underperformant. Mutexes are simple, fast, and designed for exactly this use case (synchronization across processes); can they just not be used here?