2009-05-22 12:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/source/debug/debugger.prg
    * minor simplification

  * harbour/contrib/rddsql/sddodbc/odbcdd.c
    ! added dummy unicode conversion macros to fix compilation in
      non windows builds

  * harbour/contrib/hbwin/olecore.c
    ! casting

  * harbour/contrib/hbwin/axcore.c
    ! fixed unicode and WinCE compilation
    ! casting
This commit is contained in:
Przemyslaw Czerpak
2009-05-22 09:59:20 +00:00
parent 50cbafe49d
commit f0dd3aa312
5 changed files with 42 additions and 13 deletions

View File

@@ -17,6 +17,21 @@
past entries belonging to these authors: Viktor Szakats.
*/
2009-05-22 12:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/debug/debugger.prg
* minor simplification
* harbour/contrib/rddsql/sddodbc/odbcdd.c
! added dummy unicode conversion macros to fix compilation in
non windows builds
* harbour/contrib/hbwin/olecore.c
! casting
* harbour/contrib/hbwin/axcore.c
! fixed unicode and WinCE compilation
! casting
2009-05-22 10:21 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/rddsql/sddodbc/odbcdd.c
! Added UNICODE support to the extent it compiles. Please

View File

@@ -53,10 +53,20 @@
#include "hbwinole.h"
#if defined( HB_OS_WIN_CE )
#define HBTEXT( x ) TEXT( x )
#else
#define HBTEXT( x ) x
#endif
typedef BOOL ( CALLBACK * PHB_AX_WININIT )( void );
typedef BOOL ( CALLBACK * PHB_AX_WINTERM )( void );
typedef HRESULT ( CALLBACK * PHB_AX_GETCTRL )( HWND, IUnknown** );
static HMODULE s_hLib = NULL;
static BOOL ( CALLBACK *s_pAtlAxWinTerm )( void );
static HRESULT ( CALLBACK *s_pAtlAxGetControl )( HWND, IUnknown** );
static PHB_AX_WINTERM s_pAtlAxWinTerm = NULL;
static PHB_AX_GETCTRL s_pAtlAxGetControl = NULL;
static void hb_ax_exit( void* cargo )
@@ -78,20 +88,19 @@ static void hb_ax_exit( void* cargo )
static int hb_ax_init( void )
{
BOOL ( CALLBACK *pAtlAxWinInit )( void );
PHB_AX_WININIT pAtlAxWinInit;
if( s_hLib == NULL )
{
s_hLib = LoadLibrary( "atl.dll" );
s_hLib = LoadLibrary( TEXT( "atl.dll" ) );
if( ( unsigned long ) s_hLib <= 32 )
{
s_hLib = NULL;
return 0;
}
pAtlAxWinInit = GetProcAddress( s_hLib, "AtlAxWinInit" );
s_pAtlAxWinTerm = GetProcAddress( s_hLib, "AtlAxWinTerm" );
s_pAtlAxGetControl = GetProcAddress( s_hLib, "AtlAxGetControl" );
pAtlAxWinInit = ( PHB_AX_WININIT ) GetProcAddress( s_hLib, HBTEXT( "AtlAxWinInit" ) );
s_pAtlAxWinTerm = ( PHB_AX_WINTERM ) GetProcAddress( s_hLib, HBTEXT( "AtlAxWinTerm" ) );
s_pAtlAxGetControl = ( PHB_AX_GETCTRL ) GetProcAddress( s_hLib, HBTEXT( "AtlAxGetControl" ) );
if( pAtlAxWinInit )
( *pAtlAxWinInit )();
@@ -319,10 +328,10 @@ HB_FUNC( __AXREGISTERHANDLER ) /* ( pDisp, bHandler ) --> pSink */
if( lOleError == S_OK )
{
pSink = ( ISink* ) hb_gcAlloc( sizeof( ISink ), hb_sink_destructor ); /* TODO: GlobalAlloc GMEM_FIXED ??? */
pSink->lpVtbl = &ISink_Vtbl;
pSink->lpVtbl = ( IDispatchVtbl * ) &ISink_Vtbl;
pSink->count = 2; /* 1 for pCP->Advice() param and 1 for Harbour collectible pointer [Mindaugas] */
pSink->pItemHandler = hb_itemNew( pItemBlock );
#if HB_OLE_C_API
lOleError = pCP->lpVtbl->Advise( pCP, ( IUnknown* ) pSink, &dwCookie );
#else
@@ -330,7 +339,7 @@ HB_FUNC( __AXREGISTERHANDLER ) /* ( pDisp, bHandler ) --> pSink */
#endif
pSink->pConnectionPoint = pCP;
pSink->dwCookie = dwCookie;
hb_retptrGC( pSink );
}
#if HB_OLE_C_API

View File

@@ -733,7 +733,7 @@ HB_FUNC( WIN_OLEERRORTEXT )
{
char buf[ 16 ];
hb_snprintf( buf, 16, "0x%08x", lOleError );
hb_snprintf( buf, 16, "0x%08x", ( UINT ) ( HB_PTRUINT ) lOleError );
hb_retc( buf );
}
}

View File

@@ -60,6 +60,11 @@
#include <sql.h>
#include <sqlext.h>
#if !defined( HB_OS_WIN )
# define HB_TCHAR_CONVTO( s ) ( ( char * ) ( s ) )
# define HB_TCHAR_FREE( s ) HB_SYMBOL_UNUSED( s )
#endif
static HB_ERRCODE odbcConnect( SQLDDCONNECTION* pConnection, PHB_ITEM pItem );
static HB_ERRCODE odbcDisconnect( SQLDDCONNECTION* pConnection );
static HB_ERRCODE odbcExecute( SQLDDCONNECTION* pConnection, PHB_ITEM pItem );

View File

@@ -1722,7 +1722,7 @@ METHOD LoadVars() CLASS HBDebugger // updates monitored variables
FOR n := nCount TO 1 STEP -1
xValue := __mvDbgInfo( HB_MV_PRIVATE, n, @cName )
IF ! cName $ hSkip
AAdd( aBVars, { cName, xValue, "Private" + iif( m > 0, "", "^" ) } )
AAdd( aBVars, { cName, xValue, iif( m > 0, "Private", "Private^" ) } )
hSkip[ cName ] := NIL
ENDIF
--m