:: IStream-unlock-region ( stream offset cb lock-type -- hresult )\r
STG_E_INVALIDFUNCTION ;\r
\r
-FROM: io.ports => tell-handle ;\r
:: stream-size ( stream -- size )\r
stream stream-tell :> old-pos\r
0 seek-end stream stream-seek\r
- stream handle>> tell-handle :> size\r
+ stream stream-tell :> size\r
old-pos seek-absolute stream stream-seek\r
size ;\r
\r
f out-clone-stream 0 void* set-alien-value\r
STG_E_INVALIDFUNCTION ;\r
\r
-USE: tools.annotations\r
-: watch-istream-callbacks ( -- )\r
- \ IStream-read watch\r
- \ IStream-write watch\r
- \ IStream-seek watch\r
- \ IStream-set-size watch\r
- \ IStream-copy-to watch\r
- \ IStream-commit watch\r
- \ IStream-revert watch\r
- \ IStream-lock-region watch\r
- \ IStream-unlock-region watch\r
- \ IStream-stat watch\r
- \ IStream-clone watch ;\r
-\r
CONSTANT: stream-wrapper\r
$[\r
{\r