validate IPV6 address in windows using c++

I know there is a function inet_tpon for unix platforms to validate ipv6 addresses.But i need an equivalent of windows.When i use this function with the header file <winsock2.h> the visual studio 2005 on win2003 issues an error saying identifier not found

:confused:

Not sure if this guide will help you. It has been a long while since I experimented with IPv6.

IPv6 Guide for Windows Sockets Applications (Windows)

Look at the "function calls" section.

-----Post Update-----

By the way, I found this:

My problem is that inet_pton function is not working with Visual studio

If you have actually taken the time to look at the link I gave you (likely you didn't as you replied so quickly), you'll find that the documentation indicates that function is only available since Vista or Windows Server 2008. That may explain why it doesn't work for you. And it requires another header, not winsock2.h. They're all written in the documentation.

Please take a look at that guide thoroughly and I think there must be another way to achieve what you want on Windows without using inet_pton. Windows is a different animal from Unix and you cannot always expect to use the same code as you do on Unix, and then you must seek alternatives.