Announcement

Collapse
No announcement yet.

Unterschied: VS2005 und VBA beim dll aufruf

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unterschied: VS2005 und VBA beim dll aufruf

    Hi, ich habe hier 2 funktionen, eine in VBA geschreiben die andere in Visual Studio 2005.

    zuerst die in VBA:

    Code:
    Option Compare Database
    Private Declare Function GetLicenceCode Lib "KeyGenDLL.dll" (ByVal appID As Integer,ByVal id As String) As String
    
    Private Sub Befehl0_Click()
    
            Dim str As String
            
            str = GetLicenceCode("0", "32324234")
            
            MsgBox (str)
    End Sub
    als ausgabewert kommt nichts zurück.

    jetzt die in VS2005:

    Code:
    Module Module1
    
     
    
        Public Declare Function GetLicenceCode Lib "KeyGenDLL.dll" (ByVal appID As Integer, ByVal id As String) As String
    
     
    
     
    
        Sub Main()
    
            Dim str As String
    
            str = GetLicenceCode(0, "32324234")
    
            System.Console.WriteLine(str)
    
        End Sub
    
     
    
    End Module
    Hier funktionierts und der ausgegebene wert ist gleich dem gewünschten wert.

    achja, beide dlls sind genau identisch.
Working...
X