Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am having C++ code like this
C++
UINT8  *ptr;
extern __declspec(dllexport) void initialize_ptr(UINT8 *p_ptr)
{
    ptr = p_ptr;
}

In my C# code, i am having an ArrayList with values filled in. I wanted to set the ptr in C++ with the pointer pointing to the values in the ArrayList so that the C++ code which will take each individual values of the arraylist and proceed with the calculation.

How can i initialize the C++ pointer to the exact memory location of the arraylist in C# so that C++ code executes with the pointer data without any problem ?

Thanks...
Posted
Updated 20-Sep-15 20:52pm
v2

1 solution

You may find useful info here: "Default Marshaling for Arrays" at MSDN[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900