Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

If you'd rather or need to build this yourself, the follow patches and makefile allow that using AS1000 and MSVC v6.0

Patch (For application to the sourcecode from backpan)

Note: The download link from Win32::Daemon is broken. It's for a completely different package (Win32::Scheduler)??

diff -iwbur Win32-Daemon\daemon.cpp Win32-Daemon-510\daemon.cpp --- Win32-Daemon\daemon.cpp Sun Mar 19 14:14:52 2000 +++ Win32-Daemon-510\daemon.cpp Tue Mar 25 00:42:14 2008 @@ -102,7 +102,7 @@ croak( "Usage: " EXTENSION "::Constant( $Name, $Arg )\n" ); } - pszName = (char*) SvPV( ST( 0 ), na ); + pszName = (char*) SvPVX( ST( 0 ) ); eResult = Constant( pszName, &pBuffer ); switch( eResult ) @@ -287,7 +287,7 @@ croak( "Usage: " EXTENSION "::DeleteService( $ServiceName )\n +" ); } - if( NULL != ( pszServiceName = SvPV( ST( 0 ), na ) ) ) + if( NULL != ( pszServiceName = SvPVX( ST( 0 ) ) ) ) { SC_HANDLE hSc = OpenSCManager( NULL, NULL, SC_MANAGER_ALL_ACC +ESS ); if( NULL != hSc ) @@ -332,7 +332,7 @@ if( 2 == items ) { - hService = SvIV( ST( 1 ) ); + hService = (SERVICE_STATUS_HANDLE) SvIV( ST( 1 ) ); } if( NULL != hService ) @@ -414,11 +414,11 @@ if( items ) { - pszWindowStation = SvPV( ST( 0 ), na ); + pszWindowStation = SvPVX( ST( 0 ) ); } if( 1 < items ) { - pszDesktop = SvPV( ST( 0 ), na ); + pszDesktop = SvPVX( ST( 0 ) ); } // Free your mind...and the current console. :) @@ -533,7 +533,7 @@ newXS( EXTENSION "::Timeout", XS_WIN32__Daemon_Timeout, + file ); newXS( EXTENSION "::GetServiceHandle", XS_WIN32__Daemon_GetServi +ceHandle, file ); - ST(0) = &sv_yes; + ST(0) = &PL_sv_yes; XSRETURN( retcode ); } diff -iwbur Win32-Daemon\test\TEST.PL Win32-Daemon-510\test\TEST.PL --- Win32-Daemon\test\TEST.PL Tue Jan 25 08:26:56 2000 +++ Win32-Daemon-510\test\TEST.PL Tue Mar 25 02:24:24 2008 @@ -1,4 +1,4 @@ -use Win32::Service::Daemon; +use Win32::Daemon; %Hash = ( name => 'PerlTest', @@ -8,7 +8,7 @@ pwd => '', ); -if( Win32::Service::Daemon::CreateService( \%Hash ) ) +if( Win32::Daemon::CreateService( \%Hash ) ) { print "Successfully added.\n"; } diff -iwbur Win32-Daemon\Win32Perl.h Win32-Daemon-510\Win32Perl.h --- Win32-Daemon\Win32Perl.h Sun Dec 12 17:21:48 1999 +++ Win32-Daemon-510\Win32Perl.h Tue Mar 25 00:45:20 2008 @@ -326,9 +326,10 @@ inline LPTSTR HashGetPV( PERL_OBJECT_PROTO HV *pHv, LPTSTR pszKey +Name ) { SV *pSv = HashGetSV( PERL_OBJECT_ARGS pHv, pszKeyName ); + if( NULL != pSv ) { - return( SvPV( pSv, na ) ); + return( SvPVX( pSv ) ); } else {

makefile

# makefile for Win23::Daemon (perl v510) # Derived manually by BrowserUk PERLLIB = c:\perl510\lib\CORE\perl510.lib SYSTEMLIBS = c:\cl\lib\User32.Lib c:\cl\lib\AdvAPI32.Lib INCLUDES = -I"c:\cl\include" -I"c:\perl510\lib\CORE" .cpp.obj : cl -c $(INCLUDES) $< Daemon.dll : Daemon.cpp CONSTANT.obj CWinStation.obj ServiceThread.obj + daemon.def cl -MT -LD -DWIN32 $(INCLUDES) $** $(PERLLIB) $(SYSTEMLIBS) /link + /NODEFAULTLIB:libc ServiceThread.obj : ServiceThread.cpp cl -c -EHsc $(INCLUDES) $?

You'll need to copy Daemon.PM and Daemon.dll into appropriate places manually. Someone else will have to work out how to get EU::MM to produce a suitable makefile.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re: Win32::Daemon with 5.10. by BrowserUk
in thread Win32::Daemon with 5.10. by fenLisesi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-03-29 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found