From d288ba10315fae0fe7e1b84be3d6984b37ec5422 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 15 May 2010 22:50:20 +0000 Subject: [PATCH] 2010-05-16 00:48 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbwin/win_srv.c * contrib/hbwin/tests/testsrv.prg * Cleaned list of header files. * Synced static string buffer sizes with allowed maximums and appropriate macro. --- harbour/ChangeLog | 9 +++++++++ harbour/contrib/hbwin/tests/testsrv.prg | 3 +-- harbour/contrib/hbwin/win_srv.c | 14 ++++++-------- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 67acf71e19..eaa6a25ffa 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,13 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-05-16 00:48 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbwin/win_srv.c + * contrib/hbwin/tests/testsrv.prg + * Cleaned list of header files. + * Synced static string buffer sizes with allowed maximums + and appropriate macro. + 2010-05-16 00:38 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbwin/win_srv.c * Renamed more variables. @@ -24,6 +31,8 @@ of freeing string pointers still assigned inside Windows structures. ! WIN_SERVICESTART() fixed to set last error. + ! Fixed to avoid passing NULL string pointers where Windows API + documentation doesn't allow it. * contrib/hbwin/tests/testsrv.prg ! Fixed to have the default action called diff --git a/harbour/contrib/hbwin/tests/testsrv.prg b/harbour/contrib/hbwin/tests/testsrv.prg index 7995469f83..12d408149a 100644 --- a/harbour/contrib/hbwin/tests/testsrv.prg +++ b/harbour/contrib/hbwin/tests/testsrv.prg @@ -4,7 +4,7 @@ /* * Harbour Project source code: - * Windows Service + * Windows Service API test code * * Copyright 2010 Jose Luis Capel - * www - http://www.harbour-project.org @@ -50,7 +50,6 @@ * */ -#include "hbtrace.ch" #include "hbwin.ch" #include "common.ch" diff --git a/harbour/contrib/hbwin/win_srv.c b/harbour/contrib/hbwin/win_srv.c index dd71c020af..c50b4545d5 100644 --- a/harbour/contrib/hbwin/win_srv.c +++ b/harbour/contrib/hbwin/win_srv.c @@ -4,7 +4,7 @@ /* * Harbour Project source code: - * Windows Service + * Windows Service API * * Copyright 2010 Jose Luis Capel - * www - http://www.harbour-project.org @@ -50,18 +50,16 @@ * */ -#include "hbapi.h" -#include "hbvm.h" -#include "hbwinuni.h" - #include "hbwapi.h" +#include "hbvm.h" + #if ! defined( HB_OS_WIN_CE ) static SERVICE_STATUS s_ServiceStatus; static SERVICE_STATUS_HANDLE s_hStatus; -static char s_szHarbourEntryFunc[ 64 ]; -static TCHAR s_lpServiceName[ 64 ]; +static char s_szHarbourEntryFunc[ HB_SYMBOL_NAME_LEN + 1 ]; +static TCHAR s_lpServiceName[ 256 ]; /* Control handler function */ static void hbwin_ControlHandler( DWORD request ) @@ -82,7 +80,7 @@ static void hbwin_ControlHandler( DWORD request ) SetServiceStatus( s_hStatus, &s_ServiceStatus ); /* Report current status */ } -static void hbwin_SrvFunction( int argc, char** argv ) +static void hbwin_SrvFunction( int argc, char ** argv ) { HB_SYMBOL_UNUSED( argc ); HB_SYMBOL_UNUSED( argv );