PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2025 → utiliser une DLL -net externe
utiliser une DLL -net externe
Iniciado por rroche, 11,jun. 2020 15:01 - No hay respuesta
Publicado el 11,junio 2020 - 15:01
Bonjour à tous
J'essaie désepérement d'utiliser une DLL ,net externe.
ma DLL a été cree ainsi:
Son nom ALE_REST

Imports System.IO
Imports System
Imports System.Net

Public Class ALEREST

Public Function ALE(ByVal Topic As String) As String
' Create a request for the URL.
ServicePointManager.ServerCertificateValidationCallback = Function() True
Dim request As WebRequest =
WebRequest.Create("https://10.145.29.234/api/v1/" & Topic)
' If required by the server, set the credentials.
request.Credentials = New NetworkCredential("Admin", "mmmmm")
' Get the response.
Dim response As WebResponse = request.GetResponse()
' Display the status.
'Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
' Get the stream containing content returned by the server.
Dim dataStream As Stream = response.GetResponseStream()
' Open the stream using a StreamReader for easy access.
Dim reader As New StreamReader(dataStream)
' Read the content.
Dim responseFromServer As String = reader.ReadToEnd()
' Display the content.
Return responseFromServer
' Clean up the streams and the response.
reader.Close()
response.Close()
End Function

End Class

Je suis l'exemple d'utilisation de DLL de l'aide Windev mais je n'arrive a rien.
J'ai importer les elements .net (system, system.IO, system.net) ainsi que ma DLL (ALE_REST)
Comment l'executer pour recuperer les donnees d'un fichier(dans ce cas la, les donnees du fichier PRESENCE)
les elements .net apparaissent bien dans Windev.

je lance
ALE_REST.ALEREST::ALE ("PRESENCE")
à partir de la, c'est le flou.