Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Network:
Windows 2008 Server
WHat have you tried in vfp ? Anything from Chr. Ehlscheid or Chr. Wollenhaupt ?
Somewhere is a class to pack stuctures in a string, which is necessary here, and then ou have to call the first one by reference in each call.
HTH
thomas
>Hi,
>
>I'm stuck with a problem calling an external DLL. I'm able to call the dll in an Excel VBA Makro and it works.
>The Problem is that the dll needs two Parameters as a struct. I have been dealing with the problem for several days now I need some help if this is possible.
>
>Here is the declaration of the dll as it works in VBA:
>
>Public Declare Function vbHvsCodeTeze Lib _
>"C:\Test\HvsCodeDll.dll" _
> (ByRef vHvsCode As HvsCode, vHvsAdr As HvsAdr) As Long
>
>Here are the Type DEFS :
>
>
>Type HvsAdr
> pszLkz As String
> pszPlz As String
> pszOrt As String
> pszStr As String
>End Type
>
>Type pHvsAdr
> pszLkz As Long
> pszPlz As Long
> pszOrt As Long
> pszStr As Long
>End Type
>
>Type HvsCode
> szDepot(3) As Byte
> szDepotName(20) As Byte
> szTeze(4) As Byte
> szStr(50) As Byte
> szHaus(4) As Byte
> szZus(1) As Byte
> szPlz(10) As Byte
> szOrt(50) As Byte
> szVon(6) As Byte
> szBis(6) As Byte
> szTyp(1) As Byte
> szVersion(4) As Byte
> szLkz(3) As Byte
> szErrMsg(254) As Byte
>End Type
>
>And here ist the function call:
>
>Dim Adr As HvsAdr
>Dim vGet As HvsCode
>
>Adr.pszLkz = "DE" &&country Code
>Adr.pszPlz= "30559" && Zip Code
>Adr.pszOrt = "Hannover" && City Name
>Adr.pszStr ="Haupt Str. 4" && Streetname and Number
>
>
>Function Call:
>
>The structure Adr holds the input values
>The structure vGet is passed as Reference because its values are changed by the called function (The needed Return values)
>
>errCode = vbHvsCodeTeze(vGet, Adr)
>
>The only thing I get is an exception or type mismatch
>
>Is it possible to get it work in VFP (9.0) ??
>
>Any Ideas / Help
>
>Thanks in Advance
>
>Jörg
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement