IMcStreamOpen Method
|
|
Creates the Subclass (Helper class) COM object
and initializes data. Calls the Subclass's Open
for further initialization
Namespace:
MediaCy.IQL.IO
Assembly:
MediaCy.IQL.IO (in MediaCy.IQL.IO.dll) Version: 10.0.6912.0
SyntaxSub Open (
<OptionalAttribute> Source As Object,
Optional Mode As mcfmFileMode = mcfmFileMode.mcSTREAM_READ
)
Parameters
- Source (Optional)
- Type: SystemObject
- Mode (Optional)
- Type: MediaCy.IQL.IOmcfmFileMode
RemarksThe Source parameter can be a filename or an IStream/IStorage object.
If the Source parameter is VT_NULL or VT_EMPTY or VT_MISSING (ie not there)
then the local property, FileName, is checked. If this is NULL, then an error is returned.
This method will set the FileFormatName, FileName, and Source properties, It creates
the Subclass and calls Open on it for further initialization. At return time, the Image
data is not actually open, but everything is in place for a call to Read or Write.
The second parameter, Mode, is one of mcfmFileMode members, indicating read, write, or both
file permissions. Caution in using the mcSTREAM_READ_WRITE (both) parameter, since some subclasses
may not support reading a file with write capabilities.
If a file is opened for Writing, but the type of Image file it contains cannot be
determined by the file name, a "Magic" number scheme will be tried to determine
the Image type. If this also fails, an error is returned.
The following McStream properties need to be set before calling Open: Flags
You MUST Close the McStream before fully releasing it for its resources to be
freed.
ExamplesImages.File.Open "c:\images\myfile.tif", mcSTREAM_READ
Images.File.Read
Images.File.Close
See Also