-
! operator confusion
MSDN says if DeviceIoControl completes successfully, the return value is non zero.
Given this code:
Code:
if(!DeviceIoControl(<parameters>)
{
<code>
}
Is this the same thing?
Code:
BOOL bSuccess;
bSuccess = DeviceIoControl(<parameters>)
if(bSuccess == 0) //function call failed
{
<code>
}
(I know this is very basic, but the ! operator always causes me great confusion,
especially when some functions succeed return is zero, and others is non-zero.)
-
Re: ! operator confusion
Code:
BOOL bSuccess;
bSuccess = DeviceIoControl(<parameters>)
if(bSuccess == 0) //function call failed
{
<code>
}
this is only true when u have return type of function DeviceIoControl is BOOL
-
Re: ! operator confusion
... but you are saying for DeviceIoControl specifically, my interpretation/code is correct?
-
Re: ! operator confusion
-
Re: ! operator confusion