Dear maintainer,
Thank you very much for your answer. I changed the configuration settings
according to your advice (Control panel/Administrative tools/services/Log
on/Allow interaction with desktop), and my tool now runs perfectly fine!
Thank you very much for your fruitful help,
Best Regards,
Gwenaelle
On Mon, Jul 13, 2009 at 04:06:07AM -0400, KARASIK via RT wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=47815 >
>
> I cannot refer you to any documentation, but from my own experience I
> can only confirm that not only GetCursorPos and GetForegroundWindow, but
> practically all GUI-related win32 functions return null results when
> being run as services, while either configured not to have access to
> GUI, or when the user is logged out. Also, this is not a perl-related
> problem, the underlying API calls indeed return same values no matter
> whether being they are called from perl or C.
>
> I know though that it is possible to configure a service to have access
> to GUI (somewhere in service settings, on my win2k it is on "Control
> panel/Administrative tools/services/Log on/Allow interaction with
> desktop"). I'd expect that Win32::Daemon::CreateService provides that
> option, but I didn't find it in the Win32::Daemon docs. Sources mention
> though "service_interactive" option, but Win32::Daemon::Simple sources
> mention "interactive". Possibly it is a good idea to do one's own
> research here or talk to the Win32::Daemon author to clarify the
> matters... All in all, the problem area seems to be outside of
> Win32::GuiTest domain.