【发布时间】:2015-03-19 20:02:19
【问题描述】:
我正在尽力不使用 getObject 函数的后期绑定。我怎么知道我不会因为只在一节课上严格关闭而被看不起。
我的问题是我找不到要声明我的成员类型的内容。
Dim restPoint = GetObject("winmgmts:\\.\root\default:Systemrestore")
If restPoint IsNot Nothing Then
If restPoint.CreateRestorePoint("test restore point system", 12, 100) = 0 Then
MsgBox("Restore Point created successfully")
Else
MsgBox("Could not create restore point!")
End If
End If
我花了几个小时试图研究 msdn createrestorepoint 来自哪里。我不想直接使用 WMI 或保持严格关闭。
谢谢
【问题讨论】:
-
你问的是
restpoint吗? -
抱歉,我错过了“我不想使用 WMI”,但为了记录,Strict Off is 编码错误。没有什么是你不能用它来做的,你不能用它来做。如果你不同意,我邀请你给我一些链接来证明我错了
-
jmcilhinney,可能是周围最好的 vbcoder 之一。上帝的 MVP 知道多少年 vbforums.com/… Joacim Andersson 是 vbofurms 的所有者 vbforums.com/… 在一个项目中严格关闭 ONE 类并不错。