SysAllocString 
Author Message
 SysAllocString

Use CComBSTR. You could use the constructor or the Append method.

regards
 Kjetil Kristoffer Solberg


Quote:
> Hi,

> How do i convert a char* to OLECHAR non MFC

> *bstr = SysAllocString( ?(char) )

> thanks.



Fri, 10 Oct 2003 23:01:43 GMT  
 SysAllocString
You could use the built-in string conversion macros that were mentioned in
the other posting "How to use BSTR"...

USES_CONVERSION;
char* str = "Hello";
BSTR bstr = SysAllocString(A2OLE(str));


Quote:
> Hi,

> How do i convert a char* to OLECHAR non MFC

> *bstr = SysAllocString( ?(char) )

> thanks.



Sat, 11 Oct 2003 01:22:47 GMT  
 SysAllocString
A2BSTR is more efficient. It does not allocate a temporary buffer on the
stack.
--
With best wishes,
    Igor Tandetnik


Quote:
> You could use the built-in string conversion macros that were mentioned in
> the other posting "How to use BSTR"...

> USES_CONVERSION;
> char* str = "Hello";
> BSTR bstr = SysAllocString(A2OLE(str));



> > Hi,

> > How do i convert a char* to OLECHAR non MFC

> > *bstr = SysAllocString( ?(char) )

> > thanks.



Sat, 11 Oct 2003 02:21:10 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. SysAllocString returns the same address

2. SysAllocString and SysFreeString

3. SysAllocString(BSTR)

4. Help fabout SysAllocString !!

5. SysAllocString

6. SysAllocString question - please help!

7. SysAllocString and wide character set

8. How is SysAllocString working?

9. Simple question with VARIANT and SysAllocString

10. Help with SysAllocString

11. Usig SysAllocString Function

12. SysAllocString and related methods REAL calling parameter

 

 
Powered by phpBB® Forum Software