Click to See Complete Forum and Search --> : Winsock: Div by Zero Error
February 24th, 2000, 10:23 PM
I am using someone's winsock module that gives me my ip and hostname. Whether or not it is imperative that you know the source, I am not sure. Anyways, when I run the program in vb it has no problems and runs as expected but... theres always a but... when I compile it and then run it my program doesnt work. Windows pops up one of those cute little windows to tell me...
Error Div by Zero
If anyone can help I would appreciate very much. And if sending you the source will help... please just ask.
fard0wn@hotmail.com
Cakkie
February 24th, 2000, 11:56 PM
Taking a look at the source code wouldn't be a bad idea. I've written several applications using the winsock, including one to get the hostname and ip, but never encounterd such error. My guess is that the program does some calculations wich cause the error. Try posting (or mailing) the COMPLETE code, and I'll have a look.
Tom Cannaerts
slisse@planetinternet.be
The best way to escape a problem, is to solve it.
Cakkie
February 25th, 2000, 12:57 AM
When compiled your code, and running, all works fine, but I took a look at the code and found only 2 divisions, so the problem is in one of them (or both)
public const WS_VERSION_Major as long = WS_VERSIONREQD \ &H100 And &HFF&
' this will give WS_VERSION_MAJOR the value = 1, so the problem isn't here
' however, &h100 and &hff& equals 0. Wich can have led to the error
The other division is wParam \ &h100 and &hff&
Tom Cannaerts
slisse@planetinternet.be
The best way to escape a problem, is to solve it.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.