示例:
Dim Sh32 As Object = CreateObject("Shell.Application")
Dim path As String = "C:\temp\catalog.zip"
Dim sf As Object = Sh32.NameSpace(path)
- >不起作用,sf = Nothing
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参数时,它们的行为会有所不同。
答案 0 :(得分:-1)
嗯,我不太了解VB和/或COM的细节,但是字符串对象和字符串表示之间可能存在差异?
看到有人“知道”解决这个难题应该很有趣;)