Getting crash when calling CallWindowProc() function in Migration from VS6.0 to VS2015

  • Thread starter Thread starter Ram Keerthi
  • Start date Start date
R

Ram Keerthi

Guest
Hi,

I am working on migrating Win32 application from VC++6.0 to VS2015. The code compiled properly. But getting crash when we are pressing button at client machine but not in developer machines. I analysed the crash dump through WinDbg and seen the crash is happening below code at CallWindowProc().Here seems we are setting User define window processor to controls instead of default window processors through below code.


extern FARPROC lpfnOldTimeEditProc ;
extern FARPROC lpfnTimeEditProc ;
lpfnTimeEditProc =
MakeProcInstance ((FARPROC) TimeEditProc , hInst) ;
lpfnOldTimeEditProc = (
FARPROC) GetWindowLong ( sTaskInfo [ IDC_TIME_EDIT_ID ].hWnd , GWL_WNDPROC) ;
SetWindowLong (sTaskInfo [ IDC_TIME_EDIT_ID ].hWnd ,
GWL_WNDPROC ,
(
LONG) lpfnTimeEditProc) ;
return (CallWindowProc ((WNDPROC)lpfnOldTimeEditProc,
hWnd,
message,
wParam,
lParam));

Please let me know if any one faced crash issue for the above code.

Regards,
RKeerthi.

Continue reading...
 
Back
Top