bontchev has asked for the wisdom of the Perl Monks concerning the following question:
An OLE2 file (e.g., the documents produced by Word, Excel, etc.) is a "hierarchical file system in a file" with its own "files" (called "streams"), "directories" (called "storages"), FAT, clusters, etc. The package OLE::Storage provides a very nice interface to the internal structures of the OLE2 files. For instance, you can enumerate the streams and storages, open them, read them, etc.
Each stream or storage has various properties - like name, size, date, time and so on. In particular, it has a property called CLSID.
In practice, the CLSID is a 16-byte value associated with each stream or storage. For a project of mine, I need to obtain the CLSID of the root storage. The problem is, I can't figure out how to obtain it with OLE::Storage. :-(
According to the documentation, the package provides the method clsid() - as in $clsid == $D->clsid($pps). But I can't figure out how to use it. :-(
I tried
print $Doc->clsid($pps) if ($Doc->is_root($pps));
but something bizarre gets printed - like
OLE::Storage::Property=HASH(0x1c5a718)
Any ideas how to use this package properly to obtain the CLSID?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to get the CLSID with OLE::Storage?
by erroneousBollock (Curate) on Nov 10, 2007 at 05:48 UTC | |
by bontchev (Sexton) on Nov 10, 2007 at 11:59 UTC | |
by bontchev (Sexton) on Nov 10, 2007 at 15:29 UTC | |
by erroneousBollock (Curate) on Nov 11, 2007 at 13:24 UTC |