On Thu, 10 Dec 2009, [email protected] wrote:
Hi,
> 2009-12-10 15:40 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
> * hbwin/win_misc.c
> * hbwin/win_prn1.c
> + Using new UNICODE parameter passing macros instead of HB_TCHAR*() ones.
> (where possible)
Thank you for your modifications but I would like to ask you about
two things:
1. please do not leave any unnecessary casting like:
( LPCTSTR ) HB_PARSTRDEF( ... )
such casting does not give anything (it cannot converts strings
between different formats) but can hide very serious bugs like wrong
HB_PARSTRDEF() body.
2. please use HB_PARSTRDEF() only in places where is strictly necessary.
some of this code comes from xHarbour where few years ago all hb_parc()
where replaced with hb_parcx() by global S&R. From that time I always
used to check and replace unnecessary hb_parcx() with hb_parc().
If you will make mechanical translations all hb_parcx() to HB_PARSTRDEF()
then I will have to also verify HB_PARSTRDEF() calls. So please try
to already clean it at least for such basic things like:
if( HB_ISCHAR( 1 ) )
{
void * hName;
xec->hDLL = LoadLibrary( HB_PARSTRDEF( 1, &hName, NULL ) );
hb_strfree( hName );
}
BTW We can add to strapi.c two very simple functions:
const char * hb_strnull( const char * str )
{
return str ? str : "";
}
const HB_WCHAR * hb_strnull_u16( const HB_WCHAR * str )
{
return str ? str : s_szConstStr;
}
which can be used in HB_PARSTRDEF() macro.
best regards,
Przemek
ps. Now I'm making some minor modifications in win_dll.c so please
do not change it.
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour