CreateDeviceAccessInstance + GetResult() E_ACCESSDIED. RRS feed

  • Pergunta

  • I want use metro app to connect with my filter diver,but when i call GetResult() it return E_ACCESSDENIED.

    I have do following steps:

    1. Ensure that the driver inf has the property key set to enable access to metro applications.

    2. The device metadata has been authored for the device and it has been loaded into the system.

    3. The device metadata has the right information notably the PrivilegedApplications section

    4. The application manifest as the interface guid declared as a DeviceCapability.

    Here is my code:

    void BlankPage::OnNavigatedTo(NavigationEventArgs^ e)
     HRESULT hr;
     ICreateDeviceAccessAsync *pDeviceAccess = nullptr;
     PCWSTR   pszDeviceInterfacePath = L"\\\\?\\ACPI#VPC2004#0#{982dad72-f7f0-4b4a-8b73-f1315162cb8f}";
     IDeviceIoControl        *pDeviceIoControl = nullptr;    // Handle to the IDeviceIoControl for the device instance

        hr = CreateDeviceAccessInstance( (IID_IDeviceIoControl, pszDeviceInterfacePath,GENERIC_READ,&pDeviceAccess);
        if (FAILED(hr)) {
            return ;

        hr = pDeviceAccess->Start();
        if (SUCCEEDED(hr)) {
            hr = pDeviceAccess->Wait(INFINITE);   //-----E_ACCESSDNIED

        if (SUCCEEDED(hr)) {
            hr = pDeviceAccess->GetResult((void **)&pDeviceIoControl);

     Anyone could help me? thanks

    quarta-feira, 1 de fevereiro de 2012 06:15



    I remember Metro Style App does not support filter driver. But I'm not sure.  

    Also you can try your question at this forum.

    sexta-feira, 3 de fevereiro de 2012 08:06