All,
I have a customer that is using XP SP3 to remote connect to a Win 2008 Server computer. When connected the remote connection sets up temporary printer drivers so she can print to her local printers. They are usually defined as "Brother" or "HP Laser" followed by a number. When she disconnects the temporary printers are removed.
If I use the PRINT FROM USER command the user is presented with the correct list of available printers and can select one and print. This works fine.
Elsewhere in our program I use GetProfStr("Devices") to return an array of available printers that I use in a custom Print Setup dialog. The GetProfStr returns an array of previously connected printers but not the current printer(s) defined by the remote session.
Why doesn't GetProfStr return the same list of printers as the printer class? How can I return the same list of printers shown in the print setup window when using PRINT FROM USER?
On a similar note, why does GetProfStr return all the previous temporary printers? Is Windows 2008 Server storing these for each session but not removing them from the registry? Additionally, none of the other programs she uses return these previously connected printers but rather the correct printers for the remote session.
Any help or suggestions would be greatly appreciated.
Thanks,
Randal