Click here to Skip to main content
15,885,244 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# Console.ReadLine runns out of memory Pin
jschell3-Mar-13 5:54
jschell3-Mar-13 5:54 
QuestionTrying to use child class method by overriding parent Pin
MichCl1-Mar-13 8:26
MichCl1-Mar-13 8:26 
AnswerRe: Trying to use child class method by overriding parent Pin
OriginalGriff1-Mar-13 8:41
mveOriginalGriff1-Mar-13 8:41 
GeneralRe: Trying to use child class method by overriding parent; using Reflection to invoke class etc Pin
MichCl1-Mar-13 9:30
MichCl1-Mar-13 9:30 
GeneralRe: Trying to use child class method by overriding parent; using Reflection to invoke class etc Pin
jschell2-Mar-13 10:30
jschell2-Mar-13 10:30 
GeneralRe: Trying to use child class method by overriding parent; using Reflection to invoke class etc Pin
MichCl5-Mar-13 2:23
MichCl5-Mar-13 2:23 
GeneralRe: Trying to use child class method by overriding parent; using Reflection to invoke class etc Pin
MichCl5-Mar-13 9:40
MichCl5-Mar-13 9:40 
QuestionPassing parameters from unmanaged code to managed code by reference Pin
JimmyRopes1-Mar-13 5:42
professionalJimmyRopes1-Mar-13 5:42 
Is it possible to pass parameters from unmanaged code to managed code by reference?

I am programming agents for the Metta Trader 4 (MT4) platform using MetaQuotes Language 4 (MQL4); a C like language.

Normally one would use C++ to generate DLLs but I would like to use C# if I could because when you release something in C++ it is frozen in time as opposed to when you release something in C#. With C# if problems are detected in the underlieing classes they are corrected by normal updates of the .NET platform. This is an advantage I would like to take advantage of to simplify maintenance of products I hope to sell.

I will need to pass large arrays of market data to these DLLs for analysis and would like to do this by reference.

Here is an example of how to pass an array by value:

C#
[DllExport(EntryPoint = "SumIntegerArray")]
       public static int Sum([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)]int[] values, int count)
       {
           int result = 0;

           for (int i = 0; i < count; i++)
               result += values[i];

           return result;
       }

How would I pass the array by reference to the DLL?

The report of my death was an exaggeration - Mark Twain

Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems

I'm on-line therefore I am.
JimmyRopes



GeneralRe: Passing parameters from unmanaged code to managed code by reference Pin
harold aptroot1-Mar-13 7:13
harold aptroot1-Mar-13 7:13 
GeneralRe: Passing parameters from unmanaged code to managed code by reference Pin
JimmyRopes1-Mar-13 7:39
professionalJimmyRopes1-Mar-13 7:39 
GeneralRe: Passing parameters from unmanaged code to managed code by reference Pin
harold aptroot1-Mar-13 7:50
harold aptroot1-Mar-13 7:50 
GeneralRe: Passing parameters from unmanaged code to managed code by reference Pin
JimmyRopes1-Mar-13 12:50
professionalJimmyRopes1-Mar-13 12:50 
AnswerRe: Passing parameters from unmanaged code to managed code by reference Pin
Eddy Vluggen1-Mar-13 8:31
professionalEddy Vluggen1-Mar-13 8:31 
GeneralRe: Passing parameters from unmanaged code to managed code by reference Pin
JimmyRopes1-Mar-13 14:15
professionalJimmyRopes1-Mar-13 14:15 
Questionrecord mouse coordinates when mouse is clicked on inkcanvas Pin
Naman20071-Mar-13 4:59
Naman20071-Mar-13 4:59 
AnswerRe: record mouse coordinates when mouse is clicked on inkcanvas Pin
Simon_Whale1-Mar-13 5:30
Simon_Whale1-Mar-13 5:30 
GeneralRe: record mouse coordinates when mouse is clicked on inkcanvas Pin
Naman20071-Mar-13 5:35
Naman20071-Mar-13 5:35 
GeneralRe: record mouse coordinates when mouse is clicked on inkcanvas Pin
Simon_Whale1-Mar-13 5:38
Simon_Whale1-Mar-13 5:38 
QuestionDotSpatial.Positioning.NmeaInterpreter Pin
loctrice1-Mar-13 3:01
professionalloctrice1-Mar-13 3:01 
AnswerRe: DotSpatial.Positioning.NmeaInterpreter Pin
Eddy Vluggen1-Mar-13 4:57
professionalEddy Vluggen1-Mar-13 4:57 
GeneralRe: DotSpatial.Positioning.NmeaInterpreter Pin
loctrice1-Mar-13 5:04
professionalloctrice1-Mar-13 5:04 
GeneralRe: DotSpatial.Positioning.NmeaInterpreter Pin
Eddy Vluggen1-Mar-13 5:10
professionalEddy Vluggen1-Mar-13 5:10 
Questionsdk Pin
RAJESHSELVARAJ28-Feb-13 23:04
RAJESHSELVARAJ28-Feb-13 23:04 
AnswerRe: sdk Pin
Pete O'Hanlon28-Feb-13 23:24
mvePete O'Hanlon28-Feb-13 23:24 
AnswerRe: sdk Pin
Dave Kreskowiak1-Mar-13 2:21
mveDave Kreskowiak1-Mar-13 2:21 

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.