Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 11th, 2012  |  syntax: None  |  size: 0.46 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Problems with wrapping a C   DLL from C#
  2. void func(double *y, double *x){...}
  3.        
  4. extern "C" __declspec(dllexport) void func(double *y,double *x);
  5.        
  6. __declspec(dllexport) void func(double *y,double *x){...}
  7.        
  8. static class AnyClass
  9.   {
  10.     [DllImport(dllPath)]
  11.     public extern static void func(out double[] y, double[] x);
  12.  
  13.     int otherfunc
  14.     {
  15.       double[] x = new double[5];
  16.       double[] y = new double[5];
  17.  
  18.       ...
  19.  
  20.       func(out y, x);
  21.     }
  22.   }