问题如下:所有对COM组件的方法调用均报错:对象不支持此属性或方法。
运行环境:Windows XP SP3 with IE 8.0
代码如下:
<html>
<script language=javascript>
function test_config()
{
config.FileName = "G:\\Projects\\Else\\fdsa.ini";
alert(config.GetStringValue("ddd", "eee", "fdkf;adjfdsa"));
alert(config.GetLongValue("abc", "def", 123));
}
function test_cashcode()
{
cashcode.OpenDevice(1);
cashcode.ResetDevice();
cashcode.SetPermitCashTypes("1 2,5.10/20\\50|100");
cashcode.AsyncPoll(30000);
}
</script><script language="javascript" for="cashcode" event=CashPolled(money)>
alert("收到钱币" + money);
</script><body onunload="javascript:cashcode.Cancel();">
<object height=0 id="cashcode" clsid="CLSID:F2C949F7-8203-435D-834D-9A0A3F60715F"></object>
<object height=0 id="config" clsid="CLSID:ED50FF8D-7CDC-4D83-8C9D-2A67DF230469"></object>
<p>
<input type="button" value="config" onclick="javascript:test_config();">
<input type="button" value="cashcode" onclick="javascript:test_cashcode();">
<input type="button" value="cancel" onclick="javascript:cashcode.Cancel();">
</p>
</body>
</html>PS:组件均已通过VC和VB测试,无任何问题,均支持IDispatch接口。
运行环境:Windows XP SP3 with IE 8.0
代码如下:
<html>
<script language=javascript>
function test_config()
{
config.FileName = "G:\\Projects\\Else\\fdsa.ini";
alert(config.GetStringValue("ddd", "eee", "fdkf;adjfdsa"));
alert(config.GetLongValue("abc", "def", 123));
}
function test_cashcode()
{
cashcode.OpenDevice(1);
cashcode.ResetDevice();
cashcode.SetPermitCashTypes("1 2,5.10/20\\50|100");
cashcode.AsyncPoll(30000);
}
</script><script language="javascript" for="cashcode" event=CashPolled(money)>
alert("收到钱币" + money);
</script><body onunload="javascript:cashcode.Cancel();">
<object height=0 id="cashcode" clsid="CLSID:F2C949F7-8203-435D-834D-9A0A3F60715F"></object>
<object height=0 id="config" clsid="CLSID:ED50FF8D-7CDC-4D83-8C9D-2A67DF230469"></object>
<p>
<input type="button" value="config" onclick="javascript:test_config();">
<input type="button" value="cashcode" onclick="javascript:test_cashcode();">
<input type="button" value="cancel" onclick="javascript:cashcode.Cancel();">
</p>
</body>
</html>PS:组件均已通过VC和VB测试,无任何问题,均支持IDispatch接口。
解决方案 »
- MDI多文档模板问题
- 问个COM的基础问题,高分奉送
- 请大家留下自已的MSN以便互相交流和沟通~!
- 星级高手请进 ---MFC中,两进程间用WINDOWS注册消息通讯被GUI消息所破坏
- 文件中文本内容的读取问题
- 程序中使用数据库异常类以后,仍然弹出数据库连接超时的警报窗口,数据库连接超时如何避免弹出警报窗口,请教!!!
- 关于鼠标图标的动态变化
- 我的vc只有mfc4.2,请问哪里能下载mfc7.0?
- LoadImage 在2000和98下运行问题?
- where can down DDK or VXDTOOLS?
- 【函数BUG OR 函数误用】CStdioFile类 按16进制往文件中写入整数10出错?
- 超级散分,急,急,急
如果不是这个问题,建议做下列尝试:
在IE6/IE7下测试一下是否有相同的问题;
检查组件在IE8中是否加载成功;
关闭IE的保护模式试试;
设置断点,看看能否单步执行,如果断点不成功,尝试在DEBUG版本中加入ATLASSERT(FALSE),然后启动IE8看看能否弹出调试提示窗口。
应该是类的GUID
只能装个虚拟机,在VM里调试以前的程序了.