2008-06-27 15:43 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbwhat32/wincorec.c
* contrib/hbwhat32/_winwnd.c
* contrib/hbwhat32/wincore.prg
+ hb_retnl()/hb_parnl() calls replaced with hb_retptr()/hb_parptr().
This way it won't break on Win64.
; NOTE1: Functions dealing with wndproc/dlgproc functions on the
Harbour level will now return/require POINTER types instead
of numerics. App level code should be updated accordingly.
INCOMPATIBLE.
; NOTE2: There might be other places in hbwhat32 where such conversion
would be necessary.
; Please test.
This commit is contained in:
@@ -8,6 +8,20 @@
|
||||
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2008-06-27 15:43 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* contrib/hbwhat32/wincorec.c
|
||||
* contrib/hbwhat32/_winwnd.c
|
||||
* contrib/hbwhat32/wincore.prg
|
||||
+ hb_retnl()/hb_parnl() calls replaced with hb_retptr()/hb_parptr().
|
||||
This way it won't break on Win64.
|
||||
; NOTE1: Functions dealing with wndproc/dlgproc functions on the
|
||||
Harbour level will now return/require POINTER types instead
|
||||
of numerics. App level code should be updated accordingly.
|
||||
INCOMPATIBLE.
|
||||
; NOTE2: There might be other places in hbwhat32 where such conversion
|
||||
would be necessary.
|
||||
; Please test.
|
||||
|
||||
2008-06-27 14:58 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/source/pp/ppcore.c
|
||||
! fixed GPF in expressions like:
|
||||
|
||||
@@ -192,7 +192,7 @@ HB_FUNC( DEFFRAMEPROC )
|
||||
|
||||
HB_FUNC( CALLWINDOWPROC )
|
||||
{
|
||||
hb_retnl( CallWindowProc( (WNDPROC) hb_parnl(1), (HWND) hb_parnl(2), hb_parni(3), hb_parnl(4), hb_parnl(5)));
|
||||
hb_retnl( CallWindowProc( (WNDPROC) hb_parptr(1), (HWND) hb_parnl(2), hb_parni(3), hb_parnl(4), hb_parnl(5)));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1005,7 +1005,7 @@ HB_FUNC( ADJUSTWINDOWRECTEX )
|
||||
|
||||
HB_FUNC( GETWINDOWLONGPTR )
|
||||
{
|
||||
hb_retnl( (LONG) GetWindowLongPtr( (HWND) hb_parnl( 1 ), hb_parni( 2 ) ) ) ;
|
||||
hb_retptr( ( void * ) GetWindowLongPtr( (HWND) hb_parnl( 1 ), hb_parni( 2 ) ) ) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1015,7 +1015,7 @@ HB_FUNC( SETWINDOWLONGPTR )
|
||||
{
|
||||
hb_retnl( (LONG) SetWindowLongPtr( (HWND) hb_parnl( 1 ),
|
||||
hb_parni( 2 ) ,
|
||||
(LONG_PTR) hb_parnl(3)
|
||||
ISPOINTER( 3 ) ? (LONG_PTR) hb_parptr( 3 ) : (LONG_PTR) hb_parnl( 3 )
|
||||
) ) ;
|
||||
}
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@ Function _ProcessMsg( hWnd, nMsg, nwParam, nlParam, nIndex )
|
||||
// bypass Windows procedure chain, where applicable
|
||||
|
||||
nProc := aProc[ nIndex ]
|
||||
If n > 0
|
||||
If !Empty( n )
|
||||
nType := aWindow[ n, 2 ]
|
||||
Do While ( i := aScan( aWindow[ n, 3 ] , { | x | nProc == x[ 3 ] } ) ) > 0 // does custom procedure exist ?
|
||||
anWM := aWindow[ n, 3, i, 1 ]
|
||||
@@ -605,8 +605,8 @@ Function SetProcedure( hWnd, bAction, anWM, oObj, xCargo )
|
||||
EndIf
|
||||
Next
|
||||
|
||||
If nProc != 0
|
||||
SetWindowLong( hWnd, GWL_WNDPROC, nProc )
|
||||
If !Empty( nProc )
|
||||
SetWindowLongPtr( hWnd, GWL_WNDPROC, nProc )
|
||||
If Empty( anWM )
|
||||
anWM := { 0 }
|
||||
ElseIf ValType( anWM ) == "N"
|
||||
@@ -643,7 +643,7 @@ Function ResetProcedure( hWnd, nProc )
|
||||
aSize( aWindow[ n, 3 ] , 0 )
|
||||
EndIf
|
||||
If nProc != 0
|
||||
SetWindowLong( hWnd, GWL_WNDPROC, nProc )
|
||||
SetWindowLongPtr( hWnd, GWL_WNDPROC, nProc )
|
||||
lRet := .T.
|
||||
EndIf
|
||||
EndIf
|
||||
@@ -655,7 +655,7 @@ Function ResetProcedure( hWnd, nProc )
|
||||
aDel( aWindow[ n, 3 ] , i )
|
||||
aSize( aWindow[ n, 3 ] , Len( aWindow[ n, 3 ] ) - 1 )
|
||||
EndDo
|
||||
SetWindowLong( hWnd, GWL_WNDPROC, nProc )
|
||||
SetWindowLongPtr( hWnd, GWL_WNDPROC, nProc )
|
||||
lRet := .T.
|
||||
EndIf
|
||||
|
||||
|
||||
@@ -429,47 +429,47 @@ HB_FUNC( GETWNDPROC )
|
||||
switch ( hb_parni(1) )
|
||||
{
|
||||
case 10:
|
||||
hb_retnl( (ULONG) __WndProc10 ) ;
|
||||
hb_retptr( __WndProc10 ) ;
|
||||
return ;
|
||||
|
||||
case 9:
|
||||
hb_retnl( (ULONG) __WndProc9 ) ;
|
||||
hb_retptr( __WndProc9 ) ;
|
||||
return ;
|
||||
|
||||
case 8:
|
||||
hb_retnl( (ULONG) __WndProc8 ) ;
|
||||
hb_retptr( __WndProc8 ) ;
|
||||
return ;
|
||||
|
||||
case 7:
|
||||
hb_retnl( (ULONG) __WndProc7 ) ;
|
||||
hb_retptr( __WndProc7 ) ;
|
||||
return ;
|
||||
|
||||
case 6:
|
||||
hb_retnl( (ULONG) __WndProc6 ) ;
|
||||
hb_retptr( __WndProc6 ) ;
|
||||
return ;
|
||||
|
||||
case 5:
|
||||
hb_retnl( (ULONG) __WndProc5 ) ;
|
||||
hb_retptr( __WndProc5 ) ;
|
||||
return ;
|
||||
|
||||
case 4:
|
||||
hb_retnl( (ULONG) __WndProc4 ) ;
|
||||
hb_retptr( __WndProc4 ) ;
|
||||
return ;
|
||||
|
||||
case 3:
|
||||
hb_retnl( (ULONG) __WndProc3 ) ;
|
||||
hb_retptr( __WndProc3 ) ;
|
||||
return ;
|
||||
|
||||
case 2:
|
||||
hb_retnl( (ULONG) __WndProc2 ) ;
|
||||
hb_retptr( __WndProc2 ) ;
|
||||
return ;
|
||||
|
||||
case 1:
|
||||
hb_retnl( (ULONG) __WndProc ) ;
|
||||
hb_retptr( __WndProc ) ;
|
||||
return ;
|
||||
|
||||
default:
|
||||
hb_retnl( (ULONG) 0 ) ;
|
||||
hb_retptr( NULL ) ;
|
||||
return ;
|
||||
|
||||
}
|
||||
@@ -481,7 +481,7 @@ HB_FUNC( GETWNDPROC )
|
||||
|
||||
HB_FUNC( _GETDLGPROC )
|
||||
{
|
||||
hb_retnl( (ULONG) __DlgProc ) ;
|
||||
hb_retptr( __DlgProc ) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -523,7 +523,7 @@ HB_FUNC( _DIALOGBOX )
|
||||
hb_retni( DialogBox( (ISNIL(1) ? GetModuleHandle(NULL) : (HINSTANCE) hb_parnl(1) ) ,
|
||||
(hb_parinfo(2)==HB_IT_STRING ? hb_parc(2) : MAKEINTRESOURCE( (WORD) hb_parni(2))) ,
|
||||
(ISNIL(3) ? NULL : (HWND) hb_parnl(3) ) ,
|
||||
(DLGPROC) hb_parnl(4)
|
||||
(DLGPROC) hb_parptr(4)
|
||||
));
|
||||
|
||||
}
|
||||
@@ -537,7 +537,7 @@ HB_FUNC( _DIALOGBOXINDIRECT )
|
||||
hb_retni( DialogBoxIndirect( (ISNIL(1) ? GetModuleHandle(NULL) : (HINSTANCE) hb_parnl(1) ) ,
|
||||
(LPDLGTEMPLATE) hb_parc(2) ,
|
||||
(ISNIL(3) ? NULL : (HWND) hb_parnl(3) ) ,
|
||||
(DLGPROC) hb_parnl(4)
|
||||
(DLGPROC) hb_parptr(4)
|
||||
));
|
||||
}
|
||||
|
||||
@@ -550,7 +550,7 @@ HB_FUNC( _CREATEDIALOG )
|
||||
hb_retnl( (ULONG) CreateDialog( (ISNIL(1) ? GetModuleHandle(NULL) : (HINSTANCE) hb_parnl(1) ) ,
|
||||
(hb_parinfo(2)==HB_IT_STRING ? hb_parc(2) : MAKEINTRESOURCE( (WORD) hb_parni(2))) ,
|
||||
(ISNIL(3) ? NULL : (HWND) hb_parnl(3) ) ,
|
||||
(DLGPROC) hb_parnl(4)
|
||||
(DLGPROC) hb_parptr(4)
|
||||
) );
|
||||
}
|
||||
|
||||
@@ -564,7 +564,7 @@ HB_FUNC( _CREATEDIALOGINDIRECT )
|
||||
(ISNIL(1) ? GetModuleHandle(NULL) : (HINSTANCE) hb_parnl(1) ) ,
|
||||
(LPDLGTEMPLATE) hb_parc(2) ,
|
||||
(ISNIL(3) ? NULL : (HWND) hb_parnl(3) ) ,
|
||||
(DLGPROC) hb_parnl(4)
|
||||
(DLGPROC) hb_parptr(4)
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user