DIFx issue during printer installation.
Posted: Mon Jul 19, 2010 4:40 am
I've successfully created a printer driver using C++. Outside of my IA9 (R2) project I have the relevant files that are used to install and register the printer. I can manually create the printer in Win 7 using the Devices and Printers control panel and then right-click to Add a Printer. All of that works ok and once I've selected the .inf the printer is successfully installed and works ok. As I understand it, if I add a DIFx statement to my project and wire it up to the same .inf file, will that actually create the printer for me? That's what I was hoping to see.
I've added output variables to the DIFx statement and it returns 1 in the variable for # Copied and 0 in the others so it seems to be doing something. I was hoping I'd see a new printer created but there's nothing listed. It's likely I'm missing the point of what DIFx should do but could someone give me some insight into it? I'm not sure if I need to do something else in my MSIcode after the DIFx statement that will actually register the printer.
As I say, everything works if I do it manually. Any ideas?
Edit: There is a Windows winspool.dll function called AddPrinter which I might need to use? Perhaps there's an easier way but if I have to use it, I'll make a plan.
I've added output variables to the DIFx statement and it returns 1 in the variable for # Copied and 0 in the others so it seems to be doing something. I was hoping I'd see a new printer created but there's nothing listed. It's likely I'm missing the point of what DIFx should do but could someone give me some insight into it? I'm not sure if I need to do something else in my MSIcode after the DIFx statement that will actually register the printer.
As I say, everything works if I do it manually. Any ideas?
Edit: There is a Windows winspool.dll function called AddPrinter which I might need to use? Perhaps there's an easier way but if I have to use it, I'll make a plan.