2009-12-12 02:43 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* src/vm/strapi.c
    % Minor optimization (using cdp variable instead of repeated hb_vmCDP() calls.)

  * include/hbwinuni.h
    + Added HB_ITEMPUTSTR[LEN]() macros.
    + Added HB_STRUNSHARE() macro.
    ! Fixed typos in HB_ARRAYSETSTRLEN() macro values.

  * contrib/hbwin/win_prn2.c
    + Using new HB_ITEMPUTSTR() macro instead of HB_TCHAR*().

  * contrib/hbwin/win_misc.c
    ! WIN_RUNDETACHED(): Fixed to guarantee writable buffer in second 
      parameter of CreateProcess(). I've choosen to always pass a writable
      buffer, although MS requires this only for UNICODE mode.

  * contrib/hbwin/wapi_commctrl.c
    + Using new UNICODE parameter passing macros instead of HB_TCHAR*() ones.
    ! Fixed return values of WAPI_IMAGELIST_GETIMAGEINFO() to be empty
      string instead of unset (NIL) in case of error.

  + contrib/hbqt/filelist.mk
    ! Missed from previous commit.

  * contrib/hbwin/win_regc.c
    * Removed trailing spaces (realized I used a temp instance
      of 64-bit Far Manager for the last couple of days)
      (there will be more)
This commit is contained in:
Viktor Szakats
2009-12-12 02:07:01 +00:00
parent 51a5487cb8
commit 79186f75a5
8 changed files with 149 additions and 81 deletions

View File

