Click here to Skip to main content
16,006,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Open the other Application Pin
ytod27-Oct-04 17:59
ytod27-Oct-04 17:59 
GeneralRe: Open the other Application Pin
ThatsAlok27-Oct-04 18:47
ThatsAlok27-Oct-04 18:47 
GeneralRe: Open the other Application Pin
Ranjish27-Oct-04 18:43
Ranjish27-Oct-04 18:43 
GeneralInteractive Online Course. Pin
Zak_Man27-Oct-04 15:50
Zak_Man27-Oct-04 15:50 
Generalreading in a text file Pin
Programmer_Chris27-Oct-04 14:54
Programmer_Chris27-Oct-04 14:54 
GeneralRe: reading in a text file Pin
digwizfox27-Oct-04 15:12
digwizfox27-Oct-04 15:12 
GeneralRe: reading in a text file Pin
Christian Graus27-Oct-04 15:25
protectorChristian Graus27-Oct-04 15:25 
GeneralProblem dealing with a function definition Pin
NietzscheDisciple27-Oct-04 10:47
NietzscheDisciple27-Oct-04 10:47 
I'm trying to port some code I wrote using DirectSound in C# to Visual C++ (managed). I've got most of it done except for this problem I'm stuck at. I understand that this is a newbie question, so please be gentle

The function I'm having a problem with is CaptureBufferObject->Read(arguments) in C++.

In C#, the function protoype is:

public Array  Read(
    int bufferStartingLocation,
    Type returnedDataType,
    LockFlag flag,
    int[] ranks
);


My code has the following usage of the Read method.

MemBuffShort = (short[])(StreamCaptureBuffer.Read(StreamCapBuffReadPos, typeof(short), LockFlag.None, 50000));


where MemBuffShort = new short[100000];

In C++, the function prototype is:
public: Array* Read(
    int bufferStartingLocation,
    Type *returnedDataType,
    LockFlag flag,
    int ranks __gc[]
);


My problem is with the last parameter: int ranks __gc[]

I tried the following:
// With the variable declarations
static System::Int32 CapBuffPara[] = new System::Int32[] { 50000 };

// Calling the Read method
MemBuff = StreamCapBuffer->Read(StreamCapBuffReadPos, __typeof(int), LockFlag::None, CapBuffPara);


However, I get the following error message:
error C2440: '=' : cannot convert from 'System::Array __gc *' to 'int __gc[]'


How do I solve this problem? What needs to be changed?

Thanks for your help!
GeneralRe: Problem dealing with a function definition Pin
Anonymous29-Oct-04 5:35
Anonymous29-Oct-04 5:35 
GeneralRe: Problem dealing with a function definition Pin
NietzscheDisciple29-Oct-04 6:02
NietzscheDisciple29-Oct-04 6:02 
GeneralRe: Problem dealing with a function definition Pin
Anonymous1-Nov-04 6:19
Anonymous1-Nov-04 6:19 
GeneralRe: Problem dealing with a function definition Pin
NietzscheDisciple29-Oct-04 5:59
NietzscheDisciple29-Oct-04 5:59 
Generalpointer to template fuction instance Pin
magicAL127-Oct-04 10:33
magicAL127-Oct-04 10:33 
GeneralRe: pointer to template fuction instance Pin
Ryan Binns27-Oct-04 18:29
Ryan Binns27-Oct-04 18:29 
GeneralExecute RTF file. Pin
DanYELL27-Oct-04 10:31
DanYELL27-Oct-04 10:31 
GeneralRe: Execute RTF file. Pin
RobJones27-Oct-04 10:40
RobJones27-Oct-04 10:40 
GeneralCSocket::OnReceive problem Pin
ali khalilvand27-Oct-04 8:41
ali khalilvand27-Oct-04 8:41 
GeneralCapture window bitmap from another running program Pin
MugWumpBW27-Oct-04 8:35
MugWumpBW27-Oct-04 8:35 
GeneralRe: Capture window bitmap from another running program Pin
l a u r e n27-Oct-04 15:10
l a u r e n27-Oct-04 15:10 
GeneralRe: Hiding Afx Pin
Maximilien27-Oct-04 7:52
Maximilien27-Oct-04 7:52 
GeneralRe: Hiding Afx Pin
jmkhael27-Oct-04 8:08
jmkhael27-Oct-04 8:08 
GeneralUnicode compiling Pin
Timothy Grabrian27-Oct-04 7:41
professionalTimothy Grabrian27-Oct-04 7:41 
GeneralRe: Unicode compiling Pin
l a u r e n27-Oct-04 15:11
l a u r e n27-Oct-04 15:11 
GeneralRe: Unicode compiling Pin
Timothy Grabrian27-Oct-04 15:25
professionalTimothy Grabrian27-Oct-04 15:25 
GeneralRe: Unicode compiling Pin
Ryan Binns27-Oct-04 18:40
Ryan Binns27-Oct-04 18:40 

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.