Stack around the variable data was corrupted.

C#与C++交互C++将struct推送给C#, C#是以ref struct格式接收的. 出现以上错误,找了几天.虽然很明显是内存越界,可直到今天才突然想到问题所在. 原来是把C++层的#define xxx = ‘n’ 换成了C#层的 enum … xxx = (byte)’n’

而C#的enum默认是int型的,自然然与char不匹配, 于是就出现了上面的错误.

,人的一辈子唯一做的就是,不断地用你手中

Stack around the variable data was corrupted.

相关文章:

你感兴趣的文章:

标签云: