Click here to Skip to main content
Licence CPOL
First Posted 16 Feb 2006
Views 28,430
Downloads 868
Bookmarked 15 times

System Name and IP Address

By | 16 Feb 2006 | Article
Program to get System Name and IP Address
Sample Image - SystemInfo.jpg

Introduction

The application is created to get an IP Address of a system. Also it gets the name of the System.

Used DLLs are as follows:

Private Declare Function WSAGetLastError Lib "WSOCK32.DLL" () As Long
Private Declare Function WSAStartup Lib "WSOCK32.DLL" _
        (ByVal wVersionRequired&, lpWSAData As WSADATA) As Long
Private Declare Function WSACleanup Lib "WSOCK32.DLL" () As Long
Private Declare Function gethostname Lib "WSOCK32.DLL" _
        (ByVal hostname$, ByVal HostLen&) As Long
Private Declare Function gethostbyname Lib "WSOCK32.DLL" _
        (ByVal hostname$) As Long
Private Declare Sub RtlMoveMemory Lib "KERNEL32" _
        (hpvDest As Any, ByVal hpvSource&, ByVal cbCopy&)

Used const variables are as follows:

Private Const WS_VERSION_REQD = &H101
Private Const WS_VERSION_MAJOR = WS_VERSION_REQD \ &H100 And &HFF&
Private Const WS_VERSION_MINOR = WS_VERSION_REQD And &HFF&
Private Const MIN_SOCKETS_REQD = 1
Private Const SOCKET_ERROR = -1
Private Const WSADescription_Len = 256
Private Const WSASYS_Status_Len = 128

It's a simple project that will help you a little more to boost you up.

History

  • 17th February, 2006: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Muhammad Ghufran

Team Leader

Pakistan Pakistan

Member

Muhammad Ghufran is working as Team Lead in a
Multinational Company.
He has done his Software Engineering degree of 4 Years.
He has certified MCAD for .NET 1.1 and MCSD for .NET 1.1.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 17 Feb 2006
Article Copyright 2006 by Muhammad Ghufran
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid