Mobile Apps - Handles under CE6.0R2

Asked By Rob
20-Nov-09 09:45 AM
Hi,
one of our applications seems to be running out of handles under CE6.0R2.
From Handle.c (kernel) we get : ">>>>> Completely Out Of Handles <<<<<\r\n"

Questions:
- Is there an API or other way to get the currently used (of total
available) handles for the process ?, I did not find one sofar....

- The same application under XP does NOT consume too much handles (just 100
or so), is this a known issue/difference ?

Kind Regards,
Rob.
www.robtso.nl
XP
(1)
EMVP
(1)
CreateEvent
(1)
OpenEvent
(1)
YPB.eto
(1)
Closehandle
(1)
Donot
(1)
Hypertminal
(1)
  Dean Ramsier replied to Rob
20-Nov-09 04:10 PM
No such API that I am familiar with; the expectation would be that you do not
run out of handles.  How many handles do you expect to be using? 100?

Are you possibly creating transient objects and not closing the handle when
done with them?

--
Dean Ramsier - eMVP
BSQUARE Corporation
  Rob replied to Dean Ramsier
21-Nov-09 02:30 PM
Our software needs about 120 handles normally.
Even that number is quite high i think (threads,fonts,brushes,windows etc...).
We are still searching for the cause of the handles running out.

One thing I tried is to put a retailmsg in handle.c, where the "completely
out of handles" error is given, and run a release version booting it from PB.
The handles seem to be given out in some 2-stage structure which i havent
quite figured out yet, but it looks like there are 127 * 512 handles to be
used, is that right ? (1st stage counter goes from 512 to zero, then back to
512 and the second-stage counter is decreased)

Are there any known HANDLE-API's that require Closehandle under CE, but
Donot require that nunder XP ? (so a difference in handle-behaviour CE/XP)

Kind regards,
Rob.
www.robtso.nl
  mike replied to Rob
02-Dec-09 07:34 PM
...).
y
PB.
e
to
)
on't
when
0R2.
st

---------------------------------------------------------------------------=
-----------
Hello Rob,

You are create too many handles, but never release them. So, in your
app, you may call "CreateEvent" "OpenEvent", and open GDI graphic that
requires open handle. When you are done, you need to call CloseHandle
(...) to close it out. You do have handle leakage even you are using
C# and manage codes.

To debug this, you need to sprinkles RETAILMSG or debug inside your
app. Using hypertminal, you can log debug messages. Run your
application over night, then you may see execution patterns. You then
narrow down your bad codes.

Good luck debugging. I done this before and it not fun.

Mike
http://www.itxembedded.com
Create New Account
help
WinCE 6.0 works? Or doesn't? This seems different that how SetEvent works on XP / Vista. WindowsCE Embedded Discussions WinCE (1) Vista (1) XP (1) GetTickCount (1) GuruCE (1) EMVP (1) HPrevInstance (1) CreateThread (1) No, SetEvent will return immediately, but the state of an no threads are waiting, the event object's state remains signaled. Good luck, Michel Verhagen, eMVP Check out my blog: http: / / GuruCE.com / blog GuruCE Ltd. Microsoft Embedded Partner http: / / GuruCE return 0; } int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { HANDLE hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); HANDLE hThread = CreateThread(NULL, 0, Test, (LPVOID)hEvent, 0, NULL); Sleep has it's thread quantum set to 0 (run to completion). Good luck, Michel Verhagen, eMVP Check out my blog: http: / / GuruCE.com / blog GuruCE Ltd. Microsoft Embedded Partner http: / / GuruCE.com Consultancy, training and development services. On May 21, 3:50 = A0am, "Michel Verhagen (eMVP)" <mic. . .@nospam.box> ckCount())); 0, NULL); t. - Hide quoted text - Okay, I figured out the
How to upgrade XP Pro to XP+Tablet? Mobile Apps I have a computer with Windows XP Professional installed. I recently board a SmartTech interactive whiteboard, which comes with some crummy software. I'd like to use the Windows XP Tablet software instead. How can I upgrade my Windows XP Pro to Windows XP Tablet Edition? I can't see any straightforward download on microsoft.com. If it's am an MSDN subscriber (through my university), so it seems I can download the Windows XP Tablet SDK. But I don't want an SDK, I just want the software. Thank you, Damon. Windows Tablet PC Discussions Windows XP (1) Windows Update (1) Vista (1) XP (1) SmartTech (1) GHz (1) EPO (1) ProtÃ
XP Tablet Compatibility Mobile Apps I am looking at getting an xp tablet device. I have a mobile scanner that is xp approved, but not xp tablet approved. The manufacturer will not tell me if the device will work as they have not "tested" it on XP table. Any thoughts out there if I should trust that the scanner will work or not? Thx. Windows Tablet PC Discussions Windows XP (1) XP (1) Jclieber (1) Tablet (1) Expertzone (1) Superset (1) Bits (1) Hid (1) There should has nothing to do with the pen input extensions. . . in general anything that works on XP should work on an XP tablet. There have been some reports of custom software that
Upgrade From XP Pro to XP Tablet Edition Mobile Apps If I have a tablet machine with XP Pro installed, and own a legitimate copy of XP Tablet Edition 2005, is there a way of installing the tablet features or "upgrading" to XP Tablet without wiping the disk and installing OS from scratch. I realise that a re which I won't go into!) involved in this case. Windows Tablet PC Discussions Windows XP (1) Outlook (1) Vista (1) XP (1) Enhancements (1) Newsbeitrag (1) Germany (1) Lenovo (1) Short answer. You can't. How did you come upon a legit copy of XP Tablet PC Edition? The only two legitimate ways of getting it are with the purchase