Monday, February 21, 2011

How to get instance of a service?

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?

From stackoverflow
  • 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

0 comments:

Post a Comment