@@ -17,6 +17,36 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-12-12 02:43 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/strapi.c
% Minor optimization (using cdp variable instead of repeated hb_vmCDP() calls.)
* include/hbwinuni.h
+ Added HB_ITEMPUTSTR[LEN]() macros.
+ Added HB_STRUNSHARE() macro.
! Fixed typos in HB_ARRAYSETSTRLEN() macro values.
* contrib/hbwin/win_prn2.c
+ Using new HB_ITEMPUTSTR() macro instead of HB_TCHAR*().
* contrib/hbwin/win_misc.c
! WIN_RUNDETACHED(): Fixed to guarantee writable buffer in second
parameter of CreateProcess(). I've choosen to always pass a writable
buffer, although MS requires this only for UNICODE mode.
* contrib/hbwin/wapi_commctrl.c
+ Using new UNICODE parameter passing macros instead of HB_TCHAR*() ones.
! Fixed return values of WAPI_IMAGELIST_GETIMAGEINFO() to be empty
string instead of unset (NIL) in case of error.
+ contrib/hbqt/filelist.mk
! Missed from previous commit.
* contrib/hbwin/win_regc.c
* Removed trailing spaces (realized I used a temp instance
of 64-bit Far Manager for the last couple of days)
(there will be more)
2009-12-12 01:42 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/strapi.c
* harbour/include/hbapistr.h
@@ -69,7 +99,7 @@
* contrib/hbwin/win_regc.c
* WIN_REGSETVALUEEX(): Adjusted casting to not drop const.
! WIN_REGSETVALUEEX(): Added support for UNICODE builds when
! WIN_REGSETVALUEEX(): Added support for UNICODE builds when
string types (non-binary data) are passed.
* contrib/hbwin/tests/testreg.prg
@@ -105,32 +135,32 @@
* contrib/hbqt/qtnetwork/Makefile
+ Moved 'moc' build logic to separate file.
+ Added support for MOC_HEADERS in all sub-libs.
This allows to avoid hacks to place every custom
created component in central lib. (It probably allows
This allows to avoid hacks to place every custom
created component in central lib. (It probably allows
to avoid central lib altogether.)
! Fixed broken static build after recent changes.
(I've readded central filelist.mk to avoid
redundancy, but the file isn't an automatically
(I've readded central filelist.mk to avoid
redundancy, but the file isn't an automatically
generated one anymore)
% Optimized build to not provide all subsystem header
% Optimized build to not provide all subsystem header
dirs for each QT sub-libs, only those which are needed.
Now QtCore header dir is passed to all components,
but QtGui and QtNetwork is passed only to these
Now QtCore header dir is passed to all components,
but QtGui and QtNetwork is passed only to these
subcomponents.
Central hbqt lib gets all dirs, but hopefully this
Central hbqt lib gets all dirs, but hopefully this
will be cleaned eventually.
% Cleaned to not use /Qt include dir. It's apparently
% Cleaned to not use /Qt include dir. It's apparently
not needed.
* contrib/hbqt/qth/QObject.qth
* contrib/hbqt/qtcore/QObject.cpp
! Core component was referring to a GUI one, and hbqt_par_QWidget()
! Core component was referring to a GUI one, and hbqt_par_QWidget()
was used to retieve a QObject inside QObject wrappers.
Please fix me if it was intentional, but it didn't look right and
Please fix me if it was intentional, but it didn't look right and
came out after cleaning header dir usage.
* contrib/hbide/hbide.hbp
+ Added MSVC link switches sent by Andi to make QT 4.6.0
+ Added MSVC link switches sent by Andi to make QT 4.6.0
libs work with default Harbour build.
2009-12-11 18:17 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
@@ -143,19 +173,20 @@
* contrib/hbwin/win_prn2.c
* contrib/hbwin/win_regc.c
+ Using new UNICODE parameter passing macros instead of HB_TCHAR*() ones.
* Minor rework WIN_TEXTOUT() and WIN_GETTEXTSIZE() to not use hb_parclen()
* Minor rework WIN_TEXTOUT() and WIN_GETTEXTSIZE() to not use hb_parclen()
and protect some more against wrong length parameter.
; TOFIX: HB_ARRAYSETSTR() usage crashes (tested in non-UNICODE with testprn3)
I didn't want to undo the whole thing, but can't find the err either.
; TOFIX: hb_parclen() usage.
; TOFIX: HB_ARRAYSETSTR() with NULL string parameter.
; TOFIX: HB_PARSTRDEF() to really default to empty string for non-string params.
[DONE]
; TOFIX: hb_parclen() usage. [DONE]
; TOFIX: HB_ARRAYSETSTR() with NULL string parameter. [DONE]
; TOFIX: HB_PARSTRDEF() to really default to empty string for non-string params. [DONE]
; TODO: Remaining HB_TCHAR_*() usages.
; TODO: Peer-review what I did.
* contrib/hbwin/wapi_winbase.c
! Fixed for WinCE after recent addition of new wrappers.
This means exclusion of WAPI_WAITFORSINGLEOBJECTEX() and
This means exclusion of WAPI_WAITFORSINGLEOBJECTEX() and
WAPI_WAITFORMULTIPLEOBJECTSEX() for this platform.
! Minor fix in size of allocated buffer in WAPI_FORMATMESSAGE().
(buffer was too large in non-UNICODE).
@@ -172,7 +203,7 @@
! Deleted no more needed init calls.
* contrib/hbqt/hbqt_events.cpp
+ Added TOFIX about GC collected pointer stored in low level
+ Added TOFIX about GC collected pointer stored in low level
structure. (source of GPF).
* contrib/hbwin/win_misc.c
@@ -185,14 +216,14 @@
* contrib/hbwin/legacyco.c
- Deleted now unnecessary '( LP[C]TSTR )' casts.
+ Cleaned const usage in WIN_PRINTERSETDEFAULT().
F.e. OpenPrinter() has apparently wrong winapi declaration,
F.e. OpenPrinter() has apparently wrong winapi declaration,
so a cast must have been added.
; TOFIX: CreateProcessW() second parameter has to be a read/write
buffer. Przemek, do you have an idea how to solve that
; TOFIX: CreateProcessW() second parameter has to be a read/write
buffer. Przemek, do you have an idea how to solve that
the cleanest way?
(for now I kept a cast, assuming that a buffer is
created by Harbour conversion API, but that's not
(for now I kept a cast, assuming that a buffer is
created by Harbour conversion API, but that's not
something it guarantees in the future.)
2009-12-11 04:37 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
@@ -246,12 +277,12 @@
2009-12-10 22:46 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbqt/hbqt_events.cpp
* contrib/hbqt/hbqt_slots.cpp
! Fixed events/slots handling to make sure the objects
! Fixed events/slots handling to make sure the objects
always exist on access.
% This also made explicit initialization from .prg
% This also made explicit initialization from .prg
code unnecessary, so these two functions got deleted:
QT_SETEVENTFILTER(), QT_SETEVENTSLOTS()
! Fixed events/slots handling to reset thread local object
! Fixed events/slots handling to reset thread local object
pointer to NULL after destruction.
* contrib/hbxbp/xbpsle.prg
@@ -261,29 +292,29 @@
* contrib/hbxbp/xbpdialog.prg
* contrib/hbxbp/xbpspinbutton.prg
* contrib/hbxbp/xbpgeneric.prg
% Simple wrapper named HBXBP_SETEVENTFILTER() deleted and
% Simple wrapper named HBXBP_SETEVENTFILTER() deleted and
replaced with QT_GETEVENTFILTER() calls.
(name still subject to change)
; NOTE: 1) In demoxbp MT mode build, the second dialog behaves
; NOTE: 1) In demoxbp MT mode build, the second dialog behaves
strangely. It updates the screen slowly and not at all.
Pritpal, please check it to make sure not some
Pritpal, please check it to make sure not some
recent change broke it.
2) Forgot to mention in prev entry, but removing
HBQMainWindow() mutex altogether didn't cause any
change/loss of functionality in my tests, so my
2) Forgot to mention in prev entry, but removing
HBQMainWindow() mutex altogether didn't cause any
change/loss of functionality in my tests, so my
question is: Is it really needed?
2009-12-10 22:22 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbqt/hbqt_hbqmainwindow.cpp
* contrib/hbxbp/xbpgeneric.prg
+ Replaced HB_MUTEXCREATE() and HB_MUTEXDESTROY() with
+ Replaced HB_MUTEXCREATE() and HB_MUTEXDESTROY() with
automatic initialization and deinitialization.
; NOTE: From now on HBQT needs to be requested by apps
; NOTE: From now on HBQT needs to be requested by apps
willing to use HBQT, with:
REQUEST HB_QT
This will ensure in the future that all init and
deinit procedure are done correctly. It also makes it
This will ensure in the future that all init and
deinit procedure are done correctly. It also makes it
safe to use QT even from INIT and EXIT PROCECUREs.
* contrib/hbqt/tests/demoqt.prg
@@ -333,10 +364,10 @@
2009-12-10 20:35 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbqt/Makefile
+ Added generic support to MOC compile headers.
; If this works out well, it makes it possible to use granular
; If this works out well, it makes it possible to use granular
(non-monolythic) headers for 'Q_OBJECT' classes.
It's also possible to move this logic into sub-libs.
This may also mean that some hacks which were currently
This may also mean that some hacks which were currently
employed can be solved cleanly.
Please test/review.
@@ -355,7 +386,7 @@
* contrib/hbqt/qth/QSyntaxHighlighter.qth
+ contrib/hbqt/hbqt_events.h
* contrib/hbqt/hbqt_events.cpp
* Split monolithic hbqt_slots.h header to distinct
* Split monolithic hbqt_slots.h header to distinct
class headers.
* contrib/hbqt/generator/hbqtgen.prg

View File

@@ -0,0 +1,25 @@
#
# $Id$
#
MOC_HEADERS := \
hbqt_events.h \
hbqt_hbdbfmodel.h \
hbqt_hbqmainwindow.h \
hbqt_hbqsyntaxhighlighter.h \
hbqt_hbqtableview.h \
hbqt_slots.h \
CPP_SOURCES := \
hbqt_base.cpp \
hbqt_utils.cpp \
hbqt_slots.cpp \
hbqt_destruct.cpp \
hbqt_events.cpp \
hbqt_hbdbfmodel.cpp \
hbqt_hbqmainwindow.cpp \
hbqt_hbqsyntaxhighlighter.cpp \
hbqt_hbqtableview.cpp \
# Don't delete this comment, it's here to ensure empty
# line above is kept intact.

View File

@@ -53,7 +53,9 @@
#include "hbapi.h"
#include "hbapiitm.h"
#include "hbwinuni.h"
#include "hbwapi.h"
#include <commctrl.h>
#if defined( __BORLANDC__ ) && !defined( HB_ARCH_64BIT )
@@ -295,9 +297,9 @@ HB_FUNC( WAPI_IMAGELIST_GETIMAGEINFO )
IMAGEINFO ii;
if( ImageList_GetImageInfo( wapi_par_HIMAGELIST( 1 ), wapi_par_INT( 2 ), &ii ) )
{
hb_retclen( ( char * ) &ii, sizeof( IMAGEINFO ) );
}
else
hb_retc_null();
}
/*----------------------------------------------------------------------*/
/*
@@ -477,15 +479,16 @@ HB_FUNC( WAPI_IMAGELIST_WRITEEX )
HB_FUNC( WAPI_TABCTRL_INSERTITEM )
{
TC_ITEM item;
LPTSTR szText = HB_TCHAR_CONVTO( hb_parcx( 3 ) );
void * hText;
item.mask = TCIF_TEXT | TCIF_IMAGE;
item.iImage = HB_ISNUM( 4 ) ? wapi_par_INT( 4 ) : -1;
item.pszText = szText;
item.pszText = ( LPTSTR ) HB_PARSTRDEF( 3, &hText, NULL );
wapi_ret_NI( TabCtrl_InsertItem( wapi_par_HWND( 1 ), wapi_par_INT( 3 ), &item ) );
HB_TCHAR_FREE( szText );
hb_strfree( hText );
}
/*----------------------------------------------------------------------*/
@@ -560,15 +563,16 @@ HB_FUNC( WAPI_TABCTRL_SETIMAGELIST )
HB_FUNC( WAPI_TABCTRL_SETITEM )
{
TC_ITEM item;
LPTSTR szText = HB_TCHAR_CONVTO( hb_parcx( 3 ) );
void * hText;
item.mask = TCIF_TEXT | TCIF_IMAGE;
item.iImage = HB_ISNUM( 4 ) ? wapi_par_INT( 4 ) : -1;
item.pszText = szText;
item.pszText = ( LPTSTR ) HB_PARSTRDEF( 3, &hText, NULL );
wapi_ret_L( TabCtrl_SetItem( wapi_par_HWND( 1 ), wapi_par_INT( 2 ), &item ) );
HB_TCHAR_FREE( szText );
hb_strfree( hText );
}
/*----------------------------------------------------------------------*/
/* TabCtrl_DeleteAllItems(hwnd) */
@@ -780,15 +784,17 @@ HB_FUNC( WAPI_TABCTRL_CREATE )
HB_FUNC( WAPI_TABCTRL_ADDITEM )
{
int iCount = TabCtrl_GetItemCount( wapi_par_HWND( 1 ) );
LPTSTR szText = HB_TCHAR_CONVTO( hb_parcx( 2 ) );
TC_ITEM item;
void * hText;
item.mask = TCIF_TEXT | TCIF_IMAGE;
item.iImage = HB_ISNUM( 3 ) ? wapi_par_INT( 3 ) : -1;
item.pszText = szText;
item.pszText = ( LPTSTR ) HB_PARSTRDEF( 2, &hText, NULL );
wapi_ret_NI( TabCtrl_InsertItem( wapi_par_HWND( 1 ), iCount, &item ) );
HB_TCHAR_FREE( szText );
hb_strfree( hText );
}
/*----------------------------------------------------------------------*/
/*

View File

@@ -84,10 +84,12 @@ HB_FUNC( WIN_RUNDETACHED )
ZeroMemory( &pi, sizeof( pi ) );
#endif
HB_SIZE nLen;
LPCTSTR lpCommandRO = HB_PARSTR( 2, &hCommandLine, &nLen );
if( CreateProcess(
HB_PARSTR( 1, &hCommandName, NULL ), /* Command name */
/* TOFIX */
( LPTSTR ) HB_PARSTR( 2, &hCommandLine, NULL ), /* Command line (Unicode version needs an non-const buffer) */
HB_STRUNSHARE( &hCommandLine, lpCommandRO, nLen ), /* Command line (Unicode version needs an non-const buffer) */
NULL, /* Process handle not inheritable */
NULL, /* Thread handle not inheritable */
FALSE, /* Set handle inheritance to FALSE */
@@ -139,7 +141,7 @@ HB_FUNC( WIN_LOADRESOURCE )
void * hName;
void * hType;
HRSRC hRes = FindResource( ( HMODULE ) hInstance,
HRSRC hRes = FindResource( ( HMODULE ) hInstance,
HB_PARSTRDEF( 1, &hName, NULL ),
HB_PARSTRDEF( 2, &hType, NULL ) );

View File

@@ -502,9 +502,7 @@ HB_FUNC( WIN_PRINTERLIST )
{
if( bPrinterNamesOnly )
{
char * pszData = HB_TCHAR_CONVFROM( pPrinterEnum->pPrinterName );
hb_itemPutC( pTempItem, pszData );
HB_TCHAR_FREE( pszData );
HB_ITEMPUTSTR( pTempItem, pPrinterEnum->pPrinterName );
hb_arrayAddForward( pPrinterArray, pTempItem );
}
else

View File

@@ -133,8 +133,8 @@ HB_FUNC( WIN_REGQUERYVALUEEX )
{
if( dwSize > 0 )
{
if( dwType == REG_SZ ||
dwType == REG_EXPAND_SZ ||
if( dwType == REG_SZ ||
dwType == REG_EXPAND_SZ ||
dwType == REG_MULTI_SZ )
{
LPTSTR lpValue = ( LPTSTR ) hb_xgrab( ( dwSize + 1 ) * sizeof( TCHAR ) );
@@ -196,8 +196,8 @@ HB_FUNC( WIN_REGSETVALUEEX )
( const BYTE * ) &nSpace,
sizeof( REG_DWORD ) ) == ERROR_SUCCESS );
}
else if( dwType == REG_SZ ||
dwType == REG_EXPAND_SZ ||
else if( dwType == REG_SZ ||
dwType == REG_EXPAND_SZ ||
dwType == REG_MULTI_SZ )
{
void * hValue;

View File

@@ -60,23 +60,29 @@
#include "hbset.h"
#if defined( UNICODE )
#define HB_PARSTR( n, h, len ) hb_parstr_u16( n, HB_CDP_ENDIAN_NATIVE, h, len )
#define HB_PARSTRDEF( n, h, len ) hb_wstrnull( hb_parstr_u16( n, HB_CDP_ENDIAN_NATIVE, h, len ) )
#define HB_RETSTR( str ) hb_retstr_u16( HB_CDP_ENDIAN_NATIVE, str )
#define HB_RETSTRLEN( str, len ) hb_retstrlen_u16( HB_CDP_ENDIAN_NATIVE, str, len )
#define HB_STORSTR( str, n ) hb_storstr_u16( HB_CDP_ENDIAN_NATIVE, str, n )
#define HB_STORSTRLEN( str, len, n ) hb_storstrlen_u16( HB_CDP_ENDIAN_NATIVE, str, len, n )
#define HB_ARRAYSETSTR( arr, n, str ) hb_arraySetStrU16( arr, n, HB_CDP_ENDIAN_NATIVE, str )
#define HB_ARRAYSETSTRLEN( arr, n, str, len ) hb_arraySetStr( arr, n, HB_CDP_ENDIAN_NATIVE, str, len )
#define HB_PARSTR( n, h, len ) hb_parstr_u16( n, HB_CDP_ENDIAN_NATIVE, h, len )
#define HB_PARSTRDEF( n, h, len ) hb_wstrnull( hb_parstr_u16( n, HB_CDP_ENDIAN_NATIVE, h, len ) )
#define HB_RETSTR( str ) hb_retstr_u16( HB_CDP_ENDIAN_NATIVE, str )
#define HB_RETSTRLEN( str, len ) hb_retstrlen_u16( HB_CDP_ENDIAN_NATIVE, str, len )
#define HB_STORSTR( str, n ) hb_storstr_u16( HB_CDP_ENDIAN_NATIVE, str, n )
#define HB_STORSTRLEN( str, len, n ) hb_storstrlen_u16( HB_CDP_ENDIAN_NATIVE, str, len, n )
#define HB_ARRAYSETSTR( arr, n, str ) hb_arraySetStrU16( arr, n, HB_CDP_ENDIAN_NATIVE, str )
#define HB_ARRAYSETSTRLEN( arr, n, str, len ) hb_arraySetStrLenU16( arr, n, HB_CDP_ENDIAN_NATIVE, str, len )
#define HB_ITEMPUTSTR( p, str ) hb_itemPutStrU16( p, HB_CDP_ENDIAN_NATIVE, str )
#define HB_ITEMPUTSTRLEN( p, str, len ) hb_itemPutStrLenU16( p, HB_CDP_ENDIAN_NATIVE, str, len )
#define HB_STRUNSHARE( h, str, len ) hb_wstrunshare( h, str, len )
#else
#define HB_PARSTR( n, h, len ) hb_parstr( n, hb_setGetOSCP(), h, len )
#define HB_PARSTRDEF( n, h, len ) hb_strnull( hb_parstr( n, hb_setGetOSCP(), h, len ) )
#define HB_RETSTR( str ) hb_retstr( hb_setGetOSCP(), str )
#define HB_RETSTRLEN( str, len ) hb_retstrlen( hb_setGetOSCP(), str, len )
#define HB_STORSTR( str, n ) hb_storstr( hb_setGetOSCP(), str, n )
#define HB_STORSTRLEN( str, len, n ) hb_storstrlen( hb_setGetOSCP(), str, len, n )
#define HB_ARRAYSETSTR( arr, n, str ) hb_arraySetStr( arr, n, hb_setGetOSCP(), str )
#define HB_ARRAYSETSTRLEN( arr, n, str, len ) hb_arraySetStr( arr, n, hb_setGetOSCP(), str, len )
#define HB_PARSTR( n, h, len ) hb_parstr( n, hb_setGetOSCP(), h, len )
#define HB_PARSTRDEF( n, h, len ) hb_strnull( hb_parstr( n, hb_setGetOSCP(), h, len ) )
#define HB_RETSTR( str ) hb_retstr( hb_setGetOSCP(), str )
#define HB_RETSTRLEN( str, len ) hb_retstrlen( hb_setGetOSCP(), str, len )
#define HB_STORSTR( str, n ) hb_storstr( hb_setGetOSCP(), str, n )
#define HB_STORSTRLEN( str, len, n ) hb_storstrlen( hb_setGetOSCP(), str, len, n )
#define HB_ARRAYSETSTR( arr, n, str ) hb_arraySetStr( arr, n, hb_setGetOSCP(), str )
#define HB_ARRAYSETSTRLEN( arr, n, str, len ) hb_arraySetStrLen( arr, n, hb_setGetOSCP(), str, len )
#define HB_ITEMPUTSTR( p, str ) hb_itemPutStr( p, hb_setGetOSCP(), str )
#define HB_ITEMPUTSTRLEN( p, str, len ) hb_itemPutStrLen( p, hb_setGetOSCP(), str, len )
#define HB_STRUNSHARE( h, str, len ) hb_strunshare( h, str, len )
#endif
#endif /* HB_OS_WIN */

View File

@@ -416,7 +416,7 @@ PHB_ITEM hb_itemPutStrLenUTF8( PHB_ITEM pItem, const char * pStr, ULONG ulLen )
cdp = hb_vmCDP();
ulDest = hb_cdpUTF8AsStrLen( cdp, FALSE, pStr, ulLen, 0 );
pszDest = ( char * ) hb_xgrab( ulDest + 1 );
hb_cdpUTF8ToStr( hb_vmCDP(), FALSE, pStr, ulLen, pszDest, ulDest + 1 );
hb_cdpUTF8ToStr( cdp, FALSE, pStr, ulLen, pszDest, ulDest + 1 );
return hb_itemPutCLPtr( pItem, pszDest, ulDest );
}
@@ -435,7 +435,7 @@ PHB_ITEM hb_itemPutStrLenU16( PHB_ITEM pItem, int iEndian, const HB_WCHAR * pStr
cdp = hb_vmCDP();
ulDest = hb_cdpU16AsStrLen( cdp, FALSE, pStr, ulLen, 0 );
pszDest = ( char * ) hb_xgrab( ulDest + 1 );
hb_cdpU16ToStr( hb_vmCDP(), FALSE, iEndian, pStr, ulLen, pszDest, ulDest + 1 );
hb_cdpU16ToStr( cdp, FALSE, iEndian, pStr, ulLen, pszDest, ulDest + 1 );
return hb_itemPutCLPtr( pItem, pszDest, ulDest );
}
@@ -472,7 +472,7 @@ PHB_ITEM hb_itemPutStrUTF8( PHB_ITEM pItem, const char * pStr )
ulLen = ( ULONG ) strlen( pStr );
ulDest = hb_cdpUTF8AsStrLen( cdp, FALSE, pStr, ulLen, 0 );
pszDest = ( char * ) hb_xgrab( ulDest + 1 );
hb_cdpUTF8ToStr( hb_vmCDP(), FALSE, pStr, ulLen, pszDest, ulDest + 1 );
hb_cdpUTF8ToStr( cdp, FALSE, pStr, ulLen, pszDest, ulDest + 1 );
return hb_itemPutCLPtr( pItem, pszDest, ulDest );
}
@@ -492,7 +492,7 @@ PHB_ITEM hb_itemPutStrU16( PHB_ITEM pItem, int iEndian, const HB_WCHAR * pStr )
ulLen = hb_wstrlen( pStr );
ulDest = hb_cdpU16AsStrLen( cdp, FALSE, pStr, ulLen, 0 );
pszDest = ( char * ) hb_xgrab( ulDest + 1 );
hb_cdpU16ToStr( hb_vmCDP(), FALSE, iEndian, pStr, ulLen, pszDest, ulDest + 1 );
hb_cdpU16ToStr( cdp, FALSE, iEndian, pStr, ulLen, pszDest, ulDest + 1 );
return hb_itemPutCLPtr( pItem, pszDest, ulDest );
}