x-nas / WinsockPacketEditor

Winsock packet Editor, which can intercept mobile game with simulator, supports 32-bit and 64 bit App 网络封包拦截器,可拦截手游封包,支持32位及64位程序
https://www.x-nas.com/wpe/publish.htm
246 stars 68 forks source link

请教下作者,修改的字节长度大于接收到的封包字节长度怎么改代码 #27

Open chenghl666 opened 3 months ago

chenghl666 commented 3 months ago

请问如果我想修改的字节长度大于接收到的封包字节长度,该怎么修改那? bool bSetOK = Socket_Operation.SetByteToIntPtr(bBuff, ipBuff, iLen);
还是说bBuff的长度必须在iLen的范围内修改

x-nas commented 3 months ago

SetByteToIntPtr(bBuff, ipBuff, iLen) 这个方法里面的iLen其实就是bBuffer的length,函数的作用是把bBuffer字节数组写入到ipBuff指针指向的非托管内存里面,所以这个函数是不做长度限制的,可以支持任意长度的bBuffer数组,但是你还需要在UI端增加一个修改封包长度的功能,这样就可以实现你想要的功能了

chenghl666 commented 3 months ago

好的,谢谢