#include <qsoasync.h> unsigned long long QsoGenerateOperationId(int socketDescriptor)
The QsoGenerateOperationId() function is used to get an operation identifier that is unique for this socket. The operation identifier may then be used in field operationId in the Qso_OverlappedIO_t structure when an asynchronous I/O operation is started.
It is not required that an application use QsoGetIoID() to set the I/O identifer. Any appropriate application-defined value may be used. Individual operations may use unique operation identifiers or groups of operations could share I/O identifiers, depending on the application's requirements. QsoGenerateOperationId(), when used consistently, is a convenient means to get unique identifiers for use on a socket. Note that operation identifiers from one sockets may not be unique if used on a different socket.
I/O identifiers are ignored by all APIs except QsoCancelOperation() and QsoIsOperationPending(). Other start operations will only preserve the input value and return it on QsoWaitForIOCompletion().
No authorization is required.
QsoGenerateOperationId() returns an unsigned long long operation identifier. Possible values are:
When QsoGenerateOperationId() fails, errno can be set to one of the following:
[EBADF] | Invalid descriptor |
[ENOTSOCK] | The specified descriptor is not a socket. |
[EUNKNOWN] | Unknown system state. |
Message ID | Error Message Text |
---|---|
CPFA081 E | Unable to set return value or error code. |
CPE3418 E | Possible APAR condition or hardware failure. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |