阅读:1253回复:2
wince里如何查询系统UI有没有起来?
我有个driver,里面需要等待UI起来,有没有什么API可以查询??
谢谢 |
|
沙发#
发布于:2007-11-24 14:41
IsAPIReady
|
|
板凳#
发布于:2007-11-24 16:04
谢谢wenzai兄提供思路;
typedef enum { APISTATE_UNKNOWN, APISTATE_NEVER, APISTATE_NOT_READY, APISTATE_READY } ApiState; #define EVENT_NAME TEXT("SYSTEM/GweApiSetReady") ApiState state = APISTATE_UNKNOWN; HANDLE hEvent; if (state == APISTATE_UNKNOWN) { hEvent = OpenEvent(EVENT_ALL_ACCESS, 0, EVENT_NAME); if (hEvent) { // Wait for the API set to be ready. WaitForSingleObject(hEvent, INFINITE); CloseHandle(hEvent); state = APISTATE_READY; } else { // The API set will never be ready. state = APISTATE_NEVER; } } if (state != APISTATE_READY) { RETAILMSG(1,(_T("Never waiting\r\n"))); while(1); } RETAILMSG(1,(_T("OK---------------->\r\n"))); |
|