IP address to Hostname in Excel
"Andrey G" wrote in message
Hi Peter,
I've tried running code with the last argument for CopyMemory changed, but
Excel still crashed. Please have a look below at the details of the
problem:
[snip]
'get the IP address
CopyMemory ptrAddress, ByVal ptrAddress, 8 '<----- Excel crashes
on this line!
CopyMemory ptrIPAddress, ByVal ptrAddress, 8
CopyMemory ptrIPAddress2, ByVal ptrIPAddress, 8
GetIPFromHostName = GetInetStrFromPtr(ptrIPAddress2)
End If
End Function
Hmm, not sure where the root of the problem is, though for me it crashes on
the second CopyMemory, I need to get the rest of the original example. I'll
try and look at it over the W/E.
Peter T
|