Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BSTR types in VFP
Message
 
 
To
13/03/2000 11:37:47
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00344694
Message ID:
00345419
Views:
18
Donald

I also think that if you are expecting to have the string returned from the method call i.e. lcString = oCOM.OneWord( "this is a test" ) you have to define it in the IDL as [out,retval]. The one sample I have here doesn't return a string. It returns a numeric value and the string is stuffed into an argument that is passed by reference using the @.

>Idl = [id(2), helpstring("method OneWord")] HRESULT OneWord([in] BSTR cParseStr, [out] BSTR* retval);
>
>.h = STDMETHOD(OneWord)(/*[in]*/ BSTR cParseStr, /*[out]*/ BSTR* retval);
>
>.CPP = STDMETHODIMP CStringin::OneWord(BSTR cParseStr, BSTR *retval)
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform