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

Le critère de succès est de voir le schéma d'interface avec l'utilitaire dll_export_viewer. (http://www.nirsoft.net/utils/dll_export_viewer.html)

Voici le code que vous pouvez torturer pour rendre visible l'interface avec l'utilitaire...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
 
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