views:

31

answers:

1

In Windows CE it is a trivial thing to conditionally compile something if KITL is enabled:

#if IMGNOKITL == 1
DoSomething();
#else
DoSomethingElse();
#endif

But I need to produce a user mode application that detects at runtime if KITL is enabled or not. It is possible?

+1  A: 

I tried to look for such a function in Windows CE 6 and could not find anything. Why don't you add your own global variable to the OAL:

#ifdef IMGNOKITL
DWORD g_dwKitlEn = 1;
#else 
DWORD g_dwKitlEn = 0
#endif

And then add a kernel IOCTL that returns the value of that variable. That way when you move between Windows CE versions the method will still work for sure (as long as the IMGNOKITL variable does not change).

Shaihi
Actually this is also my workaround, but I hoped that someone else found a better solution! Thank you anyway!
Lorenzo