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.
|