|
-
October 25th, 2001, 03:22 AM
#1
Max size for BSTR?
Hello!
I have a problem with a COM component.
I have a function that returns a BSTR.
It works very well when the string is about
22KB and smaller (that is what I have tested).
But in one case the string is as big as 12MB,
then the code crash in line 3 below, can
anybody explain why? is there a max size for
BSTR/_bstr_t?
1. STDMETHODIMP X::Func(BSTR * result)
2. {
3. _bstr_t bstrBuf((char*)data->OutputBuf);
4. *result = bstrBuf.copy();
5. return S_OK;
6. }
Thanks and regards
Rikard
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
|