Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Afficher les connexions distantes

1 réponse
Avatar
Ben Mansour Wassef
Bonjour,

Comment peut-on faire apparaitre la fenêtre
'Connexion d'accés à distance' (Ras)

wassef

1 réponse

Avatar
Gilles TOURREAU [MVP]
"Ben Mansour Wassef" a écrit dans le message de
news:
Bonjour,

Comment peut-on faire apparaitre la fenêtre
'Connexion d'accés à distance' (Ras)

wassef




En utilisant les méthodes non-mangées :

<DllImport("Rasdlg.dll", SetLastError := True, CharSet := CharSet.Auto)> _
Public Shared Function RasDialDlg(ByVal phoneBook As String, ByVal entryName
As String, ByVal phoneNumber As String, ByRef info As RASDIALDLG) As Boolean
End Function

<StructLayout(LayoutKind.Sequential, Pack := 4, CharSet := CharSet.Auto)> _
Public Structure RASDIALDLG
Public dwSize As Integer
Public hwndOwner As IntPtr
Public dwFlags As Integer
Public xDlg As Integer
Public yDlg As Integer
Public dwSubEntry As Integer
Public dwError As Integer
Public reserved As IntPtr
Public reserved2 As IntPtr
End Structure

Shared Sub Main(ByVal args As String())
Dim info As New RASDIALDLG()
info.dwSize = Marshal.SizeOf(info)
Dim ret As Boolean = RasDialDlg(Nothing, "Nom de votre connection",
Nothing, info)
If ret = False Then
'Problème !
End If

End Sub

Plus d'informations ici :
http://msdn2.microsoft.com/en-us/library/aa377020.aspx

Cordialement

--
Gilles TOURREAU - MVP C#


S.A.R.L. P.O.S
Le spécialiste en motoculture depuis + de 30 ans !
http://www.pos.fr