I created a program many years ago that includes the statements:
Dim printerDefaults As WinspoolH.PRINTER_DEFAULTS
printerDefaults.desiredAccess = WinspoolH.PRINTER_ALL_ACCESS
ret = OpenPrinter(printerName, printerHandle, printerDefaults)
I have an administrator signin account and this use to let me open OK.
Now it fails as if I do not have the correct privileges.
I'm guessing the code should say the privilege is needed and ask me if I want to continue. The same way Windows ask before it will do some things that require elevated privileges.
I have no idea how to do that. Can you show me how to get privilege to change default printer orientation?
Or if I'm wrong above, what to do?
.
Dim printerDefaults As WinspoolH.PRINTER_DEFAULTS
printerDefaults.desiredAccess = WinspoolH.PRINTER_ALL_ACCESS
ret = OpenPrinter(printerName, printerHandle, printerDefaults)
I have an administrator signin account and this use to let me open OK.
Now it fails as if I do not have the correct privileges.
I'm guessing the code should say the privilege is needed and ask me if I want to continue. The same way Windows ask before it will do some things that require elevated privileges.
I have no idea how to do that. Can you show me how to get privilege to change default printer orientation?
Or if I'm wrong above, what to do?
.
Last edited: