在golang上调用DLL?

时间:2016-03-31 07:30:14

标签: c++ c windows go

rule "Addition rule"
    when
        act : CalcOperation(CalcOperation.ADD,  $firstNum : firstNum, $secondNum : secondNum)
    then
        $out : $firstNum + $secondNum;;
        //logger.info("Result of addition is : "+$out);
end

...............................................................................

Here is the CalcOperation class.

public class CalcOperation {
    Double firstNum;
    Double secondNum;
    public static  Boolean ADD;
    public static  Boolean SUB;
    public static  Boolean MUL;
    public static  Boolean DIV;

    public CalcOperation(Boolean operation, Double m, Double n){
        this.firstNum = m;
        this.secondNum = n;
    }

报告此错误:

  

传递给系统调用的数据区域太小

1 个答案:

答案 0 :(得分:0)

unsafe.Sizeof(&process)返回指针的大小 - 变量process占用的内存地址。

我想你想使用unsafe.Sizeof(process)