Home > Net >  Strange, call unmanaged DLL function stack overflow problem
Strange, call unmanaged DLL function stack overflow problem

Time:10-03

DELPHI written DLL, function prototype
Public static extern int API_READ (string, in ref out);

Byte [] s=new byte [2048].

API_READ (ref s [0]).
If read data is less, this call is successful, but if the data returned is more, will go wrong, the exception_wasThrown such fault, at first thought it was an array of space points less, but after 20480, and the question, and read data is not more than 2048, how to solve this?

CodePudding user response:

This you have to see the realization of the function, as well as the conditions
You can block read
  •  Tags:  
  • C#