Hi, ich habe hier 2 funktionen, eine in VBA geschreiben die andere in Visual Studio 2005.
zuerst die in VBA:
als ausgabewert kommt nichts zurück.
jetzt die in VS2005:
Hier funktionierts und der ausgegebene wert ist gleich dem gewünschten wert.
achja, beide dlls sind genau identisch.
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
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
achja, beide dlls sind genau identisch.