"CreateSemaphore"找不到标识符 [英] "CreateSemaphore" identifier not found

查看:135
本文介绍了"CreateSemaphore"找不到标识符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我正在使用信号量.并且我编写了以下代码来创建信号量

hello,

I am using semaphore. and i have written following code to create semaphore

HANDLE m_deviceStatusChanged;
m_deviceStatusChanged = ::CreateSemaphore(NULL,0,256,NULL);


构建项目时出现以下错误


Following errors are coming while building the project

1) missing ';' before identifier 'm_deviceStatusChanged';
2) "CreateSemaphore" is not a member of "global namespace"
3) "CreateSemaphore" identifier not found

推荐答案

查看链接,检查是否包含头文件.
http://msdn.microsoft.com/en-us/library/aa911525.aspx [ ^ ]
http://msdn.microsoft.com/en-us/library/ms686946 (v = VS.85).aspx [
See the links, check if you have included header file.
http://msdn.microsoft.com/en-us/library/aa911525.aspx[^]
http://msdn.microsoft.com/en-us/library/ms686946(v=VS.85).aspx[^]


这篇关于"CreateSemaphore"找不到标识符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