2010-03-08 16:12 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/diskspac.c
* src/rtl/disksphb.c
* contrib/hbwin/wapi_winbase.c
+ Added trick to make dynamic calls to WIDE API functions via
UNICOWS.DLL in UNICODE (default) builds when running on Win9x
systems. This fixes DISKSPACE(), HB_DISKSPACE() and
WAPI_GETLONGPATHNAME() in this scenario. (IOW this patch
makes these calls work in UNICOWS situations)
This commit is contained in:
@@ -17,6 +17,16 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-03-08 16:12 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/rtl/diskspac.c
|
||||
* src/rtl/disksphb.c
|
||||
* contrib/hbwin/wapi_winbase.c
|
||||
+ Added trick to make dynamic calls to WIDE API functions via
|
||||
UNICOWS.DLL in UNICODE (default) builds when running on Win9x
|
||||
systems. This fixes DISKSPACE(), HB_DISKSPACE() and
|
||||
WAPI_GETLONGPATHNAME() in this scenario. (IOW this patch
|
||||
makes these calls work in UNICOWS situations)
|
||||
|
||||
2010-03-08 15:38 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/rtl/hbsocket.c
|
||||
* bin/hb-mkdyn.sh
|
||||
|
||||
@@ -365,10 +365,11 @@ HB_FUNC( WAPI_GETLONGPATHNAME )
|
||||
if( !s_getPathNameAddr )
|
||||
{
|
||||
s_getPathNameAddr = ( _HB_GETPATHNAME )
|
||||
GetProcAddress( GetModuleHandle( TEXT( "kernel32.dll" ) ),
|
||||
#if defined( UNICODE )
|
||||
GetProcAddress( GetModuleHandle( hb_iswin9x() ? TEXT( "unicows.dll" ) : TEXT( "kernel32.dll" ) ),
|
||||
"GetLongPathNameW" );
|
||||
#else
|
||||
GetProcAddress( GetModuleHandle( TEXT( "kernel32.dll" ) ),
|
||||
"GetLongPathNameA" );
|
||||
#endif
|
||||
if( !s_getPathNameAddr )
|
||||
|
||||
@@ -144,7 +144,7 @@ HB_FUNC( DISKSPACE )
|
||||
lpPath[ 2 ] = TEXT( '\\' );
|
||||
lpPath[ 3 ] = TEXT( '\0' );
|
||||
|
||||
#if defined( HB_OS_WIN_CE ) || defined( HB_NO_WIN95 )
|
||||
#if defined( HB_OS_WIN_CE )
|
||||
|
||||
bError = ! GetDiskFreeSpaceEx( lpPath,
|
||||
( PULARGE_INTEGER ) &i64FreeBytesToCaller,
|
||||
@@ -166,10 +166,11 @@ HB_FUNC( DISKSPACE )
|
||||
{
|
||||
s_fInit = HB_TRUE;
|
||||
s_pGetDiskFreeSpaceEx = ( P_GDFSE )
|
||||
GetProcAddress( GetModuleHandle( TEXT( "kernel32.dll" ) ),
|
||||
#if defined( UNICODE )
|
||||
GetProcAddress( GetModuleHandle( hb_iswin9x() ? TEXT( "unicows.dll" ) : TEXT( "kernel32.dll" ) ),
|
||||
"GetDiskFreeSpaceExW" );
|
||||
#else
|
||||
GetProcAddress( GetModuleHandle( TEXT( "kernel32.dll" ) ),
|
||||
"GetDiskFreeSpaceExA" );
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ HB_FUNC( HB_DISKSPACE )
|
||||
|
||||
LPTSTR lpPath = HB_TCHAR_CONVTO( szPath );
|
||||
|
||||
#if defined( HB_OS_WIN_CE ) || defined( HB_NO_WIN95 )
|
||||
#if defined( HB_OS_WIN_CE )
|
||||
|
||||
fResult = GetDiskFreeSpaceEx( lpPath,
|
||||
( PULARGE_INTEGER ) &i64FreeBytesToCaller,
|
||||
@@ -224,10 +224,11 @@ HB_FUNC( HB_DISKSPACE )
|
||||
{
|
||||
s_fInit = HB_TRUE;
|
||||
s_pGetDiskFreeSpaceEx = ( P_GDFSE )
|
||||
GetProcAddress( GetModuleHandle( TEXT( "kernel32.dll" ) ),
|
||||
#if defined( UNICODE )
|
||||
GetProcAddress( GetModuleHandle( hb_iswin9x() ? TEXT( "unicows.dll" ) : TEXT( "kernel32.dll" ) ),
|
||||
"GetDiskFreeSpaceExW" );
|
||||
#else
|
||||
GetProcAddress( GetModuleHandle( TEXT( "kernel32.dll" ) ),
|
||||
"GetDiskFreeSpaceExA" );
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user