windows service can't access desktop UI

29 Views Asked by At

recently I made a service that get the current active window of the user for windows which uses GetForegroundWindow in user32.dll and it's perfectly working while running as a console application, but when I convert it to a service and install it in windows services, it can't get the window : Unable to enumerate the process modules How I can fix this?

0

There are 0 best solutions below