-
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.
-
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
-
I think that it's -- I was trying to do the same, but on the wrong side of the equal sign :eek:
Thank you.