c++如何模拟一个游戏杆消息发给游戏呢?或者如何用SendInput发送一个硬件消息呢?
INPUT input[2];
input[0].type = 2;
input[0].hi.uMsg = 949;
input[0].hi.wParamH = 0x7eff;
input[0].hi.wParamL = 0x7eff;
input[1].type = 2;
input[1].hi.uMsg = 951;
input[1].hi.wParamH = 0x7eff;
input[1].hi.wParamL = 0x7eff;
SendInput(2, input, sizeof(INPUT));
这是我的模拟代码,但是不管用.不知道是不是参数写错了,而且也不知道游戏杆或者游戏手柄,参数应该填多少