Jump to content

j0kky
 Share

Recommended Posts

Which Operative System and Service Pack do you have?

EDIT:

And what happens if you click on "both" and then on show? Is it the same output of "IPv4"?

Edited by j0kky
Link to comment
Share on other sites

@Spider001: thank you for the feedback, there is an error in _WinApi_GetString documentation:

 

If the pointer is incorrect, _WinAPI_GetString() does not set the @error flag but always returns an empty string.

False, if the pointer is incorrect or the buffer is empty, it sets @error to 10, example:

_WinAPI_GetString(Ptr(0))
_WinAPI_GetString(Ptr(Random(1, 10000)))

always return an empty string and set @error to 10.

I've modified suitably the UDF in the first post :)

Test it and report any bug, please!

Link to comment
Share on other sites

Finally I solved the issue with Windows XP:

WSAAddressToString on WinXP doesn't like the Null pointer as fourth parameter:

$aRet = DllCall($hWs2_32, "int", "WSAAddressToString", "ptr", $plpSockaddr, "int", $iSockaddrLength, "ptr", Null, "ptr", Null, "dword*", 0)

so, this is the workaround:

$aRet = DllCall($hWs2_32, "int", "WSAAddressToString", "ptr", $plpSockaddr, "int", $iSockaddrLength, "ptr", Null, "byte*", Null, "dword*", 0)

I've edited the first post with the correct UDF and the new example script.

Thanks to Spider001 for testing my scripts :)

Test it and report any bug in this topic, please!

Edited by j0kky
Link to comment
Share on other sites

  • 4 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...