FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Use SysRefresh() in c code
Posts: 11
Joined: Sat Sep 25, 2010 02:36 PM
Use SysRefresh() in c code
Posted: Tue Nov 09, 2010 08:29 AM

May someone tell me how to call SysRefresh() in c code ?
i tried to put following command before calling it(refer winexec.c ), but not successfull.
------------------------------------
BOOL SysRefresh( void );
or
extern BOOL SysRefresh( void );
----------------------------------------------
code example :(unresolved external symbol "int __cdecl SysRefresh(void) on compiling)
*------------------------------------------------------
func Main()
? BBB()
? CCC()
retu nil

pragma BEGINDUMP

BOOL SysRefresh( void );
// extern BOOL SysRefresh( void ); // same result of "(unresolved external symbol "int __cdecl SysRefresh(void))"

HB_FUNC( BBB )
{
SysRefresh();
hb_retc( "BBB" );
}

HB_FUNC( CCC )
{
hb_retc( "CCC" );
SysRefresh();
}

pragma ENDDUMP

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Use SysRefresh() in c code
Posted: Tue Nov 09, 2010 03:43 PM

Your sample works fine here.

EMG

Posts: 11
Joined: Sat Sep 25, 2010 02:36 PM
Re: Use SysRefresh() in c code
Posted: Wed Nov 10, 2010 06:27 AM

Do you use Borland C ?
i got same error in hHarbour and xHarbour with MSVC compiling.
May you tell me compling flags if you use MSVC also ?
Thanks and Regards
cly

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Use SysRefresh() in c code
Posted: Wed Nov 10, 2010 08:34 AM
cly166 wrote:Do you use Borland C ?


Yes.

cly166 wrote:i got same error in hHarbour and xHarbour with MSVC compiling.
May you tell me compling flags if you use MSVC also ?


I'm not familiar with MSVC, sorry.

EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Use SysRefresh() in c code
Posted: Wed Nov 10, 2010 09:35 AM
Cly,

What FWH version are you using ?

You can check it inside FWH\include\FiveWin.ch

In case that you are using C++ mode, try this declaration:
Code (fw): Select all Collapse
// BOOL SysRefresh( void );

extern "C" {
   BOOL SysRefresh( void );
};
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 11
Joined: Sat Sep 25, 2010 02:36 PM
Re: Use SysRefresh() in c code
Posted: Wed Nov 10, 2010 01:35 PM

Antonio:
Thank you, it works.
i use FWH August, 2010
cly

Continue the discussion