none
WDK 8-Print Monitors-Unable to install Port Mon on Windows 8 RRS feed

  • Question

  • Hi,

    I have been using WDK 7 to create customized printer port monitors which creates post script file to disk location. This is working fine for Win XP (32 bit), Win7(64bit), Win Server 2003 (32bit).

    However, now the reqirement is also to support Windows 8 and Win Server 2012.

    Hence I have downloaded WDK 8 and installed it. I have built the previous port mon code using Visual Studio 2012 Professional with build config as "Win8 Debug", Win32(32bit)  to create ddklocalmon.dll, ddklocalui.dll. but when I tried to install the port, it throws the error saying "An error occured installing port monitor.Please contact manufacturer for assistance". I have even tried installing dlls created using MSbuild (VS2012) but throws same error.I tried with Release build as well for above but did not work.

    I have even tried to install Print Monitor Sample for WIn8 and Win Server 2012 from code.msdn.microsoft.com_windowshardware_Print-Monitors-Samples-edc9d19e(Replace_with /)  But gives same error.

    Note: OS is Windows 8 Release Preview build 8400.

    Please let me know, how to fix this issue.

    Thanks,

    Ramaprasad

    Monday, October 1, 2012 7:28 AM

All replies

  • are you installing the VS CRT as well?  look at your imports and see which CRT you are using.

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

    Monday, October 1, 2012 3:47 PM
  • Hi Doron,

    I have checked the version of CRT using below command. It is MSVCR110D.dll.

    D:\>dumpbin /all ddklocalmon.dll | find /i "msvcr"
      1000B610: 4D 53 56 43 52 31 31 30 44 2E 64 6C 6C 00 5D 01  MSVCR110D.dll.].
        MSVCR110D.dll

    I have downloaded and installed runtime from msdn. But still no luck.... I have even manually copied the dll to System and System32 folder.

    Am I missing something here?

    Please help...

    Thanks,

    Ramaprasad

    Wednesday, October 3, 2012 4:47 AM
  • the D version is the debug version, I don't think the packages you listed on the msdn link redist the debug version. btw, since you have VS2012, you don't need to download the redist from the web, the binaries are on your machine somewhere in the VS root.  create a release build which should link against the release version of the CRT and see if that works.

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

    Wednesday, October 3, 2012 5:08 AM
  • Hi Doron,

    I took WDK7 portmon dll built using BUILD.EXE for WinXP 32bit and deployed to remote Win8 -32bit (Note, not the one having VS 2012), It deployed successfully.

    Now I have questions,

    - I read that portmon dlls has to be built using VS 2012/MSBuild to be able to deployed to Win8. Is this not true?

    - Based on the above result, can I say that my 32bit (WinXP build) and 64bit(Win7 build) portmon dlls can be used in Win 8 and WinServer 2012 directly without rebuilding required using VS 2012/MSBuild?

    Please clarify...

    Thanks,

    Ramaprasad

    Thursday, October 4, 2012 7:24 AM
  • the win7 wdk build deployed successfully because you linked against the windows CRT (msvcrt.dll). we don't want 3rd parties doing that anymore, so we removed that capability in the win8 wdk.  it still works for backwards compat. while it may deploy successfully, there may be whck logo checks that make sure you use the right CRT


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

    Thursday, October 4, 2012 2:53 PM
  • Hi Doron,

    Thanks for the clarification. In my case, I have the portmon dll calls VC++ console exe after creating postscript files which interns calls .NET Winform application.

    This VC++ exe is created for UAC reason (Vista and above) which will use CreateProcessAsUser to invoke .NET exe. I am facing the issue in Win8 that it is not able to invoke the .NET exe. Does it mean I need to have CRT for the VC++ exe to be deployed on Win8? I can see MSVCR90.dll has been used by the exe.

    If yes,

    Can I just copy the dll to system32 folder or I need to install it from msdn?

    Thanks,

    Ramaprasad

    Friday, October 5, 2012 4:08 AM
  • you should not copy it directly. you should use the provided redist package that VS2008 comes with to install the CRT

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

    Friday, October 5, 2012 4:13 AM
  • Thanks Doron,

    I have searched the C drive for the dll and found it in WinSxS folder. Does it mean I dont need to install redist package for VS2008 (CRT)?

    If Yes,

    Any Idea on what would be blocking WIN 8 - >CreateProcessAsUser not able to invoke .NET exe which worked fine in Win7 (64bit), WinXp(32bit), Win Server 2003(32bit)?

    Regards,

    Ramaprasad

    Friday, October 5, 2012 5:20 AM
  • on your machine, it is installed. on your customer's machine, probably not.  win8 doesn't have this crt installed by default, the other systems might other software which isntalled the CRT and you are just relying on them doing the hard work.

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

    Friday, October 5, 2012 6:20 AM
  • Hi Doron,

    In my project I have 2 MSVCR* dll dependancies -

    1. portmon dll created by WDK7 using msbuild=> depends on msvcrt.dll

    2. VC++ application exe => msvcr90.dll

    In second case (msvcr90.dll), I have  created a manifest and mapped to the dll located in application path (http://blog.kalmbach-software.de/2008/05/03/howto-deploy-vc2008-apps-without-installing-vcredist_x86exe/) so that I dont need to install VCRedist.

    However, for the first case(msvcrt.dll) how can I achieve the same thing as above. I use WDK's msbuild to create dlls.

    Thanks,

    Ram

    Wednesday, October 10, 2012 11:20 AM