Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Struct.vcx cMembers
Message
 
À
21/08/2001 16:57:44
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00546561
Message ID:
00546992
Vues:
18
>>Since this API requires a lot of structures to even start and I'll probably have a lot of debuging on my hands, I thought that I'd ask about the concatenation up front. Do you think that the concatenation should just be as is with the first field of the next structure being added to the last field of the previous structure with nothing in between or should a comma be placed between so that it looks like one huge structure? ie.
>>a) z6:last_line0c1:detail_code
>>b) z6:last_line, 0c1:detail_code
>>
>>I assume that it is "b" and I assume that the struct class or whatever will see this as 10 copies of the same structure.
>>
>
>I was thinking more along the lines of:
>
>obj_ADDR_REC = CREATEOBJECT( "class_ADDR_REC" )
>str_ADDR_REC = obj_ADDR_REC.GetString()
>
>str_ZIP4_PARM = ""
>
>FOR m.i = 1 TO 10
> str_ZIP4_PARM = str_ZIP_PARM + str_ADDR_REC
>NEXT
>
>= API_CALL( @str_ZIP_PARM )
>
>...
>
>The above example passes an "empty" ZIP4_PARM structure via the "API_CALL".
>
>Subsequently, str_ZIP_PARM would be "substringed" into (10) "ADDR_REC" strings which are "unassembled" via .SetString(). Whether VFP arrays are used to hold the intermediate strings/objects is a design decision.
>
>One thing to remain aware of is the "alignment" of the fields in structures (eg. byte, word, doubleword); this may require "padding" within the ADDR_REC structure and/or between them. You'll need to refer to "their" docs, or perform some tests and "dump" the structures.
>
>If this is going to take you "too long" to iron it, it might be worthwhile to write an FLL, particularly if performance is an issue (though I can't say if performance will be a problem using pure VFP).

Gerry,

Thanks. I'll probably have to play with this. The actual ZIP4_PARM structure has about 50 fields only one of which is this compound structure so the debugging is going to be fun.

The API was written in C++ and all of the docs are for C++ which I am not versed in at all. I'm really hoping that this struct class of Christof's will work for me here because I think that I would have even a worse time trying to code an FLL in C++ since, apart from the language barrier, I'd still need to have a clearer understanding of how C is working with these structures etc.

Thanks agian.

Ed
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform