|
-
Aug 22nd, 2001, 01:58 PM
#1
Thread Starter
Black Cat
API constant masks
Suppose you have a DWORD type value that could be API_CONST1 or API_CONST2, or both.
Through VB, how do you handle the situation where its both, so "If value = API_CONST1 Then" would fail even though the value is API_CONST1 masked with the other constant?
Thanks.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Aug 22nd, 2001, 02:13 PM
#2
Frenzied Member
If I understand your question I think this is the answer.
lValue contains the sum of APIConst1 and APIConst2.
Code:
If (lValue And APIConst1) = APIConst1 Then
End if
Greg
Free VB Add-In - The Reference Librarian
Click Here for screen shot and download link.
-
Aug 23rd, 2001, 06:12 AM
#3
Thread Starter
Black Cat
I think that it's -- I was trying to do the same, but on the wrong side of the equal sign
Thank you.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|