On Dec 29, 2004, at 9:03 AM, Massimo Sala wrote:
Starting as a new winpcap developers, I have doubts about APIs return codes.
In the help files and the code snippets they look different:
Examples: different functions fails when...
- func() != 0
- func() == -1
- func() < 0
When the function return type is go/no-go, is it always boolean with go= 0
for ALL the API ?
In the libpcap APIs that return only a go/no-go indication, 0 means success and -1 means failure (unless I've missed some that don't). I don't know whether all of the APIs added by WinPcap work that way.
There are, of course, APIs that don't just return a go/no-go indication. In those, -1 usually indicates failure (except for ones returning a pointer, where a null pointer indicates failure).
================================================================== This is the WinPcap users list. It is archived at http://www.mail-archive.com/[email protected]/
To unsubscribe use mailto: [EMAIL PROTECTED]
==================================================================
