PDA

View Full Version : API Function (NetServerGetInfo) การ Get OS Information



caznova
16-01-2008, 09:53 AM
คือผมไปเห็น Topic (http://citecclub.org/forum/index.php?showtopic=18671) นี้แล้วดันตอบในนั้นไม่ได้อะคับ



ใช้ API Function NetServerGetInfo (http://msdn2.microsoft.com/en-us/library/aa370624.aspx)
เข้าไปดูรายละเอียดได้ใน link ของ msdn

คือแบบใส่ IP แล้ว Get พวก PlatformID,Version,Hostname,Type,Comment
มี Code ที่ฝรั่ง เค้าทำมาแล้วดังนี้

[hide=1]
[code]
API Function (NetServerGetInfo) การ Get OS Information

การ Get OS Information ของ Windows โดยใช้แค่ IP หรือ Hostname

คือผมไปเห็น Topic http://citecclub.org/forum/index.php?showtopic=18671 นี้แล้วดันตอบในนั้นไม่ได้นะครับ


[DllImport("netapi32.dll", ExactSpelling=true)]
unsafe public static extern int NetServerGetInfo(