none
question about dsf objects RRS feed

  • Question

  •  

    I have created the dsf objects below by using the com wrappers for dotnet and for softhidreceiver i created a com wrapper library by using tlbimp or regasm i cant remember which right now but the problem is the code gets no errors in vb.net but also creates no device in device manager.  Im wondering if anyone can help me since i went to the trouble for hours figuring this out:

    Const IID_IDSFBus =

     

     

    Const IID_ISoftUSBDevice =

     

     

    Const IID_EHCICtrlrObj =

     

     

     

     

    Dim DSF1 As DSF.

     

    DSF1 = CreateObject(

    "DSF.DSF"

     

    Dim ExtHub As

     

    ExtHub = CreateObject(

    "SOFTUSB.SoftUSBHub"

     

     

    SetEndpointDiagnostics(ExtHub.SoftUSBDevice)

     

     

     

    Dim CtrlrDev As DSF.

     

    CtrlrDev = EnumSimulatedDevices(IID_IDSFBus)

     

    If CtrlrDev Is Nothing

     

    MsgBox(

    "Could not find simulated a EHCI controller. Did you remember to run softehcicfg.exe /install?"

     

    End

     

     

    Dim CtrlrObj As

     

    CtrlrObj = CtrlrDev.Object(IID_EHCICtrlrObj)

     

    Dim RootHubPort As

     

    RootHubPort = CtrlrObj.Ports(1)

     

     

    RootHubPort.HotPlug(ExtHub.SoftUSBDevice.DSFDevice)

     

    Dim GenericHIDDev As SoftHidReceiver.Interop.

     

    GenericHIDDev = CreateObject(

    "SoftHIDReceiver.HIDDevice.1"

     

    Dim GenericHIDDSFDev As DSF.

     

    GenericHIDDSFDev = GenericHIDDev.DSFDevice

     

    Dim GenericHIDUSBDev As

     

    GenericHIDUSBDev = GenericHIDDSFDev.Object(IID_ISoftUSBDevice)

     

    In the object browser you can see what classes are visible but i have no clue what im doing wrong. Anyone be happy to help me out as i thought i got this part to work before but can anyone tell me if i did something wrong in my code?

    Here is the full vb.net project link if you want to look:

    http://kinectmultipoint.codeplex.com/releases/81829/download/339193

    or sometimes if i update it because i got a part working just go to:

    http://kinectmultipoint.codeplex.com and download the mouse emulator (vb.net) zip file which is the only one on their now.

     

    If anyone can help me then i will have a successful port for someone to look at.

    Works on 32-bit and 64-bit systems because i have tested it on both.


    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

     

    SoftUSBDevice

     

    DSFDevice

    )

     

     

     

    HIDDevice

     

    'PromptAndWaitForEnterKey("Press enter to plug external hub into port 1 of root hub")

     

    SoftEHCIRootHubPort

     

    SoftEHCICtrlr

     

    If

    )

     

     

     

    Then

     

    DSFDevice

     

    'WriteLine "Enumerating simulated devices to look for a simulated EHCI controller"

     

    'WriteLine "Setting diagnostics for external hub"

    )

     

     

     

    SoftUSBHub

    )

     

     

     

    DSF

     

    'WriteLine "TestGenericHid.wsf starting"

     

    "{16017C34-A2BA-480B-8DE8-CD08756AD1F8}"

     

    "{9AC61697-81AE-459A-8629-BF5D5A838519}"

     

    "{E927C266-5364-449E-AE52-D6A782AFDA9C}"

    • Edited by The Thinker Monday, February 6, 2012 9:54 PM
    Monday, February 6, 2012 9:49 PM

All replies

  • Forget i finally got it working myself but im wondering anyone know what property i should look at for multiple devices in dsf and how i would go about coding them correctly? Any sample but preferrably vbscript but c++ would be good too.

    Also, it says it failed to install my device software when i plug in report descriptors so maybe i need to define them as objects for it to work correctly in vb.net?

    Here is a picture of when the device fails:

    In device manager it says device cannot start.


    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




    • Edited by The Thinker Tuesday, February 7, 2012 10:47 PM
    Tuesday, February 7, 2012 6:35 PM
  • Anyone know if ive got a dsf object wrong in my code? I think the vb.net code would be easy to shift through because i have taken out anything that would cause confusion. Ive only done what the normal testgenerichid.wsf vbscript would have done except in vb.net and i plan on just changing it for multiple devices.

    The kinectmultipoint.codeplex.com link is active and i think the code one is too but i cant remember when i uploaded the last copy.

    But when you download the emulator vb.net source the only problem ive had so far is when it puts the device up to hotplug method before input report it doesnt want to work and says device cannot start in device manager. How can i see what im doing wrong? Does dsf have logging if so where can i find the file so i can figure out what happened?


    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


    • Edited by The Thinker Tuesday, February 7, 2012 11:06 PM
    Tuesday, February 7, 2012 10:55 PM