2010-05-15 22:21 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* doc/howtosvn.txt
    * More clearing up.

  * contrib/hbwin/win_srv.c
    ! Fixed one TOFIX which was result of s&r on my part.
    ; TOFIX remaining:
      ---
      ../../../win_srv.c: In function 'hbwin_SrvFunction':
      ../../../win_srv.c:102:4: warning: passing argument 1 of 'RegisterServiceCtrlHandlerW' from incompatible pointer type
      f:\devl\mingw-450\bin\../lib/gcc/mingw32/4.5.0/../../../../include/winsvc.h:234:40: note: expected 'LPCWSTR' but argument is of type 'char *'
      ../../../win_srv.c: In function 'HB_FUN_WIN_SERVICESTART':
      ../../../win_srv.c:279:21: warning: assignment from incompatible pointer type
      ../../../win_srv.c:280:21: warning: assignment from incompatible pointer type
      ---
This commit is contained in:
Viktor Szakats
2010-05-15 20:21:32 +00:00
parent b3a0de3416
commit 7b9478df7e
3 changed files with 33 additions and 19 deletions

View File

@@ -17,6 +17,22 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-05-15 22:21 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* doc/howtosvn.txt
* More clearing up.
* contrib/hbwin/win_srv.c
! Fixed one TOFIX which was result of s&r on my part.
; TOFIX remaining:
---
../../../win_srv.c: In function 'hbwin_SrvFunction':
../../../win_srv.c:102:4: warning: passing argument 1 of 'RegisterServiceCtrlHandlerW' from incompatible pointer type
f:\devl\mingw-450\bin\../lib/gcc/mingw32/4.5.0/../../../../include/winsvc.h:234:40: note: expected 'LPCWSTR' but argument is of type 'char *'
../../../win_srv.c: In function 'HB_FUN_WIN_SERVICESTART':
../../../win_srv.c:279:21: warning: assignment from incompatible pointer type
../../../win_srv.c:280:21: warning: assignment from incompatible pointer type
---
2010-05-15 21:27 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* doc/howtosvn.txt
+ Made it more clear that 'Chr(36)' should be replaced by '$'.
@@ -46,9 +62,9 @@
! Added some casts.
% Variables declarations moved to inner scopes.
; TOFIX:
- UNICODE build problem in hbwin_SrvFunction().
- possible memory corruption in WIN_SERVICESTART()?
- 'implicit declaration of function 'Sets_ServiceStatus'' in hbwin_SrvFunction().
- UNICODE build problem in hbwin_SrvFunction(). [RELISTED]
- possible memory corruption in WIN_SERVICESTART()? [RELISTED]
- 'implicit declaration of function 'Sets_ServiceStatus'' in hbwin_SrvFunction(). [DONE]
; All the above are shown as mingw warnings.
2010-15-15 12:20 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

View File

@@ -83,7 +83,7 @@ static void hbwin_ControlHandler( DWORD request )
}
/* Report current status */
Sets_ServiceStatus( s_hStatus, &s_ServiceStatus );
SetServiceStatus( s_hStatus, &s_ServiceStatus );
}
static void hbwin_SrvFunction( int argc, char** argv )
@@ -101,17 +101,13 @@ static void hbwin_SrvFunction( int argc, char** argv )
s_hStatus = RegisterServiceCtrlHandler( s_pszSrvName, ( LPHANDLER_FUNCTION ) hbwin_ControlHandler );
if( s_hStatus == ( SERVICE_STATUS_HANDLE ) 0 )
{
HB_TRACE( HB_TR_DEBUG, ( "Error registering service\n" ) );
}
else
if( s_hStatus != ( SERVICE_STATUS_HANDLE ) 0 )
{
PHB_DYNS pDynSym = hb_dynsymFindName( s_pszPrgFunction );
/* We report the running status to SCM. */
s_ServiceStatus.dwCurrentState = SERVICE_RUNNING;
Sets_ServiceStatus( s_hStatus, &s_ServiceStatus );
SetServiceStatus( s_hStatus, &s_ServiceStatus );
if( pDynSym )
{
@@ -124,6 +120,10 @@ static void hbwin_SrvFunction( int argc, char** argv )
}
}
}
else
{
HB_TRACE( HB_TR_DEBUG, ( "Error registering service\n" ) );
}
}
#endif
@@ -141,7 +141,7 @@ HB_FUNC( WIN_SERVICESETSTATUS ) /* dwStatus */
{
#if ! defined( HB_OS_WIN_CE )
s_ServiceStatus.dwCurrentState = ( DWORD ) hb_parnl( 1 );
hb_retl( Sets_ServiceStatus( s_hStatus, &s_ServiceStatus ) );
hb_retl( SetServiceStatus( s_hStatus, &s_ServiceStatus ) );
#else
hb_retl( HB_FALSE );
#endif
@@ -151,7 +151,7 @@ HB_FUNC( WIN_SERVICESETEXITCODE ) /* dwExitCode */
{
#if ! defined( HB_OS_WIN_CE )
s_ServiceStatus.dwWin32ExitCode = ( DWORD ) hb_parnl( 1 );
hb_retl( Sets_ServiceStatus( s_hStatus, &s_ServiceStatus ) );
hb_retl( SetServiceStatus( s_hStatus, &s_ServiceStatus ) );
#else
hb_retl( HB_FALSE );
#endif
@@ -161,7 +161,7 @@ HB_FUNC( WIN_SERVICESTOP )
{
#if ! defined( HB_OS_WIN_CE )
s_ServiceStatus.dwCurrentState = SERVICE_STOPPED;
Sets_ServiceStatus( s_hStatus, &s_ServiceStatus );
SetServiceStatus( s_hStatus, &s_ServiceStatus );
#endif
}

View File

@@ -183,16 +183,14 @@ To add one to a file lacking it simply put as first lines:
* Chr(36) + "Id" + Chr(36)
*/
IMPORTANT: In real code, replaces 'Chr(36)' with '$' signes.
IMPORTANT 1: In real code, replace 'Chr(36)' with '$' signes.
as soon as you commit your file SVN ID string will be expanded
by SVN server to full length.
Note that last dollar sign is mandatory.
Run these commands and commit:
svn propset svn:keywords "Author Date Id Revision" "filename"
svn propset svn:eol-style native "filename"
IMPORTANT 2: Run these commands and commit:
svn propset svn:keywords "Author Date Id Revision" "filename"
svn propset svn:eol-style native "filename"
[ Copyright (c) 1999-2009 Viktor Szakats (harbour.01 syenar.hu)