Syntax 4: For opening an OLE object in memory into a
control
Description
Opens an OLE object that is in a OLE storage object in memory and
loads it into an OLE control.
Applies to
OLE controls
Syntax
1 |
olecontrol.Open ( sourcestorage, substoragename ) |
Argument |
Description |
---|---|
olecontrol |
The name of the OLE control into which you want to |
sourcestorage |
The name of an object variable of OLEStorage |
substoragename |
A string specifying the name of a substorage that |
Return value
Integer.
Returns 0 if it succeeds and one of the following negative values
if an error occurs:
-2 — The parent storage is not open
-9 — Other error
If any argument’s value is null, Open returns null.
Examples
This example opens the object in the substorage excel_obj within
the storage variable stg_stuff and loads it into the control ole_1.
Olest_stuff is already open:
1 2 |
integer result result = ole_1.Open(stg_stuff, "excel_obj") |
This example opens a substorage in the storage variable
stg_stuff and loads it into the control ole_1. The substorage name is
specified in the variable stuff_1. Olest_stuff is already open:
1 2 3 |
integer result string stuff_1 = "excel_obj" result = ole_1.Open(stg_stuff, stuff_1) |
See also