Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing values to a win32api
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00058045
Message ID:
00058073
Vues:
56
>>How can I pass multiple values to a win32api from Visual FoxPro?
>>
>>Basically I need to fill this structure prior of calling the bind function.
>>
>> struct sockaddr {
>> u_short sa_family;
>> char sa_data[14];
>> };
>>
>> int bind (
>> SOCKET s,
>> const struct sockaddr FAR * addr,
>> int namelen
>> );
>>
>>Thanks in advance for your help.
>
>Simon,
>
>Concatenate the values into a single string, then in the declaration, declare it string passed by reference.
>
>hth,
>
>George

Nope. See my answer to Simon. You can't just concatenate the strings because this struct contains a pointer (ie you must concatenate the conversion of the short int with the pointer to the string, not the actual string.)

Vlad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform