Copyright (C) 1994, Digital Equipment Corp.
by Steve Glassman, Mark Manasse and Greg Nelson
<*PRAGMA LL*> UNSAFE INTERFACETrestleOnNT ; IMPORT Trestle, TrestleComm, VBT, WinDef; TYPE Display <: Trestle.T; PROCEDURE HWND (v: VBT.T): WinDef.HWND; <* LL.sup = VBT.mu *>
Return the window handle associated with a VBT (or NT.CNULL)
<*INLINE*> PROCEDURE Enter (t: Display) RAISES {TrestleComm.Failure};
Lock t. The exception is raised when the NT connection is closed.
<*INLINE*> PROCEDURE Exit (t: Display; deltaCoverage: [-1 .. 1] := 0) RAISES {TrestleComm.Failure};
Release the lock on t, after possibly flushing the queue of pending operations.Each t: T contains a cardinal t.coverage, which is incremented by deltaCoverage as the Exit happens. If the result is zero, the NT connection is flushed. A thread making a sequence of calls to Enter/Exit can minimize unnecessary flushing by setting deltaCoverage to +1 on the first exit, to -1 on the last exit, and to 0 on the other exits.
LL = t.
END TrestleOnNT.