Module: WinSock2 Synopsis: Hand-generated definitions to supplement the automatic translation. Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. All rights reserved. License: Functional Objects Library Public License Version 1.0 Dual-license: GNU Lesser General Public License Warranty: Distributed WITHOUT WARRANTY OF ANY KIND define inline-only constant = ; define inline-only constant = ; define inline-only constant = ; define inline-only constant = ; define inline-only constant = ; define inline-only constant = ; define inline-only constant = ; define inline-only constant = ; define inline-only constant = ; define inline-only constant = ; define inline-only constant = ; define inline-only constant = ; define inline-only constant = ; define inline-only constant = ; define inline-only constant = ; define inline-only function import-wchar (value :: ) => (char :: ) as(, value) end; define inline-only function export-wchar (value :: ) => (i :: ) as(, value) end; define C-mapped-subtype () map , import-function: import-wchar, export-function: export-wchar; end; define C-pointer-type => ; define inline-only constant $FFFFFFFF :: = as(, -1); // #xFFFFFFFF define constant $NULL-HANDLE :: = null-pointer(); define inline-only function MAKEWORD (low :: , high :: ) => (value :: ) logior(logand(low, #xFF), ash(logand(high, #xFF),8)) end MAKEWORD; define method LOWORD ( n :: ) => value :: ; logand(n,#xFFFF) end LOWORD; define method HIWORD ( n :: ) => value :: ; logand( ash(n,-16), #xFFFF) end HIWORD; define method LOWORD ( n :: ) => value :: ; as(, %logand(n, as(, #xFFFF))) end LOWORD; define method HIWORD ( n :: ) => value :: ; as(, u%shift-right(n,16)) end HIWORD; define method MAKELONG (wLow :: , wHigh :: ) => value :: ; let low :: = logand(wLow, #xFFFF); if ( wHigh > #x0FFF | wHigh < 0 ) %logior(low, u%shift-left(as(, logand(wHigh, #xFFFF)), 16)) else logior(low, ash(wHigh,16)) end if end MAKELONG; define inline-only constant $ERROR-INVALID-HANDLE = 6; define inline-only constant $ERROR-NOT-ENOUGH-MEMORY = 8; define inline-only constant $ERROR-INVALID-PARAMETER = 87; define inline-only constant $ERROR-OPERATION-ABORTED = 995; define inline-only constant $ERROR-IO-INCOMPLETE = 996; define inline-only constant $ERROR-IO-PENDING = 997; define inline-only constant $WAIT-TIMEOUT = #x00000102; define inline-only constant $WAIT-IO-COMPLETION = #x000000C0; define C-struct sealed inline-only slot Internal-value :: ; sealed inline-only slot InternalHigh-value :: ; sealed inline-only slot offset-value :: ; sealed inline-only slot OffsetHigh-value :: ; sealed inline-only slot hEvent-value :: ; pointer-type-name: ; c-name: "struct _OVERLAPPED"; end C-struct ; define sealed domain make (singleton()); define sealed domain initialize ();