|
-
April 23rd, 1999, 08:28 AM
#1
Dual Interface & BSTR
When make a IDL for dual interface, we must choose parameter's type from only VARIANT and BSTR.
Using other type, VC++ compiler warns me of in-compatiablity with Dual Interface.
So, I have used only VARIANT and BSTR as a parameter's type of dual interface.
But, I needed to use a reference of BSTR.
I wrote IDL as follows.
[id(1), helpstring("method Parse")] HRESULT Parse([in] BSTR args, [out] BSTR* htmlResult, [out, retval] short* result);
It was successfully compiled and runned well in VB.
But, in ASP, it occurred type mismatch error at "htmlResult" parameter.
Besides, I don't know if its VC++ client would release the memory of htmlResult using SysFreeString.
Let me see wise answers of above two stupid question.
Regards
A programmer who loves Goethe.
-
April 23rd, 1999, 10:03 AM
#2
Re: Dual Interface & BSTR
Only automation types in dual interfaces because must be able to call through invoke.
[in] argument: client allocate, server release memory
[out] argument: server allocate, client release
[in, out] argument: client allocate and release
I don't know why reference with html does not work
bstr is (I think) LPOLESTR (this *is* a reference, or not?)
sorry cannot tell you more
chrislaw
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|