Hi JLMartin!<br>
<br>
Hmmm. Two methods come to mind:<br>
<br>
1) Call the Winsock function htonl() or ntohl() depending on the direction you want to go<br>
<br>
2) Do something ugly (but removes dependency on Winsock) like:<br>
<br>
Dim s1, s2, s3, s4 as byte<br>
s1 = (Num And &HFF000000) / &H01000000<br>
s2 = (Num And &H00FF0000) / &H00010000<br>
s3 = (Num And &H0000FF00) / &H00000100<br>
s4 = Num And &H000000FF<br>
Num = (s4 * &H00100000) + (s3 * &H00010000) + (s2 * &H00000100) + s1<br>
<br>
NOTE: I haven't tested this code - you might need to play around with the AND statements, but it looks good.<br>
<br>
Chip H.<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.