Specify_Windows_Handle

The Specify_Windows_Handle call (function name xchwnd) sets the Windows handle to which a message is sent on completion of an operation in nonblocking mode.

CM_ENTRY Specify_Windows_Handle(
  HWND hwndNotify,           
  CM_INT32 FAR *return_code  
);
 

Parameters

hwndNotify
Supplied parameter. Specifies the Windows handle to be notified when the outstanding operation completes.
return_code
The code returned from this call. The valid return codes are listed below.

Return Codes

cm_ok
Primary return code; the call executed successfully.
cm_program_parameter_check
The Windows handle is invalid.
cm_product_specific_error
Primary return code; a product-specific error occurred and has been logged in the product's error log.

State Changes

The state change is dependent on the operation that completed and its return code.

Remarks

An application can set the processing mode by calling Set_Processing_Mode. If the Windows handle is set to NULL, or this call is never issued, then the application must call Wait_For_Conversation to be notified when the outstanding operation completes.

When an asynchronous operation is complete, the application's window hwndNotify receives the message returned by RegisterWindowMessage with "WinAsyncCPIC" as the input string. The wParam value contains the conversation_return_code from the operation that is completing. Its values will depend on which operation was originally issued. The lParam argument contains the CM_PTR to the conversation_ID specified in the original function call.