Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / July 2005

Tip: Looking for answers? Try searching our database.

error 2664 Conversion error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
karthik.t@gmail.com - 07 Jul 2005 19:22 GMT
Hello

I am trying to convert the following???

The Code

std::string* ChkName;

GlobalInterfacePtr->MethodA(position, bstr, ChkName);

error C2664: 'MethodA' : cannot convert parameter 3 from 'class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > ** ' to 'unsigned short ** '

Could anyone give me suggestions?

Thanks!

Karthik
David Lowndes - 08 Jul 2005 09:14 GMT
>I am trying to convert the following???
>
[quoted text clipped - 7 lines]
>std::basic_string<char,struct std::char_traits<char>,class
>std::allocator<char> > ** ' to 'unsigned short ** '

Karthik,

MethodA probably requires a BSTR * parameter for ChkName. Try using
CComBSTR or _bstr_t instead:

CComBSTR ChkName;
GlobalInterfacePtr->MethodA(position, bstr, &ChkName);

Dave
Karthik - 08 Jul 2005 16:01 GMT
Hey Dave!

Yeah U R correct.. I made the change and it did work! :-)
Karthik - 08 Jul 2005 16:02 GMT
Hey Dave!

Yeah U R correct.. I made the change and it did work! :-)

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.