Click here to Skip to main content
Click here to Skip to main content
Go to top

System Name and IP Address

, 16 Feb 2006
Rate this:
Please Sign up or sign in to vote.
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)

Share

About the Author

Muhammad Ghufran
Team Leader
Pakistan Pakistan
Muhammad Ghufran is working as Team Lead in a
Multinational Company.

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web02 | 2.8.140926.1 | Last Updated 17 Feb 2006
Article Copyright 2006 by Muhammad Ghufran
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid