I have a project I am working on which involves Microsoft's dsf(device simulation framework) and queueinputreport from the generichid sample. The problem is queueinputreport does not format the safearray on c++ side correctly and does not move any simulated mouse devices I create. I pass it an object with byte values because it accepts a safearray of variants such as:
Dim InputReport1() as object Redim InputReport1(4) InputReport1(0) = CByte(0) InputReport1(1) = CByte(1) InputReport1(2) = CByte(2) InputReport1(3) = CByte(3) InputReport1(4) = CByte(4) GenericHIDDev(usernum).QueueInputReport(InputReport1, 10)
However, in vbscript a similar statement with its variant type works (sends input to simulated device):
Dim InputReport1(4) InputReport1(0) = CByte(0) InputReport1(1) = CByte(1) InputReport1(2) = CByte(2) InputReport1(3) = CByte(3) InputReport1(4) = CByte(4) GenericHIDDev(i).QueueInputReport(InputReport1),10
I have more information in this thread which has been going on for about two weeks now:
Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering - Yoda. Blog - http://www.computerprofessions.co.nr