From 1ac3666cab0e0e48eb8ab3d718fdb2c6bccf58e7 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Tue, 10 Jun 2008 14:26:46 +0000 Subject: [PATCH] 2008-06-10 16:26 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/common/hbwince.c + added GetDriveTypeA() wrapper for WinCE builds * harbour/source/rtl/gtwvt/gtwvt.c ! changed wrongly used NULL to 0 * harbour/source/rtl/gtwvt/gtwvt.c * changed LoadLibrary() to LoadLibraryA() for UNICODE builds still some other code have to be updated for UNICODE builds. --- harbour/ChangeLog | 11 +++++++++++ harbour/contrib/hbw32/dllcall.c | 4 ++-- harbour/source/common/hbwince.c | 12 ++++++++++++ harbour/source/rtl/gtwvt/gtwvt.c | 6 +++--- 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e404000757..26ac80c216 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,17 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-06-10 16:26 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/common/hbwince.c + + added GetDriveTypeA() wrapper for WinCE builds + + * harbour/source/rtl/gtwvt/gtwvt.c + ! changed wrongly used NULL to 0 + + * harbour/source/rtl/gtwvt/gtwvt.c + * changed LoadLibrary() to LoadLibraryA() for UNICODE builds + still some other code have to be updated for UNICODE builds. + 2008-06-10 16:24 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * xhb/Makefile * xhb/common.mak diff --git a/harbour/contrib/hbw32/dllcall.c b/harbour/contrib/hbw32/dllcall.c index 345c7a1038..4d90a0ff4f 100644 --- a/harbour/contrib/hbw32/dllcall.c +++ b/harbour/contrib/hbw32/dllcall.c @@ -733,7 +733,7 @@ HB_FUNC( DLLPREPARECALL ) if( ISCHAR( 1 ) ) { xec->cDLL = hb_strdup( hb_parc( 1 ) ); - xec->hDLL = LoadLibrary( xec->cDLL ); + xec->hDLL = LoadLibraryA( xec->cDLL ); } else if( ISNUM( 1 ) ) xec->hDLL = ( HINSTANCE ) hb_parnl( 1 ); @@ -796,7 +796,7 @@ HB_FUNC( DLLCALL ) if( ISCHAR( 1 ) ) { - hInst = LoadLibrary( hb_parc( 1 ) ); + hInst = LoadLibraryA( hb_parc( 1 ) ); lUnload = TRUE; } else diff --git a/harbour/source/common/hbwince.c b/harbour/source/common/hbwince.c index 1f8ee235de..c09e6b3f43 100644 --- a/harbour/source/common/hbwince.c +++ b/harbour/source/common/hbwince.c @@ -502,6 +502,18 @@ DWORD WINAPI GetFileAttributesA( LPCSTR path ) return dw; } +UINT WINAPI GetDriveTypeA( LPCSTR filename ) +{ + LPWSTR wpath; + UINT ui + + wpath = hb_mbtowc( path ); + ui = GetDriveTypeW( wpath ); + hb_xfree( wpath ); + + return ui; +} + BOOL WINAPI GetVersionExA( OSVERSIONINFOA * v ) { OSVERSIONINFOW wv; diff --git a/harbour/source/rtl/gtwvt/gtwvt.c b/harbour/source/rtl/gtwvt/gtwvt.c index 34f5e52d0f..bfb38bc43e 100644 --- a/harbour/source/rtl/gtwvt/gtwvt.c +++ b/harbour/source/rtl/gtwvt/gtwvt.c @@ -2259,9 +2259,9 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) style = WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_BORDER; SetWindowLongPtr( pWVT->hWnd, GWL_STYLE, style ); - SetWindowPos( pWVT->hWnd, NULL, NULL, NULL, NULL, NULL, - SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE | - SWP_NOSIZE | SWP_NOZORDER | SWP_DEFERERASE ); + SetWindowPos( pWVT->hWnd, NULL, 0, 0, 0, 0, + SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE | + SWP_NOSIZE | SWP_NOZORDER | SWP_DEFERERASE ); ShowWindow( pWVT->hWnd, SW_HIDE ); ShowWindow( pWVT->hWnd, SW_NORMAL ); pWVT->bResizable = bNewValue;