非同期呼び出しの完了

1 つの例外を除き、Microsoft® Host Integration Server では、接続ごとに未処理の Windows® SNA 非同期呼び出しが 1 つ、スレッドごとに 1 つのブロック動詞が許可されます。 例外として、非同期受信呼び出しを発行する際に、受信が保留中の間、次の呼び出しを発行できます。

  • Cancel_Conversation

  • 割り当て解除

  • 送信要求

  • Send_Error

  • 送信受信テスト要求

    これにより、アプリケーション (特に 5250 エミュレーター) で非同期 受信 を使用してデータを受信できます。 この機能を使用することを強くお勧めします。

    次の例は、Host Integration Server で非同期呼び出しの完了を使用する方法を示しています。

void ProcessVerbCompletion (WPARAM wParam LPARAM lParam)  
{  
    for ( i = 0; i<nPendingVerbs; i++ )  
        if (memcmp  (pPending [i].ConvID, (Conversation_ID) lParam)== 0)  
            ProcessCommand  (wParam, lParam);  
}  
  
LRESULT CALLBACK SampleWndProc  ( . . .)  
{  
    if (msg = = uAsyncCPIC ) {  
        ProcessVerbCompletion (wParam, lParam);  
    }  
    else switch  (msg)  {  
       case WM_USER:  
        Initialize_Conversation (lpConvId, "GORDM", &lError  );  
        if  (lError  ! = CM_OK )   {  
            ErrorDisplay ( ) ;  
            break ;  
        }  
        Set_Processing_Mode (lpConvId, CM_NON_BLOCKING, &lError  ) ;  
        if  ( lError ! = CM_OK )  {  
            ErrorDisplay ( ) ;  
            break ;  
        }  
        Allocate  (lpConvId,  &lError )  ;  
        switch  (lError )  {  
        case CM_OK:  
            break ;  
        case CM_OPERATION_INCOMPLETE:  
            memcopy (pPending [nPending ++].ConvId, lpConvId, sizeof (C) ;  
            break ;  
        default:  
            ErrorDisplay ( ) ;  
        }  
        break ;  
}  
WinMain  ( . . . )  
{  
    if  ( ( WinCPICStartup  ( . . . )  =  =  FALSE  )   {  
        return FALSE;  
    }  
    uAsyncCPIC = RegisterWindowMessage  ("WinAsyncCPIC"");  
    Specify_Windows_Handle  (hwndSample) ;  
    while  (GetMessage  ( . . . )   )   {  
    . . . . .  
    }  
    WinCPICCleanup  ( . . . )  
}  

CPI-C 呼び出しと Windows 拡張機能の詳細については、「Windows 環境 のCPI-C 呼び出し拡張機能」を参照してください。 CPI-C の使用の詳細については、 IBM システム・アプリケーション・アーキテクチャの共通プログラミング・インターフェース通信リファレンス、部品番号 SC26-4399-04 を参照してください。