Re: AddPort fails when others are logged on
- From: "Kerem Gümrükcü" <kareem114@xxxxxxxxxxx>
- Date: Tue, 5 Jun 2007 01:27:02 +0200
<erasmus70@xxxxxxxxx> schrieb im Newsbeitrag
news:1180998180.471810.325970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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.
Hi Stranger,
maybe the admin user does have a handle opened on some
file, key or whatever and does have exclusive access with
no share permissions to some file, object, reg-key or something
like that. What about trying to run your installer with some
debugger or what about using some tool like process-explorer
or process-monitor from sysinternals to check what and who has
access to what and when. Use Regmon and/or Filemon or better
the process-monitor to see what, when and where the functions
fail. Do a stack-trace to get more info, but i think its not needed
since you know where it fails but propably it can help if there
are subsequent calls to internal functions that fail. You will have
a change to go deeper with some debugger like WinDbg. I think
it is some security problem something with handles exclusively
opened by the logged on user. With these apps you can find
the "culprit". Hope this helps,...
Beste Grüße / Best regards / Votre bien dévoué
Kerem Gümrükcü
-----------------------
"This reply is provided as is, without warranty express or implied."
.
- References:
- AddPort fails when others are logged on
- From: erasmus70
- AddPort fails when others are logged on
- Prev by Date: AddPort fails when others are logged on
- Next by Date: Instruction decoding references
- Previous by thread: AddPort fails when others are logged on
- Next by thread: Instruction decoding references
- Index(es):
Relevant Pages
|
Loading