By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,033 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,033 IT Pros & Developers. It's quick & easy.

Determine disabled status

P: n/a
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

Feb 16 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

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

Feb 16 '06 #2

P: n/a
"James" <jk****@hotmail.com> schrieb
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


You found it in the MSDN documentation. If you use it's search function (for
ADS_UF_ACCOUNTDISABLE), I get 7 search results. There's also an example in
VB(6). That's what I would read first.

Armin

Feb 16 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.