Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling DLL's
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00420473
Message ID:
00420809
Vues:
22
The problem you're running in to is that PostcodeData is not an object. It's a structure. Luckily, the structure is composed of VFP compatible data types. You can create a long character string and pass that to the DLL.

ie.
cLookup = space(60)
cPostcode = space(8)
:
cReserved = space(50)

cPostcodeData = cLookup+cPostcode+...+cReserved

Once you have the string, pass the string by reference to the DLL function.

uretval = MyFunction(@cPostcodeData)

HTH.

>
Type PostcodeData
>  LOOKUP As String * 60
>  Postcode As String * 8
>  PostcodeType As String * 2
>  Organisation As String * 30
>  Property As String * 30
>  Street As String * 60
>  Locality As String * 60
>  Town As String * 30
>  County As String * 30
>  CountyOption As String * 1
>  MailSort As String * 5
>  STDCODE As String * 8
>  GridN As String * 6
>  GridE As String * 5
>  Reserved As String * 50
>End Type
>
DEFINE CLASS postcodedata AS CUSTOM
>	Lookup = ""
>	Postcode = ""
>	PostcodeType = ""
>	Organisation = ""
>	Property = ""
>	Street = ""
>	Locality = ""
>	Town = ""
>	County = ""
>	CountyOption = ""
>	Mailsort = ""
>	StdCode = ""
>	GridN = ""
>	GridE = ""
>	Reserved = ""
>ENDDEFINE
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform