Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. AddPrinter() fails with Error Code 126

AddPrinter() fails with Error Code 126

Scheduled Pinned Locked Moved C / C++ / MFC
help
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dubbele onzin
    wrote on last edited by
    #1

    Hi all, it's very helpful for me. i have created an application to install an printer Locally through INF file.when a call AddPrinter() function it fails with error code 126(specified module could not be found) Although i have initalise all the parameter as mention in MSDN( You must specify non-NULL values for the pPrinterName, pPortName, pDriverName, and pPrintProcessor members of this structure before calling AddPrinter. ). but it failed and initialisation is correct for that from my end......is there any reson to fails this function. plz help me.Thanks in Advance. Ashish

    N 1 Reply Last reply
    0
    • D dubbele onzin

      Hi all, it's very helpful for me. i have created an application to install an printer Locally through INF file.when a call AddPrinter() function it fails with error code 126(specified module could not be found) Although i have initalise all the parameter as mention in MSDN( You must specify non-NULL values for the pPrinterName, pPortName, pDriverName, and pPrintProcessor members of this structure before calling AddPrinter. ). but it failed and initialisation is correct for that from my end......is there any reson to fails this function. plz help me.Thanks in Advance. Ashish

      N Offline
      N Offline
      Nelek
      wrote on last edited by
      #2

      Have you checked the path to the *.inf file?

      Greetings. -------- M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups