OriginObject::GetStorage

Description

Access storage areas.

Syntax

storage GetStorage( LPCSTR lpcszName, bool bAdd = FALSE )

Parameters

lpcszName
[input] the storage name
bAdd
[input] TRUE on add a new if wanted storage is not existed, else for FALSE.

Return

storage object

Examples

EX1

// Check the system storage objects on the active page
// For example, import data using the Import Wizard to ensure creation of system storage object
void OriginObject_GetStorage_Ex1()
{
    Tree    tr;
    storage st;
    Page pg = Project.Pages();
    
    st = pg.GetStorage("system");    // System, User and Files are examples of storage objects
                                    // Wave is also an example which is created when you import a sound (WAV) file
    tr = st;
    out_tree(tr);
}

Remark

Access storage areas. The Storage class can contain various types of data including custom binary formats

See Also

OriginObject::GetStorageNames

header to Include

origin.h