vb中出现自动化错误,不知是为何,还请高手指点
出现错误的代码是这样的
Dim Prepreview As WMEncPrepreview
Static hWnds() As Variant
'寻找视窗
R = FindWindowLike(hWnds(), hForm, "*", "*", Null)
Prepreview.SetCaptureParent (hWnds(1))‘运行到此句出现错误
错误是
实例错误’-1072882814(c00d1b82):
自动化错误
该怎么解决 是什么原因