none
SwapAPO sample installation in Windows 8 - device cannot start RRS feed

  • Question

  • Has anyone successfully deployed in Win8 the SwapAPO sample supplied with WDK 8.0?

    For me it compiles cleanly with MSVS Professional 2012 (Version 11.0.50727.1) and WDK 8.0 (both SwapAPO.dll and PropPageExt.dll with either /MDd or /MD runtime). I can install with enclosed sysfx.inf on my target system (Windows 8 RTM, 32bit), but then THE PROBLEM: "the device cannot start". This is due to unsatisfied dependencies on MSVCR110.DLL and IESHIMS.DLL or their debug versions in the case of debug build. The following attempts didn't help:

    - installed full VS2012 and WDK 8.0 in the target system (not desirable since I want to keep it small) and rebuild there

    - tried to hack with linking statically, copying some dll's---always some problem with unsatisfied dependencies, unresolved symbols...

    Do I miss something? What is the way to get it running? I want to use the example to study APO behaviour on a platform with audio offload support available, but got stuck :-(

    Kind regards,

    Krzysztof

    P.S.

    This post is of course closely related to another: "SYSFx APO DLL built using VS 11 beta Proffesional does not register" but there is no answer there. And so I changed the classification...


    Monday, November 19, 2012 11:29 AM

All replies

  • there is a CRT redist exe you can use to get the CRT onto the machine, you don't need to install VS. I don't think the redist exe installs ieshims.dll though. can you loadlibrary the DLL on the machine under test in a test application?  what does depends.exe say when you point it at the DLL on the machine under test?

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Monday, November 19, 2012 7:42 PM
  • Thanks for your prompt reply!

    depends.exe says that it can't find MSVCR110.DLL and IESHIMS.DLL on the test system, just as I've already written.

    I've run vcredist_x86.exe and it seems to solve missing MSVCR110.DLL problem. But still short of IESHIMS.DLL...

    Tuesday, November 20, 2012 1:54 PM
  • There is a IESHIMS.DLL in C:\Program Files\Internet Explorer and somewhere below C:\Windows\WinSxS. So I tried a crude hack and copied the dll from IE directory to system32. Now it's not missing but STILL A PROBLEM (as reported by depends.exe):

    "Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
    Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module."

    The error probably applies to API-MS-WIN-CORE-SYNCH-L1-1-0.DLL --- function InitOnceExecuteOnce, entry point not bound

    The warning probably applies to a few cases like EXT-MS-WIN-ADVAPI32-PSM-APP-L1-1-0.DLL --- function PsmRegisterAppStateChangeNotification, entry point not bound

    Tuesday, November 20, 2012 2:10 PM
  • do you know why ieshims.dll is a dependency? it seems like quite an odd dependency to have in your DLL

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, November 20, 2012 5:19 PM
  • True, but that's how this sample compiles out of the box ;-) Seriously now---I'll check it.

    Despite what depends.exe says, regsvr32.exe for both SwapAPO.dll and PropPageExt.dll executes without a sign of problem now. So at least the dll's can be loaded and DllRegisterServer executes. On the other hand the "device cannot start" persists. Now I can/will investigate it closer and write then.  

    Tuesday, November 20, 2012 9:12 PM
  • Back to the "why the dependency" question... The details of what I see come below. The APO code depends directly on OLE32.DLL which seems quite legitimate since it implements a COM object. But then there're dependences between system libraries, broken and sort of unexpected. I also ran depends.exe on system32\OLE32.DLL on my host system (corporate Windows 7 laptop) and there is also missing IESHIMS.DLL! :-(

    So, is it so that OLE32.DLL is deprecated somehow and I should link to some other library? Since Windows 7, I guess?

    DETAILS:

    Exploring depends.exe Tree/ParentImportFunctionListView I get the following dependency path:
    SwapAPO.dll:
      OLE32.DLL: CLSIDFromString CoCreateInstance CoTaskMemFree CoTaskMemRealloc PropVariantClear StringFromCLSID StringFromGUID2
        SHELL32.DLL: ExtractIconW SHGetFileInfoW ExtractAssociatedIconW
          SHDOCVW.DL.L: three N/A's --- OOOPS!
            IEFRAME.DLL: #160 #141
              IESHIMS.DLL: IEShims_CreateWindowEx IEShims_GetOriginatingThreadId IEShims_InDllMainContext IEShims_SetRedirectRegistryForThread IEShims_Initialize

    From the source code:
    $ for f in CLSIDFromString CoCreateInstance CoTaskMemFree CoTaskMemRealloc PropVariantClear StringFromCLSID StringFromGUID2 ; do echo "-- $f" ; find ./APO -name '*.cpp' -exec grep -Hn $f {} \; ; done
    -- CLSIDFromString
    -- CoCreateInstance
    ./APO/swapapogfx.cpp:270:    hr = m_spEnumerator.CoCreateInstance(__uuidof(MMDeviceEnumerator));
    ./APO/swapapolfx.cpp:270:    hr = m_spEnumerator.CoCreateInstance(__uuidof(MMDeviceEnumerator));
    -- CoTaskMemFree
    ./APO/swapapogfx.cpp:591:        CoTaskMemFree(pwstrLocal);
    -- CoTaskMemRealloc
    -- PropVariantClear
    ./APO/swapapogfx.cpp:263:            PropVariantClear(&var);
    ./APO/swapapogfx.cpp:324:            PropVariantClear(&var);
    ./APO/swapapolfx.cpp:263:            PropVariantClear(&var);
    ./APO/swapapolfx.cpp:324:            PropVariantClear(&var);
    -- StringFromCLSID
    -- StringFromGUID2


    Wednesday, November 21, 2012 9:55 AM
  • Hi did you ever solve your problem? For me the problem is iTunes keeps crashing and running the dependency walker shows ieshims.dll.. so I threw it in the system32 folder and like you said now it doesnt say its missing but now says Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module. Any ideas? Thanks
    Tuesday, October 15, 2013 9:33 PM
  • Hi davekats. This is an old one, so I don't remember :-( Supposedly yes, it was solved, but please give me some time and I'll look into it again and come back in 2-3 days, probably... 


    Krzysztof

    Tuesday, October 15, 2013 9:58 PM