_Load( ) API Library Routine

See Also   Example

Places the value of the memory variable or current record field specified by loc into val.

Syntax

int _Load(Locator FAR *loc, Value FAR *val)
Locator FAR *loc;         /* Variable location. */
Value FAR *val;            /* Holds value of the variable. */

Remarks

_Load( ) returns 0 if the routine is successful. If the routine fails, it returns a negative integer whose absolute value is a Visual FoxPro error number. You can use _Load( ) to retrieve the contents of a memo field, but it doesn't retrieve characters in the field after the first 65,000 bytes. If loc specifies a one-dimensional array, Visual FoxPro returns the value of the first element of the array.

_Load( ) doesn’t work with objects. If loc specifies an object reference, _Load( ) returns 0 without filling the val Value structure. Use _Evaluate( ) to obtain an object reference.

If the setting of the Locator field l_offset is  – 1, Visual FoxPro returns a logical value structure that indicates whether the current record in the specified work area is deleted:

For more information on how to create an API library and integrate it with Visual FoxPro, see Chapter 28, Accessing the Visual FoxPro API, in the Programmer's Guide.