自分用メモ:
CreateSemaphore/CreateFileMapping/CreateNamedPipeのセキュリティー権限設定
PSECURITY_DESCRIPTOR pd;
SECURITY_ATTRIBUTES sa;
pd = (PSECURITY_DESCRIPTOR) malloc( SECURITY_DESCRIPTOR_MIN_LENGTH );
InitializeSecurityDescriptor(pd, SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorDacl(pd, TRUE, (PACL) NULL, FALSE);
sa.nLength = sizeof( SECURITY_ATTRIBUTES );
sa.lpSecurityDescriptor = pd;
sa.bInheritHandle = TRUE;
HANDLE se = CreateSemaphore( &sa, 1, 1, SEMAP_NAME);