! Copyright (C) 2008 Doug Coleman, Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: alien alien.c-types libc destructors locals kernel math
-assocs namespaces make continuations sequences hashtables
-sorting arrays combinators math.bitwise strings system accessors
-threads splitting io.backend io.windows io.windows.nt.backend
-io.windows.nt.files io.monitors io.ports io.buffers io.files
-io.timeouts io windows windows.kernel32 windows.types ;
+USING: alien alien.c-types alien.strings libc destructors locals
+kernel math assocs namespaces make continuations sequences
+hashtables sorting arrays combinators math.bitwise strings
+system accessors threads splitting io.backend io.windows
+io.windows.nt.backend io.windows.nt.files io.monitors io.ports
+io.buffers io.files io.timeouts io.encodings.string io
+windows windows.kernel32 windows.types ;
IN: io.windows.nt.monitors
: open-directory ( path -- handle )
-USING: alien alien.c-types effects kernel windows.ole32
-parser lexer splitting grouping sequences namespaces
-assocs quotations generalizations accessors words macros alien.syntax
-fry arrays ;
+USING: alien alien.c-types alien.accessors effects kernel
+windows.ole32 parser lexer splitting grouping sequences
+namespaces assocs quotations generalizations accessors words
+macros alien.syntax fry arrays layouts math ;
IN: windows.com.syntax
<PRIVATE
{ "void*" "vtbl" } ;
MACRO: com-invoke ( n return parameters -- )
- dup length -roll
+ [ 2nip length ] 3keep
'[
- _ npick com-interface-vtbl _ swap void*-nth _ _
+ _ npick com-interface-vtbl _ cell * alien-cell _ _
"stdcall" alien-indirect
] ;
USING: alien alien.syntax alien.c-types alien.strings math
kernel sequences windows windows.types debugger io accessors
math.order namespaces make math.parser windows.kernel32
-combinators locals specialized-arrays.uchar ;
+combinators locals specialized-arrays.direct.uchar ;
IN: windows.ole32
LIBRARY: ole32
:: (guid-section>guid) ( string guid start end quot -- )
start end string subseq hex> guid quot call ; inline
-: (guid-byte>guid) ( string guid start end byte -- )
- start end string subseq hex> guid byte set-nth ; inline
+:: (guid-byte>guid) ( string guid start end byte -- )
+ start end string subseq hex> byte guid set-nth ; inline
: string>guid ( string -- guid )
"GUID" <c-object> [