James wrote:
vb.net 2003
i read the msdn documentation on Const ADS_UF_ACCOUNTDISABLE = &H2
how do i use the above to determine whether my account is disabled ? The
following does not work.
select case userAccountControl
case ADS_UF_ACCOUNTDISABLE
console.write ("account is disable")
etc etc et
end
The docs indicate that this value is one member of a *flags* type enum,
so each value is a bitflag. Try
If (userAccountControl And ADS_UF_ACCOUNTDISABLE) =
ADS_UF_ACCOUNTDISABLE Then
'account is disabled
End If
(for example, 2, 42, 166, 1048578 are all possible values of
userAccountControl that have this flag set, so testing for equality
won't always work)
--
Larry Lard
Replies to group please