diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7cad0b1ef2..fae021a255 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,15 @@ The license applies to all entries newer than 2009-04-28. */ +2011-05-13 17:32 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbwin/hbwin.ch + * contrib/hbwin/win_svc.c + + added 4th param to WIN_SERVICEINSTALL() to spec start type + + added related constants + + * contrib/hbwin/wapi_misc.c + ! cast for win64 + 2011-05-13 04:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbstack.h * harbour/src/vm/hvm.c diff --git a/harbour/contrib/hbwin/hbwin.ch b/harbour/contrib/hbwin/hbwin.ch index efeb66a1e5..92943036b2 100644 --- a/harbour/contrib/hbwin/hbwin.ch +++ b/harbour/contrib/hbwin/hbwin.ch @@ -671,6 +671,13 @@ #define WIN_SERVICE_PAUSE_PENDING 6 #define WIN_SERVICE_PAUSED 7 +/* WIN_SERVICEINSTALL() start type */ +#define WIN_SERVICE_AUTO_START 0x00000002 +#define WIN_SERVICE_BOOT_START 0x00000000 +#define WIN_SERVICE_DEMAND_START 0x00000003 +#define WIN_SERVICE_DISABLED 0x00000004 +#define WIN_SERVICE_SYSTEM_START 0x00000001 + /* WAPI_MESSAGEBOX()/WAPI_MESSAGEBEEP() flags */ #define WIN_MB_OK 0x00000000 #define WIN_MB_OKCANCEL 0x00000001 diff --git a/harbour/contrib/hbwin/wapi_misc.c b/harbour/contrib/hbwin/wapi_misc.c index f85476a244..164cabd7fd 100644 --- a/harbour/contrib/hbwin/wapi_misc.c +++ b/harbour/contrib/hbwin/wapi_misc.c @@ -113,7 +113,7 @@ static TCHAR * hbwapi_FileNameAtSystemDir( const TCHAR * pFileName ) LPTSTR buffer; if( pFileName ) - nLen += hbwapi_tstrlen( pFileName ) + 1; + nLen += ( UINT ) hbwapi_tstrlen( pFileName ) + 1; buffer = ( LPTSTR ) hb_xgrab( nLen * sizeof( TCHAR ) ); diff --git a/harbour/contrib/hbwin/win_svc.c b/harbour/contrib/hbwin/win_svc.c index b66f432408..4290484eef 100644 --- a/harbour/contrib/hbwin/win_svc.c +++ b/harbour/contrib/hbwin/win_svc.c @@ -223,7 +223,8 @@ HB_FUNC( WIN_SERVICEINSTALL ) lpDisplayName, /* service name to display */ SERVICE_ALL_ACCESS, /* desired access */ SERVICE_WIN32_OWN_PROCESS, /* service type */ - SERVICE_DEMAND_START, /* start type */ + HB_ISNUM( 3 ) ? ( DWORD ) hb_parnl( 3 ) : SERVICE_DEMAND_START, + /* start type */ SERVICE_ERROR_NORMAL, /* error control type */ lpPath, /* path to service's binary */ NULL, /* no load ordering group */