Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / Calling a DLL with an integer reference number

Author
Message
Xolatron old
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 29th Jul 2005 18:44
This is a very odd bug. If you load a dll with a reference number to it as an integer, calling the dll without recieving the return value will dramatically increase the value stored in the dll reference integer. This might just happen in a for-next loop, I'm not sure.

Example:
This code does not work:


This code does:


-Xol

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 29th Jul 2005 20:55
That's a weird one - confirmed

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Xolatron old
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 29th Jul 2005 21:01
Yes quite weird . This can also be avoided by having the reference variable be a byte.

-Xol

Keaz
20
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 29th Jul 2005 23:41
Thx that's solves one of my problems Xolo.

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
Xolatron old
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 29th Jul 2005 23:56 Edited at: 29th Jul 2005 23:57
You're welcome. I also ran into this in the Windows API: SendMessage always returns something, even though that something is often useless

-Xol

Keaz
20
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 30th Jul 2005 17:02 Edited at: 30th Jul 2005 17:11
It's not just the loop:
This fails as well with no loops:


It seems to happen when the dll returns a value and a return variable isn't specified as the variable "test" is changed to is my screen width in the case of the example and the height in this example:


Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
Xolatron old
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 30th Jul 2005 20:40
You're right, test becomes the returned value, I didn't notice that before.

-Xol

Keaz
20
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 3rd Aug 2005 22:48
P.S. It only occurs when you reference a function that returns a value but don't give a variable for it to return too. There are one of two fixes for this bug. One is simply don't let it return the value in which case the above code would do nothing but query without return and sendmessage would work properly. The other option is to require a value to return too or break the program. The second option forces the user to fix their code but the first option seems better as it allows commands like sendMessage without a return value sent to db.

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!

Login to post a reply

Server time is: 2024-03-28 12:20:36
Your offset time is: 2024-03-28 12:20:36