Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

determination of wheter this is a bug with object variable being passed to com or not?

$
0
0

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:

http://social.msdn.microsoft.com/Forums/vstudio/en-US/2ec1d922-f26e-4e08-ba6b-2c4b6b09920e/how-to-declare-an-safe-array-in-vbnet#868e391d-a9f8-40d1-b8d3-8e9a1d6f58aa


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



Viewing all articles
Browse latest Browse all 21115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>