2011-07-04 20:41 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbwin/tests/testsvc.prg
+ added comment about 'S' internal parameter
+ added textual error messages
This commit is contained in:
@@ -16,6 +16,11 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2011-07-04 20:41 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbwin/tests/testsvc.prg
|
||||
+ added comment about 'S' internal parameter
|
||||
+ added textual error messages
|
||||
|
||||
2011-07-01 20:03 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* examples/gtwvw/gtwvw.c
|
||||
! fixed display problem when using browse in wvwtest9 sample.
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
#define _SERVICE_NAME "Harbour_Test_Service"
|
||||
|
||||
PROCEDURE Main( cMode )
|
||||
LOCAL nError
|
||||
LOCAL cMsg
|
||||
|
||||
DEFAULT cMode TO "S" /* NOTE: Must be the default action */
|
||||
|
||||
@@ -66,7 +68,10 @@ PROCEDURE Main( cMode )
|
||||
IF win_serviceInstall( _SERVICE_NAME, "Harbour Windows Test Service" )
|
||||
? "Service has been successfully installed"
|
||||
ELSE
|
||||
? "Error installing service: " + hb_ntos( wapi_GetLastError() )
|
||||
nError := wapi_GetLastError()
|
||||
cMsg := Space( 128 )
|
||||
wapi_FormatMessage( ,,,, @cMsg )
|
||||
? "Error installing service: " + hb_ntos( nError ) + " " + cMsg
|
||||
ENDIf
|
||||
EXIT
|
||||
|
||||
@@ -75,16 +80,25 @@ PROCEDURE Main( cMode )
|
||||
IF win_serviceDelete( _SERVICE_NAME )
|
||||
? "Service has been deleted"
|
||||
ELSE
|
||||
? "Error deleting service: " + hb_ntos( wapi_GetLastError() )
|
||||
nError := wapi_GetLastError()
|
||||
cMsg := Space( 128 )
|
||||
wapi_FormatMessage( ,,,, @cMsg )
|
||||
? "Error deleting service: " + hb_ntos( nError ) + " " + cMsg
|
||||
ENDIf
|
||||
EXIT
|
||||
|
||||
CASE "S"
|
||||
|
||||
/* NOTE: Used when starting up as service.
|
||||
Do not invoke the executable manually with this option */
|
||||
|
||||
IF win_serviceStart( _SERVICE_NAME, @SrvMain() )
|
||||
? "Service has started OK"
|
||||
ELSE
|
||||
? "Service has had some problems: " + hb_ntos( wapi_GetLastError() )
|
||||
nError := wapi_GetLastError()
|
||||
cMsg := Space( 128 )
|
||||
wapi_FormatMessage( ,,,, @cMsg )
|
||||
? "Service has had some problems: " + hb_ntos( nError ) + " " + cMsg
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user