홈페이지: https://wiki.tcl-lang.org/page/Yet+another+dll+caller
You may well ask why bother with developing a new dll caller. Especially that originally I had wanted to use it only for accessing the Windows 2000 API. The short answer: ffidl cannot handle output pointer arguments to functions (or I overlooked something) and twapi (at the present stage of development) has a way too short Windows2000 API repertoire. Moreover, I deemed easier to write a new extension than patch the ffidl source (which I had contemplated for some time). Although in its present form the extension (bearing the rather unimaginative name dll) is a dll caller it would be fairly easy to turn it into an so caller for the Linux environment.
왜 새로운 dll 콜 패키지를 개발해야 하는지 의문이 들 수 있습니다. 기존 dll 콜 패키지인 ffidl은 함수에 대한 출력 포인터 인수를 처리할 수 없고(또는 제가 뭔가를 간과했거나), (현재 개발 단계에서는) twapi의 Windows2000 API 지원이 미흡합니다. 게다가 (한동안 고민했던) ffidl 소스를 패치하는 것보다 새로운 확장 패키지를 개발하는 것이 더 쉽다고 생각했습니다. 현재 형태로는 (다소 상상력이 부족한 dll이라는 이름을 가진) 확장 패키지 이름이 dll caller이지만 리눅스 환경을 위해 so caller 지원을 하도록 코드를 수정하는 것은 크게 어렵지 않을 겁니다.
package require dllcaller
dllcaller::load user32
user32::cmd "int SystemParametersInfoA(uint, uint, uint *, uint)" -> ::SystemParametersInfo
puts [SystemParametersInfo 11 31 0 2] ;# sets keyboard repeat rate
'Tcl & Tk > 확장 패키지 (Extension Package)' 카테고리의 다른 글
oratcl 4.6 (0) | 2025.04.10 |
---|---|
TclTLS 1.7.22 (0) | 2025.04.10 |
The Hume Linear Algebra 1.0.1 (0) | 2025.04.10 |
hyperhelp v1.1.1.1 (0) | 2025.04.03 |
Process ID Extension for Win32 0.9 (0) | 2025.04.03 |