none
debug dll not working in xp RRS feed

  • Question

  • hi all,
     
        we are developing an xps based printer driver. We are creating a dll and placing that to in the folder C:\WINDOWS\system32\spool\drivers\w32x86\3.

       The dll is working fine in vista, But it is unable to work in xp.

       At lost, we found a solution that, by changing _tfopen_s() to _tfopen() in the code, which is used to generate the dll,
    we can able to make the dll working in xp. 

      the issue now is, in xp, if we build the dll in release mode it works fine.
      but it fails if we build in debug mode

      We are using MSVC2005 for building.

      could any body help me to resolve this issue?

      regards
      Ramesh  
      

     


    I want to share about xps printer driver
    Thursday, April 16, 2009 7:26 AM

All replies

  • Whenever you ask a question and say "doesn't work" or "fails", your question does not work without specifics about what doesn't work or fails and/or how it doesn't work or it does fail.


    Sam Hobbs; see my SimpleSamples.Info
    Friday, April 17, 2009 7:11 PM
  • Does the XP system have Visual Studio installed?

    If not, the debug build will not work.  Debug builds require the debug versions of the Visual C++ runtime libraries, which are only distributed with Visual Studio (and may not be distributed otherwise).

    Friday, April 17, 2009 7:30 PM
  • yes the xp machine contain the Visual Studio(MSVC2005) in it.

    sorry, in my question fail means we are unable to print by using that dll.( But we can able to build in MSVC2005 properly, and the dll is creating fine).

    regards
    Ramesh


    I want to share about xps printer driver
    Monday, April 20, 2009 5:35 AM
  • What errors are you receiving when you try to use your driver?  Do you have any form of assertions that are failing?
    Monday, April 20, 2009 4:10 PM
  • One of the MVPs (Joseph Newcomer) posted a FAQ on release-build issues. I recommend you look it over. If it doesn't solve your issues, you'll have to post some code and specific error messages you're receiving.

    http://www.flounder.com/debug_release.htm

    -PaulH
    Monday, April 20, 2009 9:19 PM
  • Thank you all

    in usual manner, the code should break at
    DllGetClassObject(). But with debug dll the code is not even breaking there it self.

      The actual thing what is happening is, the print job just spooling and goes off, but not coming to the status of printing.

    I am getting no error message or assertion.

    I read this article http://www.flounder.com/debug_release.htm, but there I found only matter related to "what if debug works but release fails". But my problem is "Release works but debug fails".


    I want to share about xps printer driver
    Tuesday, April 21, 2009 6:06 AM
  • Please check the dependencies of Release DLL and Debug DLL using Dependency Walker.

    Use the latest version of Dependency Walker
    Tuesday, April 21, 2009 11:37 AM
  • Dear Albin Baby,

       
    • Earlier we used DependencyWalker tool, to figure out the unsupported API’s (_tfopen_s, _tfscanf_s). Then we changed those API’s to _tfopen(),_tfscanf(). Now Release build is working fine
    • But with Debug dll, DependencyWalker is not showing any unsupported API’s, which we are using in our project.    
         we are using Dependency Walker v2.2

         can you please tell me which is latest version in Dependency Walker?

    Regards
    Ramesh
         
        
    I want to share about xps printer driver
    Tuesday, April 21, 2009 12:23 PM
  • Dear Albin Baby,

    we are exaclty using Dependency Walker v2.2.6000
    I want to share about xps printer driver
    Tuesday, April 21, 2009 12:28 PM
  • V2.2 is the latest version which supports Side-by-Side configuration
    Tuesday, April 21, 2009 12:36 PM
  • I hope that you are able to load the debug DLL in WinXP machine.
    Tuesday, April 21, 2009 12:38 PM
  • Dear Albin Baby,

         We can able to load the debug dll in WinXP machine.
         But we are not getting any unsuppoerted function which we are using in code


    I want to share about xps printer driver
    Wednesday, April 22, 2009 4:58 AM
  • Dear Albin Baby,

         I have a small question,

            If we remove msvcrt.dll from project properties -> linker -> input ->Additional Dependencies.

            and
    making IgnoreAllDefaultLibraries to No, the problem is solved. Now the dll is working fine in xp.

            ( but these settings are not allowed with our standards)

            can u please tell me what would be the wrong now

    Regards
    Ramesh

           
    I want to share about xps printer driver
    Tuesday, April 28, 2009 6:35 AM
  • If this were an application DLL, I would suggest that you create a new project and then merge the source code into the project. That would likely be the easiest way to ensure that the project settings are set correctly.

    Since the DLL is for a driver, I suggest checking the driver development documentation to determine what should be used for the project. If you need help with that, the ask in a forum or newsgroup that driver development is the explicit topic. You are much more likely to get help from someone that can help if you ask in a forum or newsgroup that driver development is the explicit topic. Before doing that, however, you really need to read the relevant documentation because driver developers are likely to expect that you do that before asking for their help.

    Years ago, before the internet was commonly avialable, and before 32-bit Windows existed, I learned about driver development and about Windows programming and about Windows. I was able to develop a driver that worked by reading the documentation. I got no help from anyone. For something as technical as a driver, developers need to be able to read documentation. So please check the documentation to determine if IgnoreAllDefaultLibraries is the correct setting for a driver.

    Sam Hobbs; see my SimpleSamples.Info
    Tuesday, April 28, 2009 2:55 PM
  • Hi all,

       Finally I figure out the problem,

       We are usinng MSVCPRTD.LIB, MSVCRTD.LIB from WDK6001.18001.

      
    Since we are building our dll with MSVC2005, these libs should look for msvcp80d.dll, msvcr80d.dll respectively.

       But actually these libs are looking for msvcp60d.dll, msvcrtd.dll.

      
    Because those dlls are not available in my machine, my dll is getting failed to execute.

       Could anybody please help me to figure out the issue?

    Regards
    Ramesh
    I want to share about xps printer driver
    Tuesday, May 26, 2009 6:48 AM

  •    But actually these libs are looking for msvcp60d.dll, msvcrtd.dll.

    Then they were built using VC 6, or at least something in them were.
    Sam Hobbs; see my SimpleSamples.Info
    Tuesday, May 26, 2009 3:47 PM
  •                Then they were built using VC 6, or at least something in them were.

    We are just creating a dll, by building in MSVC2005.

    could you tell me is there any way to find out weather we are building with completely MSVC2005 or not?

    Regards
    Ramesh
    I want to share about xps printer driver
    Friday, May 29, 2009 7:50 AM
  • I assume that there is a static library being used that is not built in the solution. Check the libraries that the project uses.
    Sam Hobbs; see my SimpleSamples.Info
    Friday, May 29, 2009 3:33 PM