Windows doesn't have any drop-in cross-process data locking thing. Fortunately some MS dude wrote a cool bit of free code : Metered Sections
There is one bad thing about the Metered Section code as is, which is that the Open and Close use malloc and free which is not safe to call inside DllMain. My preferred fix to that is to expose the in-place Init() and Delete() analogous to Critical Sections, so that you can just have a Metered Section structure in a static variable and initialize it in place with no allocs. If you wanted them to be safe & dynamic you'd have to use TlsAlloc or something.