I found another problem which seems to be related to REGISTER.
Unlike the previous bug I reported, this one happens in PB 6.0,
but not 5.0. Also unlike the other bug, it does not give a
wrong result. Instead it just crashes (the Windows messages
box pops up which says: "This program has performed an illegal
operation and will be shut down..."). I am using Windows 98 on
a Pentium III.
I have simplified and modified the problematic code to the
following. Hopefully someone else can try to duplicate the
error on their system. I noticed that removing the
"$Register All" line seems to solve the problem.
------------------
Daniel Corbier
UCalc Fast Math Parser
http://www.ucalc.com
Unlike the previous bug I reported, this one happens in PB 6.0,
but not 5.0. Also unlike the other bug, it does not give a
wrong result. Instead it just crashes (the Windows messages
box pops up which says: "This program has performed an illegal
operation and will be shut down..."). I am using Windows 98 on
a Pentium III.
I have simplified and modified the problematic code to the
following. Hopefully someone else can try to duplicate the
error on their system. I noticed that removing the
"$Register All" line seems to solve the problem.
Code:
$Compile Exe "test.exe" $Register All DefLng A-Z Function DoSomething(MyString$) ' Any code goes here End Function Function WinMain (ByVal hCurInstance As Long, _ ByVal hPrevInstance As Long, _ lpszCmdLine As Asciiz Ptr, _ ByVal nCmdShow As Long) Export As Long MsgBox "Check point #1" i = DoSomething(MyString$) MsgBox "Check point #2: Doesn't reach this far" OtherString$ = Str$(AnyNumber##) End Function
Daniel Corbier
UCalc Fast Math Parser
http://www.ucalc.com
Comment