Hi , I want to use if for a bool parameter how do I have to use it.
Is "if (CH341SetDeviceNotify=='true')" correct?
Please clarify me by an example.
Thanks
Hi , I want to use if for a bool parameter how do I have to use it.
Is "if (CH341SetDeviceNotify=='true')" correct?
Please clarify me by an example.
Thanks
Don't you read the doc ? =>
BOOL WINAPI CH341SetDeviceNotify(
ULONG iIndex,
PCHAR iDeviceID,
mPCH341_NOTIFY_ROUTINE iNotifyRoutine );
If CH341SetDeviceNotify is a bool, you just need:
if (CH341SetDeviceNotify)
And if CH341SetDeviceNotify is not a bool, you could use
if (CH341SetDeviceNotify != 0)
You should keep in mind that BOOL and bool are not the same thing.
Also TRUE/FALSE are not the same as true/false.
What is the difference between BOOL and bool?
https://stackoverflow.com/questions/6420526/what-is-the-difference-between-bool-and-bool
Wayne
8 people are following this question.