Every network has a security policy, for e.g. lock user account if he enters wrong password five times. So is it possible to find out whether a user’s account is locked? Yes use active directory services interface pointer IADsUser. So here is a function which returns true if account is locked… [sourcecode language=’cpp’]#pragma comment(lib, “ActiveDS.lib”) […]
Continue reading…
Posts tagged with 'IADsUser'
How to get last login and logoff time of a user?
I would suggest you IADsUser COM interface. There are two functions exposed by this interface which gives us last login and logoff time! get_LastLogin get_LastLogoff Here is some sample code which uses above functions to retrieve a users last login and logoff time… [sourcecode language=’cpp’]#pragma comment( lib, “ActiveDS.lib” ) // For ADsGetObject #pragma comment( lib, […]
Continue reading…