2008-06-11 16:22 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/hbw32/dllcall.c
* added casting of wOrdinal to HB_PTR_DIFF to avoid waring
* disabled asm code for WIN64 builds
* disabled asm code for WINCE builds
* disabled some code which breaks WINCE builds
; TODO: add support for WINCE/ARM and WIN64
* harbour/source/rtl/gtwvt/gtwvt.c
! always use literal strings inside TEXT() macro for UNICODE builds
This commit is contained in:
@@ -8,6 +8,17 @@
|
||||
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2008-06-11 16:22 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/contrib/hbw32/dllcall.c
|
||||
* added casting of wOrdinal to HB_PTR_DIFF to avoid waring
|
||||
* disabled asm code for WIN64 builds
|
||||
* disabled asm code for WINCE builds
|
||||
* disabled some code which breaks WINCE builds
|
||||
; TODO: add support for WINCE/ARM and WIN64
|
||||
|
||||
* harbour/source/rtl/gtwvt/gtwvt.c
|
||||
! always use literal strings inside TEXT() macro for UNICODE builds
|
||||
|
||||
2008-06-10 23:06 UTC+0800 Pritpal Bedi (pritpal@vouchcac.com
|
||||
* harbour/source/rtl/gtwvt/gtwvt.c
|
||||
! Fixed maximized state. Borders were missing.
|
||||
|
||||
@@ -239,6 +239,14 @@ RESULT DynaCall( int iFlags, LPVOID lpFunction, int nArgs,
|
||||
/* Call the specified function with the given parameters. Build a
|
||||
proper stack and take care of correct return value processing. */
|
||||
RESULT Res = { 0 };
|
||||
#if defined(HB_WINCE) || defined(_WIN64)
|
||||
HB_SYMBOL_UNUSED( iFlags );
|
||||
HB_SYMBOL_UNUSED( lpFunction );
|
||||
HB_SYMBOL_UNUSED( nArgs );
|
||||
HB_SYMBOL_UNUSED( Parm );
|
||||
HB_SYMBOL_UNUSED( pRet );
|
||||
HB_SYMBOL_UNUSED( nRetSiz );
|
||||
#else
|
||||
int i, nInd, nSize, nLoops;
|
||||
DWORD dwEAX, dwEDX, dwVal, * pStack, dwStSize = 0;
|
||||
BYTE * pArg;
|
||||
@@ -428,6 +436,7 @@ RESULT DynaCall( int iFlags, LPVOID lpFunction, int nArgs,
|
||||
|
||||
_asm mov esp, pESP
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return Res;
|
||||
}
|
||||
@@ -438,13 +447,13 @@ RESULT DynaCall( int iFlags, LPVOID lpFunction, int nArgs,
|
||||
|
||||
typedef struct _XPP_DLLEXEC
|
||||
{
|
||||
DWORD dwType; /* type info */
|
||||
char * cDLL; /* DLL */
|
||||
HMODULE hDLL; /* Handle */
|
||||
char * cProc; /* Ordinal or Name */
|
||||
WORD wOrdinal;
|
||||
DWORD dwFlags; /* Calling Flags */
|
||||
LPVOID lpFunc;
|
||||
DWORD dwType; /* type info */
|
||||
char * cDLL; /* DLL */
|
||||
HMODULE hDLL; /* Handle */
|
||||
char * cProc; /* function name */
|
||||
WORD wOrdinal; /* function ordinal */
|
||||
DWORD dwFlags; /* Calling Flags */
|
||||
LPVOID lpFunc;
|
||||
} XPP_DLLEXEC, * PXPP_DLLEXEC;
|
||||
|
||||
#define _DLLEXEC_SIGNATURE 0x45584543
|
||||
@@ -692,6 +701,7 @@ static void DllExec( int iFlags, int iRtype, LPVOID lpFunction, PXPP_DLLEXEC xec
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
#if !defined(HB_WINCE)
|
||||
static HB_GARBAGE_FUNC( _DLLUnload )
|
||||
{
|
||||
PXPP_DLLEXEC xec = ( PXPP_DLLEXEC ) Cargo;
|
||||
@@ -712,9 +722,11 @@ static HB_GARBAGE_FUNC( _DLLUnload )
|
||||
xec->dwType = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
HB_FUNC( DLLPREPARECALL )
|
||||
{
|
||||
#if !defined(HB_WINCE)
|
||||
PXPP_DLLEXEC xec = ( PXPP_DLLEXEC ) hb_gcAlloc( sizeof( XPP_DLLEXEC ), _DLLUnload );
|
||||
char * pszErrorText;
|
||||
|
||||
@@ -736,9 +748,9 @@ HB_FUNC( DLLPREPARECALL )
|
||||
hb_strncpy( xec->cProc, hb_parc( 3 ), hb_parclen( 3 ) );
|
||||
}
|
||||
else if( ISNUM( 3 ) )
|
||||
xec->wOrdinal = hb_parni( 3 );
|
||||
xec->wOrdinal = ( WORD ) hb_parni( 3 );
|
||||
|
||||
xec->lpFunc = ( LPVOID ) GetProcAddress( xec->hDLL, xec->cProc ? ( LPCSTR ) xec->cProc : ( LPCSTR ) xec->wOrdinal );
|
||||
xec->lpFunc = ( LPVOID ) GetProcAddress( xec->hDLL, xec->cProc ? ( LPCSTR ) xec->cProc : ( LPCSTR ) ( HB_PTR_DIFF ) xec->wOrdinal );
|
||||
|
||||
if( ! xec->lpFunc && xec->cProc ) /* try with ANSI suffix? */
|
||||
xec->lpFunc = ( LPVOID ) GetProcAddress( xec->hDLL, ( LPCSTR ) strcat( xec->cProc, "A" ) );
|
||||
@@ -762,6 +774,7 @@ HB_FUNC( DLLPREPARECALL )
|
||||
hb_gcFree( xec );
|
||||
|
||||
hb_errRT_BASE( EG_ARG, 2010, pszErrorText, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
#endif
|
||||
}
|
||||
|
||||
HB_FUNC( DLLLOAD )
|
||||
@@ -784,6 +797,11 @@ HB_FUNC( DLLEXECUTECALL )
|
||||
|
||||
static LPVOID hb_getprocaddress( HMODULE hDLL, int i )
|
||||
{
|
||||
#if defined(HB_WINCE)
|
||||
HB_SYMBOL_UNUSED( hDLL );
|
||||
HB_SYMBOL_UNUSED( i );
|
||||
return NULL;
|
||||
#else
|
||||
LPVOID lpFunction = ( LPVOID ) GetProcAddress( hDLL, ISCHAR( i ) ? ( LPCSTR ) hb_parc( i ) : ( LPCSTR ) hb_parni( i ) );
|
||||
|
||||
if( ! lpFunction && ISCHAR( i ) ) /* try with ANSI suffix? */
|
||||
@@ -795,6 +813,7 @@ static LPVOID hb_getprocaddress( HMODULE hDLL, int i )
|
||||
}
|
||||
|
||||
return lpFunction;
|
||||
#endif
|
||||
}
|
||||
|
||||
HB_FUNC( DLLCALL )
|
||||
|
||||
@@ -1723,7 +1723,7 @@ static void hb_gt_wvt_Init( PHB_GT pGT, FHANDLE hFilenoStdin, FHANDLE hFilenoStd
|
||||
/* Create "Mark" prompt in SysMenu to allow console type copy operation */
|
||||
{
|
||||
HMENU hSysMenu = GetSystemMenu( pWVT->hWnd, FALSE );
|
||||
AppendMenu( hSysMenu, MF_STRING, SYS_EV_MARK, "Mark and Copy" );
|
||||
AppendMenu( hSysMenu, MF_STRING, SYS_EV_MARK, TEXT( "Mark and Copy" ) );
|
||||
}
|
||||
|
||||
/* SUPER GT initialization */
|
||||
|
||||
Reference in New Issue
Block a user