Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C Structures and VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00522430
Message ID:
00522514
Vues:
9
>>>Pretty much tried everything
>>>
>>>chr(157)+replicate(chr(0), 27)+space(128)+chr(0)
>>>chr(157)+replicate(chr(0), 156)
>>>etc
>>>etc
>>>
>>>Function still fails on me. I'll go to the source and ask. Thanks for the help.
>>
>>Erik,
>>
>>The function declaration would help here. The CHR(157) + REPLICATE(CHR(0), 156) is correct, based on the structure declaration. Therefore, it must be either that the declaration isn't correct or something about the function call itself isn't.
>

>here is the code:
>
>declare integer HttpInitialize in cshtpl32.dll string lpszLicenseKey, String @lpData
>
>lcKey = "Our license key"
>lcStruct = chr(157)+replicate(chr(0), 156)
>lnOK = HttpInitialize(lcKey, @lcStruct)
>
>
>The function returns 0 (function failed) and I use a function called HttpGetLastError to find out which error it had. I get "Invalid parameter passed to function".
>
>E-mailed their tech. support and let the ball be in their hands. Thanks for all the help.

Based on what you've given us, I'd say the above declaration is also correct. If I were to hazard a guess as to what the problem is it would be that the declaration of the structure should indicate a pointer to the structure member identified as the char type. That's strictly a guess, but it would explain the invalid parameter message since, in this case the structure itself would only be 32 bytes long.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform