开发的com组件在vbs脚本中不能使用
崔作非 2013-07-19 09:31:38 用VS2012 向导生成的代码,自己用VC写的客户端可用,vbs脚本中不行,createobject时就报错了。
附上IDL代码,大家帮看看,谢谢。
#include "olectl.h"
import "oaidl.idl";
import "ocidl.idl";
[
object,
uuid(48C24529-A3C9-424A-B0EB-3E1FDCC99599),
dual,
nonextensible,
pointer_default(unique)
]
interface Imaths : IDispatch{
[id(1)] HRESULT Mod([in] LONGLONG number, [in] LONGLONG divnum, [out,retval] LONGLONG* result);
};
[
uuid(8EA03867-77DD-4901-8586-45071CA9A14B),
version(1.0),
]
library MathLib
{
importlib("stdole2.tlb");
[
uuid(DB4111A1-8D21-451F-A6AD-F8E72171EC3C)
]
dispinterface _ImathsEvents
{
properties:
methods:
};
[
uuid(33D88987-1FE7-43B8-BC3D-0A351FC5BA68),
control
]
coclass maths
{
[default] interface Imaths;
[default, source] dispinterface _ImathsEvents;
};
};