General information
Category:
Windows API functions
>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.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only