Click here to Skip to main content
12,623,511 members (33,920 online)
   

C#

 
GeneralRe: C# Console.ReadLine runns out of memory Pin
jschell3-Mar-13 6:54
memberjschell3-Mar-13 6:54 
QuestionTrying to use child class method by overriding parent Pin
MichCl1-Mar-13 9:26
memberMichCl1-Mar-13 9:26 
AnswerRe: Trying to use child class method by overriding parent Pin
OriginalGriff1-Mar-13 9:41
mvpOriginalGriff1-Mar-13 9:41 
GeneralRe: Trying to use child class method by overriding parent; using Reflection to invoke class etc Pin
MichCl1-Mar-13 10:30
memberMichCl1-Mar-13 10:30 
GeneralRe: Trying to use child class method by overriding parent; using Reflection to invoke class etc Pin
jschell2-Mar-13 11:30
memberjschell2-Mar-13 11:30 
GeneralRe: Trying to use child class method by overriding parent; using Reflection to invoke class etc Pin
MichCl5-Mar-13 3:23
memberMichCl5-Mar-13 3:23 
GeneralRe: Trying to use child class method by overriding parent; using Reflection to invoke class etc Pin
MichCl5-Mar-13 10:40
memberMichCl5-Mar-13 10:40 
QuestionPassing parameters from unmanaged code to managed code by reference Pin
JimmyRopes1-Mar-13 6:42
memberJimmyRopes1-Mar-13 6: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:

[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 8:13
memberharold aptroot1-Mar-13 8:13 
GeneralRe: Passing parameters from unmanaged code to managed code by reference Pin
JimmyRopes1-Mar-13 8:39
memberJimmyRopes1-Mar-13 8:39 
GeneralRe: Passing parameters from unmanaged code to managed code by reference Pin
harold aptroot1-Mar-13 8:50
memberharold aptroot1-Mar-13 8:50 
GeneralRe: Passing parameters from unmanaged code to managed code by reference Pin
JimmyRopes1-Mar-13 13:50
memberJimmyRopes1-Mar-13 13:50 
AnswerRe: Passing parameters from unmanaged code to managed code by reference Pin
Eddy Vluggen1-Mar-13 9:31
mvpEddy Vluggen1-Mar-13 9:31 
GeneralRe: Passing parameters from unmanaged code to managed code by reference Pin
JimmyRopes1-Mar-13 15:15
memberJimmyRopes1-Mar-13 15:15 
Questionrecord mouse coordinates when mouse is clicked on inkcanvas Pin
Naman20071-Mar-13 5:59
memberNaman20071-Mar-13 5:59 
AnswerRe: record mouse coordinates when mouse is clicked on inkcanvas Pin
Simon_Whale1-Mar-13 6:30
memberSimon_Whale1-Mar-13 6:30 
GeneralRe: record mouse coordinates when mouse is clicked on inkcanvas Pin
Naman20071-Mar-13 6:35
memberNaman20071-Mar-13 6:35 
GeneralRe: record mouse coordinates when mouse is clicked on inkcanvas Pin
Simon_Whale1-Mar-13 6:38
memberSimon_Whale1-Mar-13 6:38 
QuestionDotSpatial.Positioning.NmeaInterpreter Pin
loctrice1-Mar-13 4:01
memberloctrice1-Mar-13 4:01 
AnswerRe: DotSpatial.Positioning.NmeaInterpreter Pin
Eddy Vluggen1-Mar-13 5:57
mvpEddy Vluggen1-Mar-13 5:57 
GeneralRe: DotSpatial.Positioning.NmeaInterpreter Pin
loctrice1-Mar-13 6:04
memberloctrice1-Mar-13 6:04 
GeneralRe: DotSpatial.Positioning.NmeaInterpreter Pin
Eddy Vluggen1-Mar-13 6:10
mvpEddy Vluggen1-Mar-13 6:10 
Questionsdk Pin
RAJESHSELVARAJ1-Mar-13 0:04
memberRAJESHSELVARAJ1-Mar-13 0:04 
AnswerRe: sdk Pin
Pete O'Hanlon1-Mar-13 0:24
protectorPete O'Hanlon1-Mar-13 0:24 
AnswerRe: sdk Pin
Dave Kreskowiak1-Mar-13 3:21
mvpDave Kreskowiak1-Mar-13 3: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.


Advertise | Privacy | Mobile
Web01 | 2.8.161128.1 | Last Updated 3 Dec 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid