How to modify content of the original variable which is passed by value?

后端 未结 4 729
独厮守ぢ
独厮守ぢ 2020-12-19 11:01

There is an existing API function which does only allow the plugin(DLL) to receive three parameters and perform some action:

int ProcessMe(int nCommand, unsi         


        
4条回答
  •  遥遥无期
    2020-12-19 11:56

    No, there's no way to do that.

    Passing by value means copies of the original ones are created. In the method scope, you will have no information about the original variables.

    You need to either pass by reference or by value.

提交回复
热议问题