473,473 Members | 1,730 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Determine disabled status

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
2 3674

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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: OvErboRed | last post by:
Hi, I'm trying to determine whether a given URL exists. I'm new to Python but I think that urllib is the tool for the job. However, if I give it a non-existent file, it simply returns the 404 page....
0
by: Dave | last post by:
How do I programatically read the enabled or disabled status of accounts? Have read the msdn article: http://msdn.microsoft.com/library/default.asp? url=/library/en-...
3
by: dave | last post by:
How do I programatically determine the enabled or disabled status of AD accounts? I have queried the userAccountControl key, but all I get back is an int, and it seems to be the same for enabled...
6
by: Stu Carter | last post by:
Hi, I have an aspx page where some controls are initially disabled by the code-behind 'Page_Load' event. I want these controls to be dynamically enabled when the user checks a checkbox. ...
2
by: Chris Carter | last post by:
We have a site, for reference I'll call this MainSite, that has certain pages actually hosted on another site, I'll call this ChildSite. In MainSite when you click on a certain link, it loads a...
1
by: Nick Goloborodko | last post by:
Hi, For the purposes of my application, i need to determine is the client side browser had JavaScript and cookies enabled. How do i go about this? Is there a way to do this with the first...
0
by: Roz Lee | last post by:
I need to determine whether the client browser has disabled the Active Scripting option in their browser security settings as they will be unable to log in to my asp.net site if they have, in which...
7
by: semedao | last post by:
Hi all, I view many posts about this issue , the connected property does not tell us the current status of the socket. based on couple of suggestions of msdn , and some article here , I try to...
17
by: govolsbaby | last post by:
Is there a way to leave the button forecolor unchanged when it is disabled? I have multiple buttons on the form and depending on various user inputs, some will or will not be enabled but I'd...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.