Information générale
Catégorie:
Fonctions Windows API
>OOps...left out some information
>the parametes are pointers. Two pointers to string type and one to a short type
>the string pointers work fine...its the short pointer that causes the error.
>Thanks.
>
>>Hello,
>>
>>I am calling exposed functions in an ole automation server. I have successfully called several of the functions within the server but I am unable to use one that returns 2 strings and a short. Here is the prototype or syntax:
>>
>>short GetAuthorization(String Authcode,String MachinID,short Users)
>>
>>Authcode returns a string
>>MachinID returns a string
>>Users returns a short
>>
>>When I try the following code:
>>
>>lcauth = space(20)
>>lcmach = space(20)
>>lnusers = 0
>>lnret = oServer.GetAuthorization(@lcauth,@lcmach,@lnusers)
>>
>>I get an error that says OLE error code 0x80020005: Type mismatch.
>>Any ideas or suggestions on what I am doing wrong? Thanks in advance.
>>David
I've had success in the past setting short types to character strings when calling from VFP. Try setting lnusers=space(1), not 0.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement