Abhishek Kondaveeti
Abhishek Kondaveeti

Reputation: 1

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?

Upvotes: 0

Views: 333

Answers (1)

Shaihi
Shaihi

Reputation: 3974

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

Upvotes: 0

Related Questions