Click here to Skip to main content
15,916,692 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: compiling errors with xutility header file Pin
vmaltsev15-Jul-04 12:57
vmaltsev15-Jul-04 12:57 
GeneralFound solution: code compiles fine in VC++ 6.0 Pin
zlatnik16-Jul-04 9:38
zlatnik16-Jul-04 9:38 
GeneralClasses which call each other's methods Pin
0v3rloader15-Jul-04 11:28
0v3rloader15-Jul-04 11:28 
GeneralRe: Classes which call each other's methods Pin
Antti Keskinen15-Jul-04 11:44
Antti Keskinen15-Jul-04 11:44 
GeneralRe: Classes which call each other's methods Pin
0v3rloader15-Jul-04 11:53
0v3rloader15-Jul-04 11:53 
GeneralRe: Classes which call each other's methods Pin
Antti Keskinen15-Jul-04 12:04
Antti Keskinen15-Jul-04 12:04 
GeneralRe: Classes which call each other's methods Pin
0v3rloader15-Jul-04 12:23
0v3rloader15-Jul-04 12:23 
QuestionWhy "SAFEARRAY"?? Pin
So and So15-Jul-04 11:25
So and So15-Jul-04 11:25 
Hello,

I have been working on a project that interops between C# in .NET and unmanaged C++. Here's the jist: my main is in C++, and in it, i create an instance of an object made in C#. The C# is supposed to connect to the database, sort through the results and put the information into a bunch of arrays which are sent back to the C++ porition. While i got the two projects to connect and communicate somewhat, I am now having some issues with datatypes...or so i think.

Here's what i've got in C++:
...
double vd[100];
int vi[100];
string vs[100];

//send arrays to Read() method in C#
spConnNET->Read(vi, vd, vs);

The Read() method in C# looks like this:
...
public void Read(int[] intArray, double[] doubleArray, string[] stringArray)
{
while(reader.NextResult())
{
//THere will be other stuff here
reader.Read();
}

}//end Read()

when i try to compile in C++, this is the error i'm getting:

error C2664: 'DBConnection3::IConnection::Read' : cannot convert parameter 1 from 'int [100]' to 'SAFEARRAY *'

"SAFEARRAY"??!?! what the heck is that?? I thought it was "int, double, string"??

EDIT: I have tried looking up SAFEARRAY and whether it can be converted into an int/double/string and vice versa, but I don't fundamentally understand why this type conversion is taking place, what it means, what can be done...etc...

my apologies in advance for my newbie-ness...I would really appreciate some advice!Smile | :)
QuestionFastest way to find a file exists on hard drive? Pin
xcavin15-Jul-04 11:22
xcavin15-Jul-04 11:22 
AnswerRe: no replies for serious issues. Pin
xcavin15-Jul-04 12:18
xcavin15-Jul-04 12:18 
GeneralRe: no replies for serious issues. Pin
Anders Molin15-Jul-04 12:34
professionalAnders Molin15-Jul-04 12:34 
AnswerRe: Fastest way to find a file exists on hard drive? Pin
Henry miller15-Jul-04 12:32
Henry miller15-Jul-04 12:32 
GeneralRe: Fastest way to find a file exists on hard drive? Pin
Henry miller16-Jul-04 2:47
Henry miller16-Jul-04 2:47 
AnswerRe: Fastest way to find a file exists on hard drive? Pin
Anders Molin15-Jul-04 12:33
professionalAnders Molin15-Jul-04 12:33 
AnswerRe: Fastest way to find a file exists on hard drive? Pin
Anonymous15-Jul-04 20:55
Anonymous15-Jul-04 20:55 
AnswerRe: Fastest way to find a file exists on hard drive? Pin
Blake Miller20-Jul-04 12:29
Blake Miller20-Jul-04 12:29 
GeneralGetDC drawing in win32 Pin
jass198115-Jul-04 10:31
sussjass198115-Jul-04 10:31 
GeneralRe: GetDC drawing in win32 Pin
RobJones15-Jul-04 11:23
RobJones15-Jul-04 11:23 
GeneralLPTSTR, LPCTSTR, CString and others... Pin
Kaleb Pederson15-Jul-04 9:22
Kaleb Pederson15-Jul-04 9:22 
GeneralRe: LPTSTR, LPCTSTR, CString and others... Pin
Toni7815-Jul-04 9:40
Toni7815-Jul-04 9:40 
GeneralRe: LPTSTR, LPCTSTR, CString and others... Pin
Adam Durity15-Jul-04 9:49
Adam Durity15-Jul-04 9:49 
GeneralRe: LPTSTR, LPCTSTR, CString and others... Pin
Antti Keskinen15-Jul-04 9:53
Antti Keskinen15-Jul-04 9:53 
GeneralRe: LPTSTR, LPCTSTR, CString and others... Pin
Kaleb Pederson15-Jul-04 11:25
Kaleb Pederson15-Jul-04 11:25 
GeneralRe: LPTSTR, LPCTSTR, CString and others... Pin
Antti Keskinen15-Jul-04 11:50
Antti Keskinen15-Jul-04 11:50 
GeneralRe: LPTSTR, LPCTSTR, CString and others... Pin
PJ Arends15-Jul-04 17:14
professionalPJ Arends15-Jul-04 17:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.