## Tcl9.0.3/Tk9.0.3 Documentation > Tcl C API > CrtCloseHdlr

### Tcl/Tk Applications | Tcl Commands | Tk Commands | [incr Tcl] Package Commands | SQLite3 Package Commands | TDBC Package Commands | tdbc::mysql Package Commands | tdbc::odbc Package Commands | tdbc::postgres Package Commands | tdbc::sqlite3 Package Commands | Thread Package Commands | Tcl C API | Tk C API | [incr Tcl] Package C API | TDBC Package C API

  NAME
    Tcl_CreateCloseHandler, Tcl_DeleteCloseHandler — 通信路が閉鎖された時呼戻す為に準備する　 arrange for callbacks when channels are closed
  SYNOPSIS
    #include <tcl.h>
    Tcl_CreateCloseHandler(channel, proc, clientData)
    Tcl_DeleteCloseHandler(channel, proc, clientData)
  引数 ARGUMENTS
    Tcl_Channel channel (入力in)
    Tcl_CloseProc *proc (入力in)
    void *clientData (入力in)
  説明 DESCRIPTION
  SEE ALSO
  KEYWORDS

### NAME

Tcl_CreateCloseHandler, Tcl_DeleteCloseHandler — 通信路が閉鎖された時呼戻す為に準備する　 arrange for callbacks when channels are closed

### SYNOPSIS

#include <tcl.h>
Tcl_CreateCloseHandler(channel, proc, clientData)
Tcl_DeleteCloseHandler(channel, proc, clientData)

### 引数 ARGUMENTS

Tcl_Channel channel (入力in)
  回収を作成､削除すべき通信路｡ The channel for which to create or delete a close callback.

Tcl_CloseProc *proc (入力in)
  呼戻しとして呼出すべき手続き函数｡ 　　 The procedure to call as the callback.

void *clientData (入力in)
  手続き函数 proc に渡す任意の一語値｡　 Arbitrary one-word value to pass to proc.

### 説明 DESCRIPTION

Tcl_CreateCloseHandler は channel が Tcl_Close か Tcl_UnregisterChannel か Tcl close 命令を使って閉じられる時に､呼ばれる proc の為に手配する｡ proc は次の原型に合致すべきである: Tcl_CreateCloseHandler arranges for proc to be called when channel is closed with Tcl_Close or Tcl_UnregisterChannel, or using the Tcl close command. Proc should match the following prototype:

    typedef void Tcl_CloseProc(
            void *clientData);

clientData は Tcl_CreateCloseHandler への呼出しの中で提供される値と同じである｡ 　　　 The clientData is the same as the value provided in the call to Tcl_CreateCloseHandler.

Tcl_DeleteCloseHandler は channel の為に回収閉鎖を取除く｡ proc と clientData は取除くために回収を閉じるものを認識する; Tcl_DeleteCloseHandler は､もし channel の為の閉じる処理機能の為の､ その proc と clientData 引数が proc と clientData に合致しない場合､何もしない｡ Tcl_DeleteCloseHandler removes a close callback for channel. The proc and clientData identify which close callback to remove; Tcl_DeleteCloseHandler does nothing if its proc and clientData arguments do not match the proc and clientData for a close handler for channel.

### SEE ALSO

close, Tcl_Close, Tcl_UnregisterChannel

### KEYWORDS

callback, channel closing
Copyright © 1994-1996 Sun Microsystems, Inc.