|
-
February 24th, 2000, 11:23 PM
#1
Winsock: Div by Zero Error
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.
[email protected]
-
February 25th, 2000, 12:56 AM
#2
Re: Winsock: Div by Zero Error
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
[email protected]
The best way to escape a problem, is to solve it.
-
February 25th, 2000, 01:57 AM
#3
Re: Winsock: Div by Zero Error
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
[email protected]
The best way to escape a problem, is to solve it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|