SetFilePointer does not fail, but also does not move pointer

后端 未结 1 1166
無奈伤痛
無奈伤痛 2021-01-18 18:44

First, please forgive me if I say something silly, I am no IT guy but electronics engineer, but I have been assigned to something that needs more skills that I do.

I

相关标签:
1条回答
  • 2021-01-18 19:33

    A long in C++ is 32-bits. Which makes it an int in C#. Replace long with int in the pinvoke declaration.

    You should have gotten a PInvokeStackImbalance warning about that. Be sure the re-enable that warning if you turned it off. And it would have been easy to see that the value for *posicion_inicio* is wrong in the debugger. Be sure to enable unmanaged debugging, Project + Properties, Debug tab. Now you can set a breakpoint in your C++ code.

    0 讨论(0)
提交回复
热议问题