473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

error 2664 Conversion error

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

Nov 17 '05 #1
6 1473
>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 ** '


Karthik,

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

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

Dave
Nov 17 '05 #2
>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 ** '


Karthik,

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

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

Dave
Nov 17 '05 #3
Hey Dave!

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

Nov 17 '05 #4
Hey Dave!

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

Nov 17 '05 #5
Hey Dave!

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

Nov 17 '05 #6
Hey Dave!

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

Nov 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: c++newbie | last post by:
Hi all, I try to compile the following classes: main.cpp: #include <algorithm> #include <iostream> #include <fstream> #include <iterator>
7
by: Karthik | last post by:
Hello I am trying to convert the following??? The Code std::string* ChkName;
4
by: yanyo | last post by:
hi, im trying to figure out whats the problem with this program i get a runtime error but i dont see where the problem is i tried changing declaration but nothing if somrbody can try this on their...
1
by: Mike Smith | last post by:
I am attempting to create a dynamic multi-level tab strip from a database using linkbuttons. I can get the controls added to the page on the first page load, but on post back I get the mutiple...
10
by: Shawn | last post by:
JIT Debugging failed with the following error: Access is denied. JIT Debugging was initiated by the following account 'PLISKEN\ASPNET' I get this messag in a dialog window when I try to open an...
2
by: linq936 | last post by:
Hi, I have this piece code, struct TriStr { MyString str1; MyString str2; MyString str3; TriStr(MyString s1, MyString s2, MyString s3){ this->str1 = s1;
1
by: stillh2os | last post by:
Hello. I'm new to .NET, and I'm trying to implement a callback function. I want my managed C++ code to call an unmanaged function, passing in a callback function that the unmanaged C/C++ code...
9
by: Trent | last post by:
Here is the error while using Visual Studio 2005 Error 1 error LNK2019: unresolved external symbol "void __cdecl print(int,int,int,int,int,int,int,int)" (?print@@YAXHHHHHHHH@Z) referenced in...
1
by: misu101 | last post by:
Hi, I have a VS 6 project and I am trying to compile it using VS 2005. My program has the atlbase.h include which seems to trigger the errors. It used to compile OK using VS 6. The include...
0
by: Yoav | last post by:
Hello, I have been trying to enter SQL statmenbts to DB2 control center command line. I saw that user "Thames" wrote to you: > I have to repost my question for help. > > Yesterday I set up two...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.