[Bug 8822] VB6.0 program crashes
http://bugs.winehq.org/show_bug.cgi?id=8822 ------- Additional Comments From vladimiroski(a)gmail.com 2007-03-07 16:59 ------- I had located the problem, and I confirm it's a Wine bug. I'll try to explain (with VB6 code): APIs used: Public Declare Function SetTimer _ Lib "user32" (ByVal hwnd As Long, _ ByVal nIDEvent As Long, _ ByVal uElapse As Long, _ ByVal lpTimerFunc As Long) As Long Public Declare Function KillTimer _ Lib "user32" (ByVal hwnd As Long, _ ByVal nIDEvent As Long) As Long Usually, as you know, you call it by giving him the adress of the callback procedure. In this case: Sub TimerProc(ByVal HWnd As Long, ByVal uMsg As Long, _ ByVal nIDEvent As Long, ByVal dwTimer As Long) ' Code End Sub Then for example, you set the timer like this: ID_Timer = SetTimer(0&, 0&, 1000, AddressOf TimerProc) ................... Ok, so far all is good, but if the TimerProc is defined like a function instead a Sub it will crash in Wine (but it will be fine in Windows). Summary: Working Declaration: Public Sub TimerProc(ByVal HWnd As Long, ByVal uMsg As Long, _ ByVal nIDEvent As Long, ByVal dwTimer As Long) ' Code End Sub Declaration that makes program crash: Public Function TimerProc(ByVal HWnd As Long, ByVal uMsg As Long, _ ByVal nIDEvent As Long, ByVal dwTimer As Long) ' Code End Sub I can write some VB6 code tests that express the problem if anybody wants. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
participants (1)
-
Wine Bugs