I haven't tried it as a service, though I have been using it for about 5 
months on a quiet workstation. I find if I don't get all of my processes running 
first, it will cause some of the processes (not all) to not start.  I have to stop my 
script and after everything is up and running, then
restart my script.  I sent messages requesting help, but never heard a word back. I 
continue to use, but must be wary.  I looked at Dave Roth's Change script, but seemed 
like more work than necessary for looking at files which change.

        Just some FYI.

Wags ;)

-----Original Message-----
From: Lewis, Alvin [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 06:50
To: '[EMAIL PROTECTED]'
Subject: Win32::AdvNotify as a Service


Hi,

Has anyone tried coding from Amine's Win32::AdvNotify extension into a WinNT service?
I have been playing with this module (V1.31) and have been unable to get it to work as 
a service.  My script runs fine  from a command console but hangs when I try to 
install 
it as a service using Dave Roth's Win32::Daemon extension.  The offending line seems 
to be the
thread creation:

my $thread1 = $WatchDir->StartThread(Directory   => "f:\\atlasdata\\",  
                                    Filter       =>  DIR_NAME|FILE_NAME,
                                    WatchSubtree =>  Yes ) ;


I'm using ActiveState build 626
Win32::api version 0.01
Win32::daemon version 0.2002.01.15

I'm using a very simple script (provided by Dave Roth) to install a service 
and I added these lines at the top:

# -------------------------------------------------#

use vars qw( $VERSION );
use Getopt::Long;
use File::Path;
use Win32;
use Win32::Daemon;
#use Win32::ChangeNotify;
use WIN32::NetResource;
use Win32::Perms;
use Win32API::File 0.08 qw( :Func );

use Win32::AdvNotify qw(FILE_NAME DIR_NAME LAST_WRITE INFINITE Yes No All 
                        %ActionName %ActionColor %EventName);

my $WatchDir = new Win32::AdvNotify;


my $thread1 = $WatchDir->StartThread(Directory   => "c:\\temp",  
                                    Filter       =>  DIR_NAME|FILE_NAME,
                                    WatchSubtree =>  Yes ) ;


# -------------------------------------------------#

The service starts OK when they are commented out but hangs with:

'Error 2186: The service is not responding to the control function'

when they are put back in!

Is there some reason your module can't work from a service?

Any suggestion would be greatly appreciated.

Cheers,
Al Lewis
PPG Industries
Lake Charles, LA  

337-708-4768


_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to