Results 1 to 4 of 4

Thread: AllocSysString

  1. #1
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question AllocSysString

    Hi all.
    CAn any body tell me what is the equivalent of MFc function AllocSysString () in Qt4.
    Thank you all.
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: AllocSysString

    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?

  3. #3
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Exclamation Re: AllocSysString

    Quote Originally Posted by marcel View Post
    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();
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: AllocSysString

    So if you don't need COM, then just use QString.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.