waqas
08-28-2002, 03:37 AM
how can i convert a string to upperclass which resides inside a BSTR string object...
Thanks
waqas
Thanks
waqas
uppercasewaqas 08-28-2002, 03:37 AM how can i convert a string to upperclass which resides inside a BSTR string object... Thanks waqas reboot 08-28-2002, 08:06 AM Could you explain this in a little more detail. Why are you using a BSTR in the first place? waqas 08-28-2002, 08:46 AM actually i m new to vc++, i was creating an ATL object and unable to use CString so tried BSTR and it worked, now i wanted to make it upper case as incase of CString we can use makeupper() but i dunno how to do it with BSTR... waqas quwiltw 08-28-2002, 09:00 AM I must confess I know nothing about BSTR but this article I found explains how to convert to CString for manipulation. Perhaps you could give it a try? http://www.codeproject.com/cpp/easybstr.asp reboot 08-28-2002, 09:23 AM The ATL class CComBSTR provides a wrapper around the BSTR data type. HRESULT MyFunction(BSTR* bstrStringPtr) { // Create the CComBSTR object CComBSTR bstrString("Hello World"); // Convert the string to uppercase bstrString.ToUpper(); // Return a copy of the string. return bstrString.CopyTo(bstrStringPtr); } waqas 08-29-2002, 11:43 PM Thanks a lot, it solved my problem.. waqas |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum