m文件如下
function im_test
I=imread('c:\1.jpg');
imshow(I);
编成com文件后在vb 中调用
VB程序如下
Private Sub Form_Activate()
Dim st As sgltest
Set st = New sgltest
call st.im_test
End Sub
运行出错 ,提示: "实时错误 '-2147024770 (8007007e)': 自动化错误 "
点调试显示"Set st = New sgltest"行出错