Hi Pritpal,
; TOFIX: HBWhat.lib is not usable as is still. Viktor, please examine these two functions in wincorec.c HB_FUNC( WHT__GETDLGPROC ) BOOL CALLBACK __DlgProc( H... ) where I have changed the casts to original code. Only then I could get it worked. It is only for WHT_DialogBox() and I am sure until we fix it no other component will work. It should be easy, IMO, just I do not know the whole story. Probably the above change will not let HbWhat to be compliled by other compilers or they will produce warnings.
Okay, I may check this later, but it's difficult without test code. Anyway I'd prefer if you could maintain this, and I'd appreciate if your could even fix it where may got broken, since you know this lib much better than anyone else. For the story, basically it was not about warnings, it was about general 64-bit Windows compatibility. When you compile it with 64-bit MSVC compiler, you'll get warnings of course and these may help finding places with potential problems. Generally speaking most problems were due to Windows handles (pointers), LPARAM, WPARAM, LRESULT being 64-bit values, while in hbwhat code these were stored and passed as longs (and sometimes as ints). longs/ints in 64-bit Windows are still 32-bit, so truncation would occur which can easily be a problem. To fix that, all places where hbwhat code uses long/int should have been changed to variables and APIs passing 64-bit values. This typically means to change hb_parnl() to hb_parnint()/hb_parptr(), and hb_retnl() to hb_retnint()/hb_retptr(). Plus add the required casts (since *int() are counting as values not pointers), and where pointer arithmetic is done. That being said, the problem in hand is probably that WHT__GETDLGPROC() was using an explicit hb_retptr() call, while it should have been HB_RETWI( __DlgProc ). Please replace current hb_retnl( ( ULONG ) __DlgProc ) with hb_retnint( __DlgProc ) and see if it works. BTW, may I kindly ask you to use ANSI comments instead of C++ style ones. Brgds, Viktor _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour