]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/windows/com/com.factor
use radix literals
[factor.git] / basis / windows / com / com.factor
index 46ae1ae154d1a07b0d3754ea4de83436ee1e6c8b..41059c5669313fead4bfcbf4c9a11d2ffcdefad3 100644 (file)
@@ -52,7 +52,7 @@ CONSTANT: STGM_READ 0
 CONSTANT: STGM_WRITE 1
 CONSTANT: STGM_READWRITE 2
 
-CONSTANT: STG_E_INVALIDFUNCTION HEX: 80030001
+CONSTANT: STG_E_INVALIDFUNCTION 0x80030001
 
 CONSTANT: STGTY_STORAGE   1
 CONSTANT: STGTY_STREAM    2
@@ -85,10 +85,9 @@ FUNCTION: HRESULT RevokeDragDrop ( HWND hWnd ) ;
 FUNCTION: void ReleaseStgMedium ( LPSTGMEDIUM pmedium ) ;
 
 : com-query-interface ( interface iid -- interface' )
-    [
-        void* malloc-object &free
-        [ IUnknown::QueryInterface ole32-error ] keep *void*
-    ] with-destructors ;
+    { void* }
+    [ IUnknown::QueryInterface ole32-error ]
+    with-out-parameters ;
 
 : com-add-ref ( interface -- interface )
      [ IUnknown::AddRef drop ] keep ; inline