PDA

View Full Version : AllocSysString



phillip_Qt
4th December 2007, 09:22
Hi all.
CAn any body tell me what is the equivalent of MFc function AllocSysString () in Qt4.
Thank you all.

marcel
4th December 2007, 09:27
Do you need to pass a string to a COM object?
AllocSysString just allocates a BSTR object in a global memory pool accessible by the COM subsystem(I think).

So, what do you need it for?

phillip_Qt
5th December 2007, 05:23
Do you need to pass a string to a COM object?
AllocSysString just allocates a BSTR object in a global memory pool accessible by the COM subsystem(I think).

So, what do you need it for?


actually im working on a migrating project where we are migrating mfc and com code to qt. In that COM code they ve assigned memory to CString by using AllocSysString . like
CString lStr ("+");
CString Str = lStr.AllocSysString();

wysota
5th December 2007, 08:08
So if you don't need COM, then just use QString.