Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Struct.vcx cMembers
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00546561
Message ID:
00546939
Vues:
13
I think you need to separate them with commas. The following text is what it is inside the getcmembers() for the Win32_find_data class. This Win32_fin_data structure has some structures (FILETIME) inside:

Return ;
"DWORD ul:dwFileAttributes," + ;
"FILETIME o:ftCreationTime," + ;
"FILETIME o:ftLastAccessTime," + ;
"FILETIME o:ftLastWriteTime," + ;
"DWORD ul:nFileSizeHigh," + ;
"DWORD ul:nFileSizeLow," + ;
"DWORD ul:dwReserved0," + ;
"DWORD ul:dwReserved1," + ;
"TCHAR 0c260:cFileName," + ;
"TCHAR 0c14:cAlternateFileName"

>>>I'm using your struct class for the first time to make some calls to a proprietary API that was written in C++.
>>>
>>>In setting up a sub-class of struct I run into this in the second structure that I am creating. The ADDR_REC mentioned below is a structure that was created just before this one. How would this be entered in cMembers? It's not the whole structure ADDR_REC and it's not a pointer either.
>>>
>>>typedef struct
>>>{
>>> ADDR_REC stack[10]; /********** record stack **********/
>>>} ZIP4_PARM;
>>
>>You have to enter the "primitives" (eg. DWORD, Int, double, whatever) that make up ADDR_REC ... 10 times over.
>>
>>ZIP4_PARM is a structure that contains an array of 10 structures of ADDR_REC.
>>
>>You would probably use struct to compose 10 ADDR_REC objects/strings, concatenate them, and then pass them on to the API call that uses ZIP4_PARM. Subsequently, if need be, you would disassemble ZIP4_PARM into 10 ADDR_REC strings and copy them back out to their respective objects.
>
>Gerry,
>
>I appreciate the clairification. The getcmembers() for the ADDR_REC structure looks like this:
>
> LOCAL cTemp
> cTemp = "0c1:detail_code, z5:zip_code, z10:update_key, 0c1:action_code, 0c1:rec_type, z4:carr_rt, "
> cTemp = cTemp + "z2:pre_dir, z28:str_name, z4:suffix, z2:post_dir, z10:prim_low, z10:prim_high, "
> cTemp = cTemp + "0c1:prim_code, z40:sec_name, z4:unit, z8:sec_low, z8:sec_high, 0c1:sec_code, "
> cTemp = cTemp + "z4:addon_low, z4:addon_high, 0c1:base_alt_code, 0c1:lacs_status, z6:finance, "
> cTemp = cTemp + "z2:state_abbrev, z3:county_no, z2:congress_dist, z6:municipality, z6:urbanization, "
> cTemp = cTemp + "z6:last_line"
>
>RETURN cTemp
>
>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.
>
>Thanks again.
>
>Ed
Hector Correa
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform