codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
open System open System.Runtime.InteropServices open Microsoft.FSharp.NativeInterop [<System.Runtime.InteropServices.DllImport("pgm_cpp.dll", EntryPoint="add", CallingConvention=CallingConvention.Cdecl)>] extern void add(byte[] a, byte[] b); let add2 (x: int) (y: int) = let a,b = BitConverter.GetBytes x, BitConverter.GetBytes y add(a,b) // declaration // extern "C" __declspec(dllexport) void add(int a, int b); // definition // void add(int a, int b) { printf("Why?"); }
Private
[
?
]
Run code
Submit