banduwgs has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

I wrote advNotify install problem on advNotify for Win98. I could sort it out.

Now when I run following code:

use strict; use Win32::AdvNotify qw (Yes No All %ActionName); my $obj = new Win32::AdvNotify() or die ("Can't create AdvNotify objec +t"); my $folder = "c:\\"; (my $thread=$obj->StartThread(Directory=>$folder,Filter=>All,WatchSubt +ree=>Yes)) or die ("Can't start thread.");

It gives following error:

Can't start thread. at test_advnotify.pl line 5, <DATA> line 164.

What might be the problem here?

Thanks in advance - SB

Replies are listed 'Best First'.
Re: advNotify for Win98 - 2
by BrowserUk (Patriarch) on Sep 29, 2003 at 14:05 UTC

    To try and get a little more information you could try looking at $^E (See perlvar:Error Indicators) and also, try printing out the modules idea of the last error using it's built-in LastError method. eg.

    ... or die( "Can't start thread:$^E\n", $obj->LastError );

    I'm not at all sure that Win32::AdvNotify will ever work under '98. Looking at AdvNotify.dll, it imports a whole raft of native apis, Early version of the Win32s (as used on 98) fell woefully short of a full API set, though I think they did improve this somewhat in later versions, but I have no real knowledge of that.

    You could try going through the MS online docs and try and verify that all of the api's imported by AdvNotify.dll were available on your verion of '98, (I could supply the list for you), but that still doesn't guarentee that they use the same parameters on '98 as they do on NT, or that AdvNotify takes any differences into account.

    Sorry I can't suggest a better approach, but I don't have '98 to try and reproduce your problem.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
    If I understand your problem, I can solve it! Of course, the same can be said for you.

Re: advNotify for Win98 - 2
by Anonymous Monk on Sep 29, 2003 at 11:13 UTC
    Where does Win32::AdvNotify store the error message? $!?
      Both $! and $@ are empty!
Re: advNotify for Win98 - 2
by jacques (Priest) on Sep 30, 2003 at 00:58 UTC
    There are a lot of people who still use 98, even for software development. This fact amazes me, but then again, there are whole organizations that still rely on Perl 4. . . . We live in a slightly mad world.

      That's an important fact. Its worth to make sure all software outcomes work across all platforms as much as possible. In this case windows 98 is very important since it is widly used in most of organisations yet - SB