OVH Cloud OVH Cloud

ip nr ???

3 réponses
Avatar
idalgo67
where can i find my ip number ???

3 réponses

Avatar
Zoury
Hi!

where can i find my ip number ???



look at this sample :

How to Resolve a Hostname Into an IP Address
http://www.mvps.org/vbnet/index.html?code/network/index.html


you can pass in your computer name wich can be obtain with the
GetComputerName() API function :

'***
Option Explicit

Private Declare Function GetComputerNameA _
Lib "kernel32" _
( _
ByVal lpBuffer As String, _
ByRef nSize As Long _
) As Long

Private Const MAX_COMPUTERNAME_LENGTH As Long = 31

Private Sub Form_Load()
Debug.Print GetComputerName
End Sub

Private Function GetComputerName() As String
Dim lSize As Long
lSize = MAX_COMPUTERNAME_LENGTH + 1
GetComputerName = String$(lSize, Chr$(0))
Call GetComputerNameA(GetComputerName, lSize)
GetComputerName = Left$(GetComputerName, lSize)
End Function
'***

or using the Environ$("COMPUTERNAME") function



BTW, this group is intended for french speaking (writing) people. If you
need english assistance, refer to an english speaking group..

Here's a little list to get you started :

With microsoft.public.vb
.general.dicussion
.winapi
.winapi.graphics
.controls
.syntax
End With

Hope this helps


--
Best Regards
Yanick Lefebvre - Microsoft Visual basic MVP

Please posts answers to the group so all can benefit
Avatar
ng
héhé pas mal ton

With microsoft.public.vb
.general.dicussion
.winapi
.winapi.graphics
.controls
.syntax
End With

^^


"Zoury" <yanick_lefebvre at hotmail dot com> a écrit dans le message de
news:
Hi!

> where can i find my ip number ???

look at this sample :

How to Resolve a Hostname Into an IP Address
http://www.mvps.org/vbnet/index.html?code/network/index.html


you can pass in your computer name wich can be obtain with the
GetComputerName() API function :

'***
Option Explicit

Private Declare Function GetComputerNameA _
Lib "kernel32" _
( _
ByVal lpBuffer As String, _
ByRef nSize As Long _
) As Long

Private Const MAX_COMPUTERNAME_LENGTH As Long = 31

Private Sub Form_Load()
Debug.Print GetComputerName
End Sub

Private Function GetComputerName() As String
Dim lSize As Long
lSize = MAX_COMPUTERNAME_LENGTH + 1
GetComputerName = String$(lSize, Chr$(0))
Call GetComputerNameA(GetComputerName, lSize)
GetComputerName = Left$(GetComputerName, lSize)
End Function
'***

or using the Environ$("COMPUTERNAME") function



BTW, this group is intended for french speaking (writing) people. If you
need english assistance, refer to an english speaking group..

Here's a little list to get you started :

With microsoft.public.vb
.general.dicussion
.winapi
.winapi.graphics
.controls
.syntax
End With

Hope this helps


--
Best Regards
Yanick Lefebvre - Microsoft Visual basic MVP

Please posts answers to the group so all can benefit




Avatar
Zoury
hehe! c'était plus *tellement* plus rapide. ;O)