2009-09-15 17:30 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/contrib/hbwin/win_com.c
    * initialize s_PortData structure at application startup
This commit is contained in:
Przemyslaw Czerpak
2009-09-15 15:30:20 +00:00
parent f863d5ff5c
commit 8a2e311c63
2 changed files with 20 additions and 4 deletions

View File

@@ -17,6 +17,10 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-09-15 17:30 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/hbwin/win_com.c
* initialize s_PortData structure at application startup
2009-09-15 17:11 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/hbnetio/netiocli.c
! added missing in previous commit casting for C++ mode

View File

@@ -63,15 +63,12 @@ static struct
DWORD dwError;
} s_PortData[ 256 ];
#if 0
HB_INITFUNC( WIN_COMINIT )
static void hb_wincom_init( void )
{
int i;
for( i = 0; i < ( int ) HB_SIZEOFARRAY( s_PortData ); i++ )
s_PortData[ i ].hPort = INVALID_HANDLE_VALUE;
}
#endif
HB_FUNC( WIN_COMOPEN )
{
@@ -842,3 +839,18 @@ HB_FUNC( WIN_COMDEBUGDCB )
else
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
HB_CALL_ON_STARTUP_BEGIN( _hb_wincom_init_ )
hb_wincom_init();
HB_CALL_ON_STARTUP_END( _hb_wincom_init_ )
#if defined( HB_PRAGMA_STARTUP )
#pragma startup _hb_wincom_init_
#elif defined( HB_MSC_STARTUP )
#if defined( HB_OS_WIN_64 )
#pragma section( HB_MSC_START_SEGMENT, long, read )
#endif
#pragma data_seg( HB_MSC_START_SEGMENT )
static HB_$INITSYM hb_vm_auto_wincom_init = _hb_wincom_init_;
#pragma data_seg()
#endif