]> gitweb.factorcode.org Git - factor.git/commitdiff
windows.ole32: Add more error constants as long.
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 6 Mar 2020 23:23:39 +0000 (17:23 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 6 Mar 2020 23:53:38 +0000 (17:53 -0600)
These are -2B..2B instead of positive integers because long is s32 on
Windows.

basis/windows/ole32/ole32.factor

index e05af8703f958cbe1b804b11df3b3e7fbb399a55..25c6846a05f3ac7cdcd16344aee4e9eb3e963747 100644 (file)
@@ -1,8 +1,8 @@
-USING: alien alien.syntax alien.c-types alien.data alien.strings
-math kernel sequences windows.errors windows.types io accessors
-math.order namespaces make math.parser windows.kernel32
-combinators locals specialized-arrays literals splitting
-grouping classes.struct combinators.smart ;
+USING: accessors alien.c-types alien.data alien.syntax
+classes.struct combinators combinators.smart grouping kernel
+literals math.order math.parser parser sequences
+specialized-arrays splitting windows.errors windows.kernel32
+windows.types words.constant ;
 SPECIALIZED-ARRAY: uchar
 IN: windows.ole32
 
@@ -33,12 +33,40 @@ CONSTANT: DRAGDROP_S_DROP 0x00040100
 CONSTANT: DRAGDROP_S_CANCEL 0x00040101
 CONSTANT: DRAGDROP_S_USEDEFAULTCURSORS 0x00040102
 
-CONSTANT: E_NOTIMPL 0x80004001
-CONSTANT: E_NOINTERFACE 0x80004002
-CONSTANT: E_FAIL 0x80004005
-CONSTANT: E_UNEXPECTED 0x8000FFFF
-CONSTANT: E_OUTOFMEMORY 0x8007000E
-CONSTANT: E_INVALIDARG 0x80070057
+<<
+: >long ( integer -- long )
+    long <ref> long deref ; inline
+>>
+<<
+SYNTAX: LONG: scan-new-word scan-object >long define-constant ;
+>>
+
+LONG: E_NOTIMPL 0x80004001
+LONG: E_NOINTERFACE 0x80004002
+LONG: E_FAIL 0x80004005
+LONG: E_UNEXPECTED 0x8000FFFF
+LONG: E_OUTOFMEMORY 0x8007000E
+LONG: E_INVALIDARG 0x80070057
+
+LONG: OLE_E_OLEVERB 0x80040000
+LONG: OLE_E_ADVF 0x80040001
+LONG: OLE_E_ENUM_NOMORE 0x80040002
+LONG: OLE_E_ADVISENOTSUPPORTED 0x80040003
+LONG: OLE_E_NOCONNECTION 0x80040004
+LONG: OLE_E_NOTRUNNING 0x80040005
+LONG: OLE_E_NOCACHE 0x80040006
+LONG: OLE_E_BLANK 0x80040007
+LONG: OLE_E_CLASSDIFF 0x80040008
+LONG: OLE_E_CANT_GETMONIKER 0x80040009
+LONG: OLE_E_CANT_BINDTOSOURCE 0x8004000A
+LONG: OLE_E_STATIC 0x8004000B
+LONG: OLE_E_PROMPTSAVECANCELLED 0x8004000C
+LONG: OLE_E_INVALIDRECT 0x8004000D
+LONG: OLE_E_WRONGCOMPOBJ 0x8004000E
+LONG: OLE_E_INVALIDHWND 0x8004000F
+LONG: OLE_E_NOT_INPLACEACTIVE 0x80040010
+LONG: OLE_E_CANTCONVERT 0x80040011
+LONG: OLE_E_NOSTORAGE 0x80040012
 
 CONSTANT: MK_ALT 0x20
 CONSTANT: DROPEFFECT_NONE 0