ExtendScript ToolKit

# SoSharedLibDefs.h File Reference

## Classes
struct | TaggedData_s
## Defines
#define | kESErrOK 0
#define | kESErrNoLvalue 3
#define | kESErrOpenString 4
#define | kESErrBadDigit 6
#define | kESErrSyntax 8
#define | kESErrBadArgumentList 20
#define | kESErrNoMemory -28
#define | kESErrException -29
#define | kESErrBadURI 31
#define | kESErrBadAction 32
#define | kESErrInternal -33
#define | kESErrNotImplemented -36
#define | kESErrRange 41
#define | kESErrEval 43
#define | kESErrConversion 44
#define | kESErrInvalidObject 45
#define | kESErrTypeMismatch 47
#define | kESErrNoFile 48
#define | kESErrFileExists 49
#define | kESErrNotOpen 50
#define | kESErrEOF 51
#define | kESErrIO 52
#define | kESErrNoPermission 53
#define | kESErrCannotResolve 57
#define | kESErrIOTimeout 58
#define | kESErrNoResponse 59
#define | kTypeUndefined 0
#define | kTypeBool 2
#define | kTypeDouble 3
#define | kTypeString 4
#define | kTypeLiveObject 6
#define | kTypeLiveObjectRelease 7
#define | kTypeInteger 123
#define | kTypeUInteger 124
#define | kTypeScript 125
## Typedefs
typedef struct TaggedData_s | TaggedData
typedef long(* | ESFunction )(TaggedData *argv, long argc, TaggedData *retval)
typedef signed long | ESerror_t

## Define Documentation

#define kESErrBadAction 32

Cannot perform requested action (Error)

#define kESErrBadArgumentList 20

Bad argument list (TypeError)

#define kESErrBadDigit 6

Bad digit in number (SyntaxError)

#define kESErrBadURI 31

Bad URI (URIError)

#define kESErrCannotResolve 57

Cannot resolve reference

#define kESErrConversion 44

Cannot convert (TypeError)

#define kESErrEOF 51

Read past EOF

#define kESErrEval 43

Evaluation error (EvalError)

#define kESErrException -29

Uncaught exception

#define kESErrFileExists 49

File or folder already exists

#define kESErrInternal -33

Internal error

#define kESErrInvalidObject 45

Object is invalid (ReferenceError)

#define kESErrIO 52

I/O error

#define kESErrIOTimeout 58

I/O Timeout

#define kESErrNoFile 48

File or folder does not exist

#define kESErrNoLvalue 3

Cannot assign value (ReferenceError)

#define kESErrNoMemory -28

Out of memory

#define kESErrNoPermission 53

Permission denied

#define kESErrNoResponse 59

No response

#define kESErrNotImplemented -36

Not yet implemented

#define kESErrNotOpen 50

I/O device is not open

#define kESErrOK 0

This is the C header file which you need to write DLLs that ExtendScript can load at runtime. The list of runtime errors. Errors with negative values are considered fatal and cannot be caught by Javascript. This is a subset of all possible runtime errors. Please do not use other error codes. No error

#define kESErrOpenString 4

Unterminated string constant (SyntaxError)

#define kESErrRange 41

1 is out of range (RangeError)

#define kESErrSyntax 8

Syntax error (SyntaxError)

#define kESErrTypeMismatch 47

Type mismatch (TypeError)

#define kTypeBool 2

A boolean value is either interpreted as false (if the value is zero) or true (if the value is nonzero). The field is intval, the value is 0 or 1.

#define kTypeDouble 3

A double floating point value (64 bits). The field is fltval.

#define kTypeInteger 123

An integer value is a signed 32-bit quantity. The field is intval.

#define kTypeLiveObject 6

An object value is a pointer to a LiveObject. The field is hObject. A LiveObject pointer returned as a function result is not released

#define kTypeLiveObjectRelease 7

An object value is a pointer to a LiveObject. The field is hObject. A LiveObject pointer returned as a function result is released

#define kTypeScript 125

A script is an executable string. You can return a script, which causes ExtendScript to run the returned string as a JavaScript and to return from the function call with whatever the evaluation of the string returned. The field is string, and if you want ExtendScript to release a returned memory pointer, implement FreeMem().

#define kTypeString 4

A string value. If you provide a string value, define the entry point FreeMem() in your DLL so ExtendScript can free your memory after use. Strings are supposed to be encoded in UTF-8 and to be null-terminated. The field is string, and if you want ExtendScript to release a returned memory pointer, implement FreeMem().

#define kTypeUInteger 124

An unsigned integer value is an unsigned 32-bit quantity. The field is intval.

#define kTypeUndefined 0

The possible VariantData data types Undefined means that this value is not defined. ExtendScript passes this value in if an argument is supplied as "undefined". If a function should not return any value, the return value is Undefined as well. The return value for a function is always preset to Undefined.

## Typedef Documentation

typedef signed long ESerror_t

typedef long(* ESFunction)(TaggedData *argv, long argc, TaggedData *retval)

All functions need to be coded in the same way, following the function definition below. ExtendScript passes in an array of arguments as VariantData, and supplies a VariantData element preset to Undefined for the return value. You should return any error code. If the function suceeds, the return value is kESErrOK.

typedef struct TaggedData_s TaggedData

Copyright© 2008 Adobe Systems Incorporated. All rights reserved.

Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks