473,386 Members | 1,908 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,386 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 1471
>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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.