I'm glad you figured that out. The documentation you linked says that CreateSemaphore is not available to Metro style apps ("The topic you requested is shown below. This topic is not, however, included in this library.") and I don't see it listed in
Win32 and COM for Metro style apps list. Was there another link to it that we need to fix or is the not included notation confusing?