LoadLibrary dependens on user-login 
Author Message
 LoadLibrary dependens on user-login

When running an application as a standard user ("uni01"), a LoadLibrary
The DLL, "currencies.dll", a standard MFC library (no COM) that shall be
loaded, is perfectly well loaded when running as a domain administrator.
"uni01" is only local Administrator.
In the faulty case, LoadLibrary yields "0", and GetLastError() yields
"3765269347" (which is nonsense in my eyes).
Examination showed that even "DllMain" of currencies.dll was not entered,
but it is entered in the success case with domain administrator login
Another Library ("ValidationStandard.DLL") was already loaded before
currencies.dll, and this works always, independently of the user.
I even created (compiled) the currencies.dll as user "uni01" and then again
tried LoadLibrary, to the same effect. So it can't be a security problem.
Perhaps the reason is, that my SQL Server 6.5 already loads the DLL (from
another path) into memory after booting the machine ? But ValidationStandard
is also loaded from SQL Server. So this also can't be the reason.
For checking this I tried to run SysInternal's HandleEx ... but it doesn't
start when I am user "uni01" ("Error installing HandleEx driver").
Who can help ? Is there a privilege missing ?
Might the reason be that the currencies.dll has a CMutex global variable ?
What can be done to further examine ?

Additional Infos:
OS is Win NT 4.0 SP 5.
API is LoadLibraryA (Ansi version).

Thu, 09 Oct 2003 23:35:35 GMT  
 LoadLibrary dependens on user-login
There should not be special privilege for loading library. I presume that
uni01 is NOT local admin, since using this account is not sufficient enough
to install HandleEx driver. You should check what exact privileges you have
on uni01.
Next there could indeed be problems with privileges, but to expose them you
should at least get currencies.dll loaded and running.
If you for example load library on behalf of domain administrator or system
and create any kernel object (mutex, event, mapped file) those object get by
default current account security attributes. As a normal user you cannot
then access those object, even they were meant to be shared.
Nevertheless, if this is a case, I would expect that some initialization
function of kernel object fails and you should get the error message
Richard Musil

Fri, 10 Oct 2003 16:41:50 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Login name/User ID of a Novell user from VC

2. Login failed for user 'DESARROLLO\ASPNET'

3. User login status from a Windows Service?

4. Get Windows2000 Login User name in ANSI-C

5. How to prevent users from shutting down at the login prompt

6. How to get login users cached info?

7. How to handle user login event?

8. How to obtain the login time and the idle time of the user

9. How to get the status of user login domain

10. Need some info on obtaining the users login name when they start the

11. How to handle user login event?

12. how to obtain the login time and the idle time of the users


Powered by phpBB® Forum Software