] with-file-vocabs
-FUNCTION: void* alien-parser-effect-test ( int *arg1 float arg2 ) ;
+FUNCTION: void* alien-parser-function-effect-test ( int *arg1 float arg2 ) ;
[ (( arg1 arg2 -- void* )) ] [
- \ alien-parser-effect-test "declared-effect" word-prop
+ \ alien-parser-function-effect-test "declared-effect" word-prop
+] unit-test
+
+CALLBACK: void* alien-parser-callback-effect-test ( int *arg1 float arg2 ) ;
+[ (( arg1 arg2 -- void* )) ] [
+ \ alien-parser-callback-effect-test "callback-effect" word-prop
] unit-test
! Reported by mnestic
'[ [ _ _ _ ] dip alien-callback ] ;
:: make-callback-type ( lib return type-name parameters -- word quot effect )
- return type-name normalize-c-arg :> ( return type-name )
+ return type-name normalize-c-arg :> ( return-c-type type-name )
type-name current-vocab create :> type-word
type-word [ reset-generic ] [ reset-c-type ] bi
void* type-word typedef
parameters return parse-arglist :> ( types callback-effect )
type-word callback-effect "callback-effect" set-word-prop
type-word lib "callback-library" set-word-prop
- type-word return types lib library-abi callback-quot (( quot -- alien )) ;
+ type-word return-c-type types lib library-abi callback-quot (( quot -- alien )) ;
: (CALLBACK:) ( -- word quot effect )
"c-library" get
SPECIALIZED-ARRAY: TCHAR
IN: windows.errors
+CONSTANT: APPLICATION_ERROR_MASK HEX: 20000000
+CONSTANT: ERROR_SEVERITY_SUCCESS HEX: 00000000
+CONSTANT: ERROR_SEVERITY_INFORMATIONAL HEX: 40000000
+CONSTANT: ERROR_SEVERITY_WARNING HEX: 80000000
+CONSTANT: ERROR_SEVERITY_ERROR HEX: C0000000
+
CONSTANT: ERROR_SUCCESS 0
CONSTANT: ERROR_INVALID_FUNCTION 1
CONSTANT: ERROR_FILE_NOT_FOUND 2