100 changed files with 39424 additions and 36157 deletions
Binary file not shown.
@ -0,0 +1,68 @@ |
|||||||
|
# -*- tcl -*- |
||||||
|
# Tcl package index file, version 1.1 |
||||||
|
# |
||||||
|
|
||||||
|
if {![package vsatisfies [package provide Tcl] 8.4]} { |
||||||
|
# Pre-8.4 Tcl interps we dont support at all. Bye! |
||||||
|
# 9.0+ Tcl interps are only supported on 32-bit platforms. |
||||||
|
if {![package vsatisfies [package provide Tcl] 9.0] |
||||||
|
|| ($::tcl_platform(pointerSize) != 4)} { |
||||||
|
return |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
# All Tcl 8.4+ interps can [load] Thread 2.8.12 |
||||||
|
# |
||||||
|
# For interps that are not thread-enabled, we still call [package ifneeded]. |
||||||
|
# This is contrary to the usual convention, but is a good idea because we |
||||||
|
# cannot imagine any other version of Thread that might succeed in a |
||||||
|
# thread-disabled interp. There's nothing to gain by yielding to other |
||||||
|
# competing callers of [package ifneeded Thread]. On the other hand, |
||||||
|
# deferring the error has the advantage that a script calling |
||||||
|
# [package require Thread] in a thread-disabled interp gets an error message |
||||||
|
# about a thread-disabled interp, instead of the message |
||||||
|
# "can't find package Thread". |
||||||
|
|
||||||
|
package ifneeded Thread 2.8.12 [list load [file join $dir thread2812.dll] [string totitle thread]] |
||||||
|
|
||||||
|
# package Ttrace uses some support machinery. |
||||||
|
|
||||||
|
# In Tcl 8.4 interps we use some older interfaces |
||||||
|
if {![package vsatisfies [package provide Tcl] 8.5]} { |
||||||
|
package ifneeded Ttrace 2.8.12 " |
||||||
|
[list proc thread_source {dir} { |
||||||
|
if {[info exists ::env(TCL_THREAD_LIBRARY)] && |
||||||
|
[file readable $::env(TCL_THREAD_LIBRARY)/ttrace.tcl]} { |
||||||
|
source -encoding utf-8 $::env(TCL_THREAD_LIBRARY)/ttrace.tcl |
||||||
|
} elseif {[file readable [file join $dir .. lib ttrace.tcl]]} { |
||||||
|
source -encoding utf-8 [file join $dir .. lib ttrace.tcl] |
||||||
|
} elseif {[file readable [file join $dir ttrace.tcl]]} { |
||||||
|
source -encoding utf-8 [file join $dir ttrace.tcl] |
||||||
|
} |
||||||
|
if {[namespace which ::ttrace::update] ne ""} { |
||||||
|
::ttrace::update |
||||||
|
} |
||||||
|
}] |
||||||
|
[list thread_source $dir] |
||||||
|
[list rename thread_source {}]" |
||||||
|
return |
||||||
|
} |
||||||
|
|
||||||
|
# In Tcl 8.5+ interps; use [::apply] |
||||||
|
|
||||||
|
package ifneeded Ttrace 2.8.12 [list ::apply {{dir} { |
||||||
|
if {[info exists ::env(TCL_THREAD_LIBRARY)] && |
||||||
|
[file readable $::env(TCL_THREAD_LIBRARY)/ttrace.tcl]} { |
||||||
|
source -encoding utf-8 $::env(TCL_THREAD_LIBRARY)/ttrace.tcl |
||||||
|
} elseif {[file readable [file join $dir .. lib ttrace.tcl]]} { |
||||||
|
source -encoding utf-8 [file join $dir .. lib ttrace.tcl] |
||||||
|
} elseif {[file readable [file join $dir ttrace.tcl]]} { |
||||||
|
source -encoding utf-8 [file join $dir ttrace.tcl] |
||||||
|
} |
||||||
|
if {[namespace which ::ttrace::update] ne ""} { |
||||||
|
::ttrace::update |
||||||
|
} |
||||||
|
}} $dir] |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Binary file not shown.
@ -0,0 +1,2 @@ |
|||||||
|
package ifneeded parser 1.9 \ |
||||||
|
[list load [file join $dir tclparser19.dll]] |
||||||
Binary file not shown.
Binary file not shown.
@ -0,0 +1,26 @@ |
|||||||
|
# -*- tcl -*- |
||||||
|
# Tcl package index file, version 1.1 |
||||||
|
# |
||||||
|
# Make sure that TDBC is running in a compatible version of Tcl, and |
||||||
|
# that TclOO is available. |
||||||
|
|
||||||
|
if {![package vsatisfies [package provide Tcl] 8.6-]} { |
||||||
|
return |
||||||
|
} |
||||||
|
apply {{dir} { |
||||||
|
set libraryfile [file join $dir tdbc.tcl] |
||||||
|
if {![file exists $libraryfile] && [info exists ::env(TDBC_LIBRARY)]} { |
||||||
|
set libraryfile [file join $::env(TDBC_LIBRARY) tdbc.tcl] |
||||||
|
} |
||||||
|
if {[package vsatisfies [package provide Tcl] 9.0-]} { |
||||||
|
package ifneeded tdbc 1.1.12 \ |
||||||
|
"package require TclOO;\ |
||||||
|
[list load [file join $dir tcl9tdbc1112.dll] [string totitle tdbc]]\;\ |
||||||
|
[list source -encoding utf-8 $libraryfile]" |
||||||
|
} else { |
||||||
|
package ifneeded tdbc 1.1.12 \ |
||||||
|
"package require TclOO;\ |
||||||
|
[list load [file join $dir tdbc1112.dll] [string totitle tdbc]]\;\ |
||||||
|
[list source -encoding utf-8 $libraryfile]" |
||||||
|
} |
||||||
|
}} $dir |
||||||
Binary file not shown.
@ -0,0 +1,81 @@ |
|||||||
|
# tdbcConfig.sh -- |
||||||
|
# |
||||||
|
# This shell script (for sh) is generated automatically by TDBC's configure |
||||||
|
# script. It will create shell variables for most of the configuration options |
||||||
|
# discovered by the configure script. This script is intended to be included |
||||||
|
# by the configure scripts for TDBC extensions so that they don't have to |
||||||
|
# figure this all out for themselves. |
||||||
|
# |
||||||
|
# The information in this file is specific to a single platform. |
||||||
|
# |
||||||
|
# RCS: @(#) $Id$ |
||||||
|
|
||||||
|
# TDBC's version number |
||||||
|
tdbc_VERSION=1.1.12 |
||||||
|
TDBC_VERSION=1.1.12 |
||||||
|
|
||||||
|
# Name of the TDBC library - may be either a static or shared library |
||||||
|
tdbc_LIB_FILE=tdbc1112.dll |
||||||
|
TDBC_LIB_FILE=tdbc1112.dll |
||||||
|
|
||||||
|
# String to pass to the linker to pick up the TDBC library from its build dir |
||||||
|
tdbc_BUILD_LIB_SPEC="-LC:/bawt/BawtBuild/Windows/x64/Release/Build/Tcl/pkgs/tdbc1.1.12 -ltdbc1112" |
||||||
|
TDBC_BUILD_LIB_SPEC="-LC:/bawt/BawtBuild/Windows/x64/Release/Build/Tcl/pkgs/tdbc1.1.12 -ltdbc1112" |
||||||
|
|
||||||
|
# String to pass to the linker to pick up the TDBC library from its installed |
||||||
|
# dir. |
||||||
|
tdbc_LIB_SPEC="-LC:/bawt/BawtBuild/Windows/x64/Release/Install/Tcl/lib/tdbc1.1.12 -ltdbc1112" |
||||||
|
TDBC_LIB_SPEC="-LC:/bawt/BawtBuild/Windows/x64/Release/Install/Tcl/lib/tdbc1.1.12 -ltdbc1112" |
||||||
|
|
||||||
|
# Name of the TBDC stub library |
||||||
|
tdbc_STUB_LIB_FILE="libtdbcstub1112.a" |
||||||
|
TDBC_STUB_LIB_FILE="libtdbcstub1112.a" |
||||||
|
|
||||||
|
# String to pass to the linker to pick up the TDBC stub library from its |
||||||
|
# build directory |
||||||
|
tdbc_BUILD_STUB_LIB_SPEC="-LC:/bawt/BawtBuild/Windows/x64/Release/Build/Tcl/pkgs/tdbc1.1.12 -ltdbcstub1112" |
||||||
|
TDBC_BUILD_STUB_LIB_SPEC="-LC:/bawt/BawtBuild/Windows/x64/Release/Build/Tcl/pkgs/tdbc1.1.12 -ltdbcstub1112" |
||||||
|
|
||||||
|
# String to pass to the linker to pick up the TDBC stub library from its |
||||||
|
# installed directory |
||||||
|
tdbc_STUB_LIB_SPEC="-LC:/bawt/BawtBuild/Windows/x64/Release/Install/Tcl/lib/tdbc1.1.12 -ltdbcstub1112" |
||||||
|
TDBC_STUB_LIB_SPEC="-LC:/bawt/BawtBuild/Windows/x64/Release/Install/Tcl/lib/tdbc1.1.12 -ltdbcstub1112" |
||||||
|
|
||||||
|
# Path name of the TDBC stub library in its build directory |
||||||
|
tdbc_BUILD_STUB_LIB_PATH="C:/bawt/BawtBuild/Windows/x64/Release/Build/Tcl/pkgs/tdbc1.1.12/libtdbcstub1112.a" |
||||||
|
TDBC_BUILD_STUB_LIB_PATH="C:/bawt/BawtBuild/Windows/x64/Release/Build/Tcl/pkgs/tdbc1.1.12/libtdbcstub1112.a" |
||||||
|
|
||||||
|
# Path name of the TDBC stub library in its installed directory |
||||||
|
tdbc_STUB_LIB_PATH="C:/bawt/BawtBuild/Windows/x64/Release/Install/Tcl/lib/tdbc1.1.12/libtdbcstub1112.a" |
||||||
|
TDBC_STUB_LIB_PATH="C:/bawt/BawtBuild/Windows/x64/Release/Install/Tcl/lib/tdbc1.1.12/libtdbcstub1112.a" |
||||||
|
|
||||||
|
# Location of the top-level source directories from which TDBC was built. |
||||||
|
# This is the directory that contains doc/, generic/ and so on. If TDBC |
||||||
|
# was compiled in a directory other than the source directory, this still |
||||||
|
# points to the location of the sources, not the location where TDBC was |
||||||
|
# compiled. |
||||||
|
tdbc_SRC_DIR="C:/bawt/BawtBuild/Windows/x64/Release/Build/Tcl/pkgs/tdbc1.1.12" |
||||||
|
TDBC_SRC_DIR="C:/bawt/BawtBuild/Windows/x64/Release/Build/Tcl/pkgs/tdbc1.1.12" |
||||||
|
|
||||||
|
# String to pass to the compiler so that an extension can find installed TDBC |
||||||
|
# headers |
||||||
|
tdbc_INCLUDE_SPEC="-I/C/bawt/BawtBuild/Windows/x64/Release/Install/Tcl/include" |
||||||
|
TDBC_INCLUDE_SPEC="-I/C/bawt/BawtBuild/Windows/x64/Release/Install/Tcl/include" |
||||||
|
|
||||||
|
# String to pass to the compiler so that an extension can find TDBC headers |
||||||
|
# in the source directory |
||||||
|
tdbc_BUILD_INCLUDE_SPEC="-IC:/bawt/BawtBuild/Windows/x64/Release/Build/Tcl/pkgs/tdbc1.1.12/generic" |
||||||
|
TDBC_BUILD_INCLUDE_SPEC="-IC:/bawt/BawtBuild/Windows/x64/Release/Build/Tcl/pkgs/tdbc1.1.12/generic" |
||||||
|
|
||||||
|
# Path name where .tcl files in the tdbc package appear at run time. |
||||||
|
tdbc_LIBRARY_PATH="/C/bawt/BawtBuild/Windows/x64/Release/Install/Tcl/lib/tdbc1.1.12" |
||||||
|
TDBC_LIBRARY_PATH="/C/bawt/BawtBuild/Windows/x64/Release/Install/Tcl/lib/tdbc1.1.12" |
||||||
|
|
||||||
|
# Path name where .tcl files in the tdbc package appear at build time. |
||||||
|
tdbc_BUILD_LIBRARY_PATH="C:/bawt/BawtBuild/Windows/x64/Release/Build/Tcl/pkgs/tdbc1.1.12/library" |
||||||
|
TDBC_BUILD_LIBRARY_PATH="C:/bawt/BawtBuild/Windows/x64/Release/Build/Tcl/pkgs/tdbc1.1.12/library" |
||||||
|
|
||||||
|
# Additional flags that must be passed to the C compiler to use tdbc |
||||||
|
tdbc_CFLAGS= |
||||||
|
TDBC_CFLAGS= |
||||||
|
|
||||||
@ -0,0 +1,14 @@ |
|||||||
|
# Index file to load the TDBC MySQL package. |
||||||
|
|
||||||
|
if {![package vsatisfies [package provide Tcl] 8.6-]} { |
||||||
|
return |
||||||
|
} |
||||||
|
if {[package vsatisfies [package provide Tcl] 9.0-]} { |
||||||
|
package ifneeded tdbc::mysql 1.1.12 \ |
||||||
|
"[list source -encoding utf-8 [file join $dir tdbcmysql.tcl]]\;\ |
||||||
|
[list load [file join $dir tcl9tdbcmysql1112.dll] [string totitle tdbcmysql]]" |
||||||
|
} else { |
||||||
|
package ifneeded tdbc::mysql 1.1.12 \ |
||||||
|
"[list source -encoding utf-8 [file join $dir tdbcmysql.tcl]]\;\ |
||||||
|
[list load [file join $dir tdbcmysql1112.dll] [string totitle tdbcmysql]]" |
||||||
|
} |
||||||
Binary file not shown.
@ -1,14 +0,0 @@ |
|||||||
# Index file to load the TDBC MySQL package. |
|
||||||
|
|
||||||
if {![package vsatisfies [package provide Tcl] 8.6-]} { |
|
||||||
return |
|
||||||
} |
|
||||||
if {[package vsatisfies [package provide Tcl] 9.0-]} { |
|
||||||
package ifneeded tdbc::mysql 1.1.5 \ |
|
||||||
"[list source [file join $dir tdbcmysql.tcl]]\;\ |
|
||||||
[list load [file join $dir tcl9tdbcmysql115.dll] [string totitle tdbcmysql]]" |
|
||||||
} else { |
|
||||||
package ifneeded tdbc::mysql 1.1.5 \ |
|
||||||
"[list source [file join $dir tdbcmysql.tcl]]\;\ |
|
||||||
[list load [file join $dir tdbcmysql115.dll] [string totitle tdbcmysql]]" |
|
||||||
} |
|
||||||
Binary file not shown.
@ -0,0 +1,14 @@ |
|||||||
|
# Index file to load the TDBC ODBC package. |
||||||
|
|
||||||
|
if {![package vsatisfies [package provide Tcl] 8.6-]} { |
||||||
|
return |
||||||
|
} |
||||||
|
if {[package vsatisfies [package provide Tcl] 9.0-]} { |
||||||
|
package ifneeded tdbc::odbc 1.1.12 \ |
||||||
|
"[list source -encoding utf-8 [file join $dir tdbcodbc.tcl]]\;\ |
||||||
|
[list load [file join $dir tcl9tdbcodbc1112.dll] [string totitle tdbcodbc]]" |
||||||
|
} else { |
||||||
|
package ifneeded tdbc::odbc 1.1.12 \ |
||||||
|
"[list source -encoding utf-8 [file join $dir tdbcodbc.tcl]]\;\ |
||||||
|
[list load [file join $dir tdbcodbc1112.dll] [string totitle tdbcodbc]]" |
||||||
|
} |
||||||
Binary file not shown.
@ -1,14 +0,0 @@ |
|||||||
# Index file to load the TDBC ODBC package. |
|
||||||
|
|
||||||
if {![package vsatisfies [package provide Tcl] 8.6-]} { |
|
||||||
return |
|
||||||
} |
|
||||||
if {[package vsatisfies [package provide Tcl] 9.0-]} { |
|
||||||
package ifneeded tdbc::odbc 1.1.5 \ |
|
||||||
"[list source [file join $dir tdbcodbc.tcl]]\;\ |
|
||||||
[list load [file join $dir tcl9tdbcodbc115.dll] [string totitle tdbcodbc]]" |
|
||||||
} else { |
|
||||||
package ifneeded tdbc::odbc 1.1.5 \ |
|
||||||
"[list source [file join $dir tdbcodbc.tcl]]\;\ |
|
||||||
[list load [file join $dir tdbcodbc115.dll] [string totitle tdbcodbc]]" |
|
||||||
} |
|
||||||
Binary file not shown.
@ -0,0 +1,14 @@ |
|||||||
|
# Index file to load the TDBC Postgres package. |
||||||
|
|
||||||
|
if {![package vsatisfies [package provide Tcl] 8.6-]} { |
||||||
|
return |
||||||
|
} |
||||||
|
if {[package vsatisfies [package provide Tcl] 9.0-]} { |
||||||
|
package ifneeded tdbc::postgres 1.1.12 \ |
||||||
|
"[list source -encoding utf-8 [file join $dir tdbcpostgres.tcl]]\;\ |
||||||
|
[list load [file join $dir tcl9tdbcpostgres1112.dll] [string totitle tdbcpostgres]]" |
||||||
|
} else { |
||||||
|
package ifneeded tdbc::postgres 1.1.12 \ |
||||||
|
"[list source -encoding utf-8 [file join $dir tdbcpostgres.tcl]]\;\ |
||||||
|
[list load [file join $dir tdbcpostgres1112.dll] [string totitle tdbcpostgres]]" |
||||||
|
} |
||||||
Binary file not shown.
@ -1,14 +0,0 @@ |
|||||||
# Index file to load the TDBC Postgres package. |
|
||||||
|
|
||||||
if {![package vsatisfies [package provide Tcl] 8.6-]} { |
|
||||||
return |
|
||||||
} |
|
||||||
if {[package vsatisfies [package provide Tcl] 9.0-]} { |
|
||||||
package ifneeded tdbc::postgres 1.1.5 \ |
|
||||||
"[list source [file join $dir tdbcpostgres.tcl]]\;\ |
|
||||||
[list load [file join $dir tcl9tdbcpostgres115.dll] [string totitle tdbcpostgres]]" |
|
||||||
} else { |
|
||||||
package ifneeded tdbc::postgres 1.1.5 \ |
|
||||||
"[list source [file join $dir tdbcpostgres.tcl]]\;\ |
|
||||||
[list load [file join $dir tdbcpostgres115.dll] [string totitle tdbcpostgres]]" |
|
||||||
} |
|
||||||
Binary file not shown.
Binary file not shown.
@ -1,6 +0,0 @@ |
|||||||
# |
|
||||||
# Tcl package index file |
|
||||||
# |
|
||||||
package ifneeded tdom 0.9.3 \ |
|
||||||
"[list load [file join $dir tdom093.dll]]; |
|
||||||
[list source [file join $dir tdom.tcl]]" |
|
||||||
Binary file not shown.
Binary file not shown.
@ -0,0 +1,12 @@ |
|||||||
|
# |
||||||
|
# Tcl package index file |
||||||
|
# |
||||||
|
if {[package vsatisfies [package provide Tcl] 9.0-]} { |
||||||
|
package ifneeded tdom 0.9.6 \ |
||||||
|
"[list load [file join $dir tcl9tdom096.dll]]; |
||||||
|
[list source [file join $dir tdom.tcl]]" |
||||||
|
} else { |
||||||
|
package ifneeded tdom 0.9.6 \ |
||||||
|
"[list load [file join $dir tdom096.dll]]; |
||||||
|
[list source [file join $dir tdom.tcl]]" |
||||||
|
} |
||||||
Binary file not shown.
@ -0,0 +1,68 @@ |
|||||||
|
# -*- tcl -*- |
||||||
|
# Tcl package index file, version 1.1 |
||||||
|
# |
||||||
|
|
||||||
|
if {![package vsatisfies [package provide Tcl] 8.4]} { |
||||||
|
# Pre-8.4 Tcl interps we dont support at all. Bye! |
||||||
|
# 9.0+ Tcl interps are only supported on 32-bit platforms. |
||||||
|
if {![package vsatisfies [package provide Tcl] 9.0] |
||||||
|
|| ($::tcl_platform(pointerSize) != 4)} { |
||||||
|
return |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
# All Tcl 8.4+ interps can [load] Thread 2.8.12 |
||||||
|
# |
||||||
|
# For interps that are not thread-enabled, we still call [package ifneeded]. |
||||||
|
# This is contrary to the usual convention, but is a good idea because we |
||||||
|
# cannot imagine any other version of Thread that might succeed in a |
||||||
|
# thread-disabled interp. There's nothing to gain by yielding to other |
||||||
|
# competing callers of [package ifneeded Thread]. On the other hand, |
||||||
|
# deferring the error has the advantage that a script calling |
||||||
|
# [package require Thread] in a thread-disabled interp gets an error message |
||||||
|
# about a thread-disabled interp, instead of the message |
||||||
|
# "can't find package Thread". |
||||||
|
|
||||||
|
package ifneeded Thread 2.8.12 [list load [file join $dir thread2812.dll] [string totitle thread]] |
||||||
|
|
||||||
|
# package Ttrace uses some support machinery. |
||||||
|
|
||||||
|
# In Tcl 8.4 interps we use some older interfaces |
||||||
|
if {![package vsatisfies [package provide Tcl] 8.5]} { |
||||||
|
package ifneeded Ttrace 2.8.12 " |
||||||
|
[list proc thread_source {dir} { |
||||||
|
if {[info exists ::env(TCL_THREAD_LIBRARY)] && |
||||||
|
[file readable $::env(TCL_THREAD_LIBRARY)/ttrace.tcl]} { |
||||||
|
source -encoding utf-8 $::env(TCL_THREAD_LIBRARY)/ttrace.tcl |
||||||
|
} elseif {[file readable [file join $dir .. lib ttrace.tcl]]} { |
||||||
|
source -encoding utf-8 [file join $dir .. lib ttrace.tcl] |
||||||
|
} elseif {[file readable [file join $dir ttrace.tcl]]} { |
||||||
|
source -encoding utf-8 [file join $dir ttrace.tcl] |
||||||
|
} |
||||||
|
if {[namespace which ::ttrace::update] ne ""} { |
||||||
|
::ttrace::update |
||||||
|
} |
||||||
|
}] |
||||||
|
[list thread_source $dir] |
||||||
|
[list rename thread_source {}]" |
||||||
|
return |
||||||
|
} |
||||||
|
|
||||||
|
# In Tcl 8.5+ interps; use [::apply] |
||||||
|
|
||||||
|
package ifneeded Ttrace 2.8.12 [list ::apply {{dir} { |
||||||
|
if {[info exists ::env(TCL_THREAD_LIBRARY)] && |
||||||
|
[file readable $::env(TCL_THREAD_LIBRARY)/ttrace.tcl]} { |
||||||
|
source -encoding utf-8 $::env(TCL_THREAD_LIBRARY)/ttrace.tcl |
||||||
|
} elseif {[file readable [file join $dir .. lib ttrace.tcl]]} { |
||||||
|
source -encoding utf-8 [file join $dir .. lib ttrace.tcl] |
||||||
|
} elseif {[file readable [file join $dir ttrace.tcl]]} { |
||||||
|
source -encoding utf-8 [file join $dir ttrace.tcl] |
||||||
|
} |
||||||
|
if {[namespace which ::ttrace::update] ne ""} { |
||||||
|
::ttrace::update |
||||||
|
} |
||||||
|
}} $dir] |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,64 +0,0 @@ |
|||||||
|
|
||||||
# Copyright (c) 2021 Ashok P. Nadkarni |
|
||||||
# All rights reserved. |
|
||||||
# |
|
||||||
# See the file LICENSE for license |
|
||||||
|
|
||||||
namespace eval twapi { |
|
||||||
variable _wts_session_monitors |
|
||||||
set _wts_session_monitors [dict create] |
|
||||||
} |
|
||||||
|
|
||||||
proc twapi::start_wts_session_monitor {script args} { |
|
||||||
variable _wts_session_monitors |
|
||||||
|
|
||||||
parseargs args { |
|
||||||
all |
|
||||||
} -maxleftover 0 -setvars] |
|
||||||
|
|
||||||
set script [lrange $script 0 end]; # Verify syntactically a list |
|
||||||
|
|
||||||
set id "wts#[TwapiId]" |
|
||||||
if {[dict size $_wts_session_monitors] == 0} { |
|
||||||
# No monitoring in progress. Start it |
|
||||||
# 0x2B1 -> WM_WTSSESSION_CHANGE |
|
||||||
Twapi_WTSRegisterSessionNotification $all |
|
||||||
_register_script_wm_handler 0x2B1 [list [namespace current]::_wts_session_change_handler] 0 |
|
||||||
} |
|
||||||
|
|
||||||
dict set _wts_session_monitors $id $script |
|
||||||
return $id |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
proc twapi::stop_wts_session_monitor {id} { |
|
||||||
variable _wts_session_monitors |
|
||||||
|
|
||||||
if {![dict exists $_wts_session_monitors $id]} { |
|
||||||
return |
|
||||||
} |
|
||||||
|
|
||||||
dict unset _wts_session_monitors $id |
|
||||||
if {[dict size $_wts_session_monitors] == 0} { |
|
||||||
# 0x2B1 -> WM_WTSSESSION_CHANGE |
|
||||||
_unregister_script_wm_handler 0x2B1 [list [namespace current]::_wts_session_handler] |
|
||||||
Twapi_WTSUnRegisterSessionNotification |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
proc twapi::_wts_session_change_handler {msg change session_id msgpos ticks} { |
|
||||||
variable _wts_session_monitors |
|
||||||
|
|
||||||
if {[dict size $_wts_session_monitors] == 0} { |
|
||||||
return; # Not an error, could have deleted while already queued |
|
||||||
} |
|
||||||
|
|
||||||
dict for {id script} $_wts_session_monitors { |
|
||||||
set code [catch {uplevel #0 [linsert $script end $change $session_id]} msg] |
|
||||||
if {$code == 1} { |
|
||||||
# Error - put in background but we do not abort |
|
||||||
after 0 [list error $msg $::errorInfo $::errorCode] |
|
||||||
} |
|
||||||
} |
|
||||||
return |
|
||||||
} |
|
||||||
@ -1,39 +1,43 @@ |
|||||||
# Tcl Windows API (TWAPI) extension |
# Tcl Windows API (TWAPI) extension |
||||||
|
|
||||||
The Tcl Windows API (TWAPI) extension provides access to the Windows API from |
The Tcl Windows API (TWAPI) extension provides access to the Windows API |
||||||
within the Tcl scripting language. |
from within the Tcl scripting language. |
||||||
|
|
||||||
* Project source repository is at https://github.com/apnadkarni/twapi |
* Project source repository is at https://github.com/apnadkarni/twapi |
||||||
* Documentation is at https://twapi.magicsplat.com |
|
||||||
* Binary distribution is at https://sourceforge.net/projects/twapi/files/Current%20Releases/Tcl%20Windows%20API/ |
* Binary distribution is at https://sourceforge.net/projects/twapi/files/Current%20Releases/Tcl%20Windows%20API/ |
||||||
|
* Documentation is at https://twapi.magicsplat.com |
||||||
|
* Change history is at https://twapi.magicsplat.com/v5.1/versionhistory.html |
||||||
|
|
||||||
## Supported platforms |
## Supported platforms |
||||||
|
|
||||||
TWAPI 5.0 requires |
TWAPI 5.x requires |
||||||
|
|
||||||
* Windows 7 SP1 or later |
* Windows 7 SP1 or later |
||||||
* Tcl 8.6.10+ or Tcl 9.x |
* Tcl 8.6.10+ or Tcl 9.x |
||||||
|
|
||||||
### Binary distribution |
### Binary distribution |
||||||
|
|
||||||
The single binary distribution supports Tcl 8.6 and Tcl 9 for both 32- and |
The single binary distribution supports Tcl 8.6 and Tcl 9 for both 32- |
||||||
64-bit platforms. |
and 64-bit platforms. |
||||||
|
|
||||||
It requires the VC++ runtime to already be installed |
It requires the VC++ runtime to already be installed on the system. |
||||||
on the system. Download from https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist if necessary. |
Download from |
||||||
|
https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist |
||||||
|
if necessary. |
||||||
|
|
||||||
Windows 7 and 8.x also require the Windows UCRT runtime to be installed if not |
Windows 7 and 8.x also require the Windows UCRT runtime to be installed |
||||||
present. Download from https://support.microsoft.com/en-gb/topic/update-for-universal-c-runtime-in-windows-c0514201-7fe6-95a3-b0a5-287930f3560c. |
if not present. Download from |
||||||
|
https://support.microsoft.com/en-gb/topic/update-for-universal-c-runtime-in-windows-c0514201-7fe6-95a3-b0a5-287930f3560c. |
||||||
|
|
||||||
In most cases, both the above should already be present on the system. |
In most cases, both the above should already be present on the system. |
||||||
|
|
||||||
Note that the *modular* and single file *bin* in 4.x distributions are no longer |
Note that the *modular* and single file *bin* in 4.x distributions are |
||||||
available and will not be supported in 5.0. |
no longer available. |
||||||
|
|
||||||
## TWAPI Summary |
## TWAPI Summary |
||||||
|
|
||||||
The Tcl Windows API (TWAPI) extension provides access to the Windows API from |
The Tcl Windows API (TWAPI) extension provides access to the Windows API |
||||||
within the Tcl scripting language. |
from within the Tcl scripting language. |
||||||
|
|
||||||
Functions in the following areas are implemented: |
Functions in the following areas are implemented: |
||||||
|
|
||||||
Binary file not shown.
@ -0,0 +1,2 @@ |
|||||||
|
package ifneeded udp 1.0.12 \ |
||||||
|
[list load [file join $dir udp1012.dll]] |
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue