Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ole automation server
Message
From
27/05/1999 11:56:37
 
 
To
26/05/1999 18:27:01
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00223037
Message ID:
00223506
Views:
27
>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
Map
View

Click here to load this message in the networking platform