Bonjour,
J'ai écrit une DLL en VBNET 2013 qui s'interface parfaitement avec un programme d'appel en VBNET 2013 ...
Je souhaite qu'elle s'interface aussi avec un programme d'appel écrit dans un langage tiers (Delphi 7, Python
[mais pas les versions .net]).
Actuellement les compilateurs/interpréteurs correspondants ne voient les définitions de classe ou d'interface
qui ne semblent pas exportés par VBNET.
J'ai bien fait les choses suivantes:
- ajout d'une signature forte de l'assembly
- ajout de la visibilté Com, liaison interop
Imports System.Windows.Forms
Imports System.Runtime.InteropServices
Namespace prismacdllns
<Guid("1F249C84-A090-4a5b-B592-FD64C07DAB75"), _
InterfaceType(ComInterfaceType.InterfaceIsDual)> _
Public Interface _prismacdllin
<DispId(1)> ReadOnly Property send_to_astrometry(ByVal filepath As String, _
ByVal Api_Key As String, _
ByVal url_Astrometry As String,
ByVal chmp_img As String,
ByVal err_pos As String) As String
<DispId(2)> ReadOnly Property get_status_from_astrometry( _
ByVal Api_Key As String, _
ByVal url_Astrometry As String,
ByVal Nr_Session As String
) As String
End Interface
<Guid("E42FBD03-96DF-43a7-A491-23E735B32C5C"), _
ClassInterface(ClassInterfaceType.None), _
ProgId("prismacdll")> _
Public Class prismacdllin
Implements _prismacdllin
Public ReadOnly Property send_to_astrometry( _
ByVal filepath As String, _
ByVal Api_Key As String, _
ByVal url_Astrometry As String,
ByVal chmp_img As String,
ByVal err_pos As String
) As String Implements _prismacdllin.send_to_astrometry
Get
Dim result As String = ""
Try
MessageBox.Show("FilePath : " & filepath & vbCrLf & _
"ApiKey : " & Api_Key & vbCrLf & _
"url_Astro: " & url_Astrometry & vbCrLf & _
"chmp_img : " & chmp_img & vbCrLf & _
"err_pos : " & err_pos & vbCrLf, _
"Reçu dans la DLL"
)
Catch ex As Exception
End Try
Return result
End Get
End Property
'End Function
' Public Function
Public ReadOnly Property get_status_from_astrometry( _
ByVal Api_Key As String, _
ByVal url_Astrometry As String,
ByVal Nr_Session As String
) As String Implements _prismacdllin.get_status_from_astrometry
Get
Dim result As String = ""
Try
MessageBox.Show( _
"ApiKey : " & Api_Key & vbCrLf & _
"url_Astro: " & url_Astrometry & vbCrLf & _
"Nr_Session : " & Nr_Session & vbCrLf, _
"Reçu dans la DLL"
)
Catch ex As Exception
End Try
Return result
End Get
End Property
'End Function
End Class
End Namespace