HI i am writing a service in wince. In the service i need to create a window. For creating window i need HINSTANCE. I can't get HINSTACE from DllMain> so How can i get the instance of the service?
A:
Since you are not specifying the version of Windows CE you are using I will answer to the version I am familiar with - Windows CE 6.
In Windows CE 6 you need to use the UIProxy to display a window in the driver code. Since a service is very similar to a driver I guess that the same method needs to be applied. (I have not tried this though).
Read Bruce Eitman's blog about the UI Proxy to see how to do it: UI Proxy
Shaihi
2010-03-24 12:22:48