1

例子:

Dim Sh32 As Object = CreateObject("Shell.Application")
Dim path As String = "C:\temp\catalog.zip"
Dim sf As Object = Sh32.NameSpace(path)

-> 不起作用,sf = 无

Dim Sh32 As Object = CreateObject("Shell.Application")
Dim path As String = "C:\temp\catalog.zip"
Dim sf As Object = Sh32.NameSpace(path.ToString)

-> 作品

任何想法?

显然 path = path.ToString,但它们在用作 COM 参数时表现不同。

4

1 回答 1

-1

嗯,我不太了解 VB 和/或 COM 的细节,但字符串对象和字符串表示之间可能存在差异?

看到“知情者”解决难题应该很有趣;)

于 2009-12-30T22:50:27.183 回答