Forums - C# Corner

Forum guidelines

CopyMemory in C#

Oct 9 2008 10:11 AM

Hello, I am trying to convert an existing VB program to C#.net and am having problems with CopyMemory.  The program I am writing is a DLL which plugs in to 3rd party program (which is working), however, I need access to an array of numbers which is passed to the routine but it is passed as a double so I belive it is the memory location of the required array.  This has been done in VB by calling CopyMemory (Options(0), narray, 40) where:- Options(0 to 4) as Double and narray is the double passed from the program to the routine.

Does anyone know how CopyMemory works or how I can convert a double to IntPtr so I can use CopyMemory in C#?

Any suggestion would be grateful.


Answers (15)

File APIs for .NET – 25% off Aspose.Total
Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more! Use coupon code HOL2016PSB