Getting information about storage members
When a storage is open, you can use one of the Member functions
to get information about the substorages and streams in that storage
and change them.
|
Function |
Result |
|---|---|
|
MemberExists |
Checks to see if the specified member exists in a Members can be either storages or |
|
MemberDelete |
Deletes a member from a storage. |
|
MemberRename |
Renames a member in a storage. |
This code checks whether the storage subdata exists in
stg_data before it opens it. (The code assumes that stg_data and
stg_subdata have been declared and instantiated.)
|
1 2 3 4 5 |
boolean lb_exists result = stg_data.MemberExists("subdata", lb_exists) IF result = 0 AND lb_exists THEN result = stg_subdata.Open(stg_data, "subdata") END IF |
To use MemberExists with the storage member IOle10Native, use
the following construction:
|
1 2 |
ole_storage.memberexists(char(1) + 'Ole10Native', & lb_boolean) |
The char(1) is required because the “I” in IOle10Native is not
an I, as you see if you look at the storage with a utility such as
Microsoft’s DocFile Viewer.
You need to use a similar construction to open the stream. For
example:
|
1 2 |
ole_stream.open(ole_storage, char(1) + 'Ole10Native', & StgReadWrite!, StgExclusive!) |