- 积分
- 44
贡献41
飞刀0 FD
注册时间2012-3-29
在线时间19 小时
扫一扫,手机访问本帖
|
本帖最后由 long198715 于 2012-11-22 08:56 编辑
DWORD WINAPI Led1_Read_Thread (PVOID hdcMain) //读取线程
{
HWND hRead1;
DWORD result;
DWORD dwReturn = 0;
DWORD dwControlCode;
int iSize2,i;
//i=m_Edit_Read1;
hLed1ReadEvent = CreateEvent(NULL, TRUE, FALSE, _T("LED1_READ"));
while(1)
{
WaitForSingleObject(hLed1ReadEvent, INFINITE);//
dwControlCode = IOCTL_LED_LED1_READ ;
DeviceIoControl(hLed1,
dwControlCode,
&i,
1,
&result,
iSize2,
&dwReturn,
NULL);
hRead1=GetDlgItem(hwnd,IDC_EDIT_LED1R);
SetWindowText(hRead1,(LPCTSTR)i);
}
return 0;
}
写了以后不能在edit中显示读取数据不知道哪里出的问题?
|
|