14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - SAS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix B Messages 777<br />

Dynamic Link Libraries (DLLs)<br />

access_mode is an optional keyword that specifies how the argument is passed. input specifies that<br />

the argument is passed by value. output specifies that the argument is passed by address with the<br />

initial value undefined. update specifies that the argument is passed by reference and the value of the<br />

JSL variable is set as the initial value. The default value is input.<br />

array is an optional keyword. It is valid only if the Type is specified as Double and the access_mode<br />

is specified as either input or update. Specifies that the exported function expects an array of<br />

doubles.<br />

Convention(calling_convention) An optional keyword that specifies the calling convention:<br />

STDCALL or PASCAL, or CDECL. The default value is STDCALL. STDCALL and PASCAL are equivalent.<br />

MaxArgs(n) An optional integer that specifies the maximum number of arguments that can be<br />

supplied.<br />

MinArgs(n) An optional integer that specifies the minimum number of arguments that can be<br />

supplied.<br />

Returns(type) Optional. Specifies the data type that the function returns: Int8, UInt8, Int16,<br />

UInt16, Int32, UInt32, Int64, UInt64, Float, Double, AnsiString, UnicodeString,<br />

Struct, IntPtr, UIntPtr, or ObjPtr.<br />

StackOrder(order) Optional keyword that specifies the order in which arguments are to be placed<br />

on the stack when calling the function. Valid values are L2R (left-to-right) and R2L (right-to-left).<br />

The default value is R2L.<br />

StackPop(pop) Optional keyword that specifies how the exported function expects the stack to be<br />

cleared after the function returns. Valid values are CALLER and CALLEE. The default value is CALLEE.<br />

StructArg(Arg(...), , ..., , ,<br />

) Optional and can appear multiple times. If an exported DLL function requires<br />

that a structure argument be passed in as a parameter, use StructArg to declare the structure<br />

members. The parameters to StructArg are Arg arguments using the same syntax as above for Arg<br />

arguments to DeclareFunction (one for each structure member), an access_mode indicator and a<br />

pack_mode indicator.<br />

access_mode is an optional keyword that indicates whether the struct argument should be passed by<br />

value (input) or by reference (update).<br />

pack_mode is an optional integer that determines how the structure is packed. Valid values are 1, 2,<br />

4, 8, and 16. The default value is 8.<br />

"description" is an optional, quoted string that contains a description of the structure for<br />

reference.<br />

dll object

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!