locked
Problem getting MoFx2App sample application to work on Windows 8 Consumer Preview

    Question

  • Hi,

    I am having trouble getting the MoFx2App sample to work using:

    - Windows 8 Consumer Preview

    - Visual Studio 11 Beta

    - WDK Consumer Preview

    When I run the sample, I get an 'Access is denied' in the sample application.

    The latest USB-FX2 device driver and MoFx2App samples were used (downloaded using VS 11 Beta). I had gotten the whole thing to work fine in Build 8102.

    I have also checked the following:

    - Device driver installed fine (test certs are in place)

    - Device metadata file is present and has the relevant privileges set (and yes, this was done before the device was inserted and driver was installed)

    - Application has correct DeviceCapability GUID set in the app manifest that matches the device metadata file

    Here are some screenshots that may assist with troubleshooting:

    Is there anything I may have missed? Any help or pointers would be very much appreciated.

    Thanks!

    Thursday, March 08, 2012 4:51 PM

Answers

  • Use traceview from the WDK to view the error messages reported from deviceaccess.dll.  The output from that will tell you what part of the authentication process failed.  If you point traceview at the public symbol server, you should be able to add deviceaccess.dll to your trace session through the UI and get trace message decoding.

    If you don’t have test signing enabled on the system (and haven’t rebooted since enabling it) the device metadata system won’t set the properties that enable device access.  But it will set the other properties, so you may still see the fancy device icon.

    The instructions below will help you figure out if the device property is actually being set on their device.

    DRAFT instructions:

    Debug the device container properties by Using Ddodiag.exe If you debug a device metadata package problem or any device properties problem, we recommend that you use Ddodiag.exe.

    Beginning with Windows 7, the Ddodiag.exe supports listing all values of the device properties in device containers.

    Follow these steps to run Ddodiag.exe:

    1.    Launch command prompt.

    2.    Type “Start /wait ddodiag.exe –o <Filename.xml>” and hit enter key.

    3.    Type notepad.exe <Filename.xml>.

    Note:  The xml contains all properties of device containers in the system. If you are investigating given specific device problem, find the hardwareID or ModelID in the XML output file and see the properties of the device container. If you are investigating whether given property value is set or not, try to find the value in that XML output file.

    Here is how you can quickly tell if Device Metadata is installed properly:

    1.       For the relevant Hardware ID - look for the DDO element (the device container) and see all properties that belong to the container.   One of the properties is MetadataPath. 

    2.       If filename listed in MetadataPath does not match the target name, it isn’t installed properly and solution is to re-install the device metadata.


    If device metadata is installed properly, the values you set for Manufacturer Name or Package Name for that Hardware ID should be listed properly.  At this point, look for the relevant properties needed are properly declared in device metadata.

     Best Wishes - Eric

    Saturday, March 24, 2012 6:26 PM
    Moderator

All replies

  • I had the same issue, and tried this:

    I found out there's several dozen copies of the metadata files here: C:\ProgramData\Microsoft\Windows\DeviceMetadataStore\en-US. Removing the device from the Device Manager, then removing from here, then restarting, then reinstalling the driver, then restarting (forced) then running the metadata wizard, then restarting fixed the issue :).

    It worked for me, hope it works for you! (btw, your post gave me the idea of looking there so kudos to you for the solution :)).

    Thursday, March 08, 2012 8:19 PM
  • Thanks for replying and for sharing how you've managed to get it to work. I did check the DeviceMetaDataStore on my PC, and only found one copy of the metadata file that was relevant to the USB-FX2 device. I did the same steps as you did, but haven't had any luck getting it to work yet.

    Did you get this working on the Windows 8 Consumer Preview, and not the earlier Developer Preview?

    Thursday, March 08, 2012 10:17 PM
  • That was on consumer preview. Someone here also suggested uninstalling the app. It has solved the problem for him before.
    Thursday, March 08, 2012 11:12 PM
  • Were any changes needed in the USB-FX2 device driver sample code, device metadata file or the MoFx2App app needed to get it to work on Consumer Preview? I used the sample app and driver code that I got directly "on-line" via Visual Studio 11 Beta after the Consumer Preview was released.

    Monday, March 12, 2012 2:55 PM
  • I will look into this for you.

    Best Wishes - Eric

    Monday, March 12, 2012 8:22 PM
    Moderator
  • Thanks, Eric - your help would be very much appreciated!
    Tuesday, March 13, 2012 4:24 AM
  • Is this the 32 or 64 bit version of Win8 Consumer Preview?

    Best Wishes - Eric

    Thursday, March 22, 2012 4:55 PM
    Moderator
  • 64-bit version - thanks.

    Friday, March 23, 2012 7:56 PM
  • Litezen,

    Have you enabled test signing on the system and then rebooted?

    Best Wishes - Eric

    Saturday, March 24, 2012 12:24 AM
    Moderator
  • Use traceview from the WDK to view the error messages reported from deviceaccess.dll.  The output from that will tell you what part of the authentication process failed.  If you point traceview at the public symbol server, you should be able to add deviceaccess.dll to your trace session through the UI and get trace message decoding.

    If you don’t have test signing enabled on the system (and haven’t rebooted since enabling it) the device metadata system won’t set the properties that enable device access.  But it will set the other properties, so you may still see the fancy device icon.

    The instructions below will help you figure out if the device property is actually being set on their device.

    DRAFT instructions:

    Debug the device container properties by Using Ddodiag.exe If you debug a device metadata package problem or any device properties problem, we recommend that you use Ddodiag.exe.

    Beginning with Windows 7, the Ddodiag.exe supports listing all values of the device properties in device containers.

    Follow these steps to run Ddodiag.exe:

    1.    Launch command prompt.

    2.    Type “Start /wait ddodiag.exe –o <Filename.xml>” and hit enter key.

    3.    Type notepad.exe <Filename.xml>.

    Note:  The xml contains all properties of device containers in the system. If you are investigating given specific device problem, find the hardwareID or ModelID in the XML output file and see the properties of the device container. If you are investigating whether given property value is set or not, try to find the value in that XML output file.

    Here is how you can quickly tell if Device Metadata is installed properly:

    1.       For the relevant Hardware ID - look for the DDO element (the device container) and see all properties that belong to the container.   One of the properties is MetadataPath. 

    2.       If filename listed in MetadataPath does not match the target name, it isn’t installed properly and solution is to re-install the device metadata.


    If device metadata is installed properly, the values you set for Manufacturer Name or Package Name for that Hardware ID should be listed properly.  At this point, look for the relevant properties needed are properly declared in device metadata.

     Best Wishes - Eric

    Saturday, March 24, 2012 6:26 PM
    Moderator
  • I wonder to know why I can`t find the metadata file in the folder "C:\ProgramData\Microsoft\Windows\DeviceMetadataCache\dmrccache" and "C:\ProgramData\Microsoft\Windows\DeviceMetadataStore\en-US".
    Did I miss something ? or What should I do to install the metadata?
    Monday, August 06, 2012 10:21 AM