try this:
delegate void DSCUserInterruptFunction (IntPtr param);
struct DSCUSERINTFUNCTION
{
public DSCUserInterruptFunction func;
public byte mode;
}
[DllImport(diamond.dll)]
extern static byte dscSetUserInterruptFunction(DSCB board, ref DSCUSERINTFUNCTION dscuserintfunction);
static void DSCUserInterruptFunctionImpl(IntPtr param)
{
}
DSCUSERINTFUNCTION foo = new DSCUSERINTFUNCTION();
foo.func = new DSCUserInterruptFunction(DSCUserInterruptFunctionImpl);
byte result = dscSetUserInterruptFunction(board, ref foo);
top secret
Download xacc-ide 0.0.3 now!
See some screenshots