RE: How to get a local Ip address using lotusscript?
Posted by Wes Richardson on 21.Sep.01 at 03:16 using a Web browser
Category: Domino Designer -- Editor ElementsRelease: 5.0.5Platform: All Platforms
Hi Ruby
I searched this forum and got this information.
In the Declarations insert the following code:
Type HOSTENT
hName As Long
hAliases As Long
hAddrType As Integer
hLen As Integer
hAddrList As Long
End Type
Declare Function gethostname Lib "WSOCK32.DLL" (Byval szHost As String, Byval dwHostLen As Long) As Long
Declare Function gethostbyname Lib "WSOCK32.DLL" (Byval szHost As String) As Long
Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (hpvDest As Any, Byval hpvSource As Long, Byval cbCopy As Long)
The rest of the code can be put where you need it :
Dim HostName As String * 256
Dim HostPointer As Long
Dim HostStruct As HOSTENT
Dim HostAddressPointer As Long
Dim HostAddress As Long
Dim AddressNum As String
Dim Address As String