问题标签 [istorage]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
238 浏览

c# - 调用 IStorage 的 EnumElements 时访问冲突

我正在阅读结构化存储文件。并试图获取根结构的所有子元素。但是这样做时我遇到了访问冲突异常。

这是本机方法,

这是我的调用代码。

请注意,如果我调用另一个方法,如果 IStorage,如 OpenStream,工作正常,

我在打开文件时尝试了不同的 STM 标志组合,但它不起作用。

0 投票
1 回答
147 浏览

c# - 在 C# 中,如何在实现 IStorage 的返回对象上调用 Release?

我正在从 C# 读取和写入结构化存储文件。打开我调用的文件

这有效,我可以访问该文件。我相信我需要在 Storage 对象上调用 Release() 来关闭文件。但是,自从在 IUnknown 上实施以来,我不知道如何到达 Release。

我可以将 StorageInterface 转换为实现 IUnknown 的对象并以这种方式调用它吗?

谢谢,

约翰

0 投票
1 回答
116 浏览

delphi - How can I check the type of the enumerated IStorage element in Delphi?

I need to work with IStorage and IStream interfaces in Delphi 7. I need the name list of storages and streams in IStorage instances. If I try to collect them like this:

I get a compiler error:

at the line

Here is the STATSTG record definition : https://msdn.microsoft.com/en-us/library/windows/desktop/aa380319(v=vs.85).aspx

How can I check the record type without any compiler error message?

0 投票
0 回答
38 浏览

c# - 在 c# 中使用 Microsoft.VisualStudio.OLE.Interop 的示例

我正在尝试在 Microsoft.VisualStudio.OLE.Interop 中使用 IStorage,但我不确定如何使用。我已经添加了对我的项目的引用,但它只是接口、枚举和结构。如何创建 IStorage 对象?