|
-
April 19th, 1999, 06:45 AM
#1
[COM] How to get BSTR from COM
I want to receive string from COM component.
<IDL>
HRESULT Test([out, string] BSTR* abc);
<Test Server>
HRESULT Test(/*out, string*/ BSTR* abc)
{
_bstr_t bstrResult(abc, false);
bstrResult = L"This is a test";
abc = (BSTR)bstrResult;
return S_OK;
}
<Test Client : VB>
Dim obj as new WebCom
Dim s as String
obj.Test s
---------------
But, this code occurs error (in MTS).
How COM server pass BSTR string to client?
A programmer who loves Goethe.
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
|