Here's the situation. I'm running XP and I've got two users with
admin privileges, call them A and B.
0. Boot system.
1. Log on user A.
2. Switch user (but don't log off A) to user B.
3. Run the printer driver installer which was provided (with source
code) from a third party.
Result:
The call to AddPort() fails with Windows Error 50
(ERROR_NOT_SUPPORTED).
The call which fails is: AddPort(NULL, NULL, lpMonitorName)
One wrinkle is that it appears to depend on who first logged on. For
example, if I add the following step 2.5, the error does not occur:
2.5. Switch user (but don't log off B) back to user A.
Another wrinkle is that I have a unicode-based version of the
installer which has the same problem but returns a different error
code: 5 (ERROR_ACCESS_DENIED).
The third party claims that this is a limitation of the AddPort call,
and that the question should be addressed to Microsoft.
But wouldn't that imply that, in general, if an admin user is logged
on, it's not possible for any subsequent admin user to log on and
install a printer driver? I wouldn't expect that behavior.
Thanks for any explanations or clarifications.