none
Printer driver UI and modern applications RRS feed

  • Question

  • Have found a sample for printer UI from wdk8.1. Have modified uniuirep sample and have a strange behavior in the modern application (such as Microsoft  Edge):

    1) Install printer driver;

    2) Open Edge browser and trying to print - the result is "We couldn't reach this printer.". Close Edge.

    3) Make some changes in the UI dll, for example, change return value from hrOEMDevMode call to E_NOTIMPL in the

    HRESULT __stdcall
    COemUI2::DevMode(
        DWORD  dwMode,
            // The operation that should be performed
        POEMDMPARAM pOemDMParam
            // The input & output DEVMODEs, including pointers to the public &
            // private DEVMODE data.
        )
    {
        VERBOSE(DLLTEXT("COemUI2::Devmode entry."));
        return hrOEMDevMode(dwMode, pOemDMParam);
    }

    4) Copy new dll to the driver directory "C:\Windows\System32\spool\drivers\x64\3", open Edge and it can print correctly!

    If I save changes in the UI dll and reinstall printer driver with new version of DLL - the result as previous "We couldn't reach this printer." until next dll changes.

    How to fix that behavior? For non-modern applications like notepad.exe UI DLL works fine.

    Tuesday, November 7, 2017 8:17 AM

All replies