(Page 1 of 1 in this chapter) Version
|
Characteristic
|
Asynchronous
|
Synchronous
|
|---|---|---|
|
Operation complete when function returns.
|
No
|
Yes
|
|
Returns a DONE event when function is complete.
|
Yes
|
No
|
|
Function can fail after function returns.
|
Yes
|
No
|
Figure 4. Asynchronous Programming Model
Figure 5. DPNSS Application Flowchart
typedef struct CTA_EVENT
{
DWORD id; /* event id (LIBEVN_xxx in 'libdef.h') */
CTAHD ctahd; /* CTA context handle */
DWORD timestamp; /* timestamp */
DWORD userid; /* user-supplied ID */
DWORD size; /* size of buffer if buffer is not NULL */
void *buffer; /* buffer pointer */
DWORD value; /* Event status or reason or other data */
DWORD reserved; /* must be 0 */
} CTA_EVENT;
(Page 1 of 1 in this chapter) Version