当前位置:网站首页>VB-ocx应用于Web
VB-ocx应用于Web
2022-07-28 05:23:00 【海乐学习】
以下是html调用示例,ClassID为用vb自带的打包工具,打包获得的。
<html>
<br>
<OBJECT ID="CtiClient"
CLASSID="CLSID:FA2B1B95-359E-4320-BAB5-286450B9D863"
CODEBASE="Cti_Client1100504.CAB#version=1,0,0,8">
</OBJECT>
<br>
<a href="javascript:m_坐席登陆('192.168.1.106','5010','agent4','000000')" >m_坐席登陆</a>执行ocx中的方法
<br>
<a href="javascript:m_关闭软电话()" >m_关闭软电话</a>
<br>
<a href="javascript:m_显示电话号码('1112222')" >m_显示电话号码</a>
<br>
<script type="text/javascript">
function m_坐席登陆(str服务器地址,str服务器端口,str坐席员名,str密码)
{ CtiClient.m_坐席登陆(str服务器地址,str服务器端口,str坐席员名,str密码); }ocx中的方法
function m_关闭软电话()
{ CtiClient.m_关闭软电话(); }
function m_显示电话号码(str)
{ CtiClient.m_显示电话号码(str); }
</script>
<SCRIPT type="text/javascript" FOR="CtiClient" EVENT="e通讯错误(strMsg)" >ocx中的事件 触发javascript
m_ShowMsg(strMsg);
</SCRIPT>
<SCRIPT type="text/javascript" FOR="CtiClient" EVENT="登陆失败()" >
m_LoginNo();
</SCRIPT>
<script type="text/javascript">
function m_ShowMsg(strMsg)
{
alert(strMsg);
}
function m_LoginNo()
{
alert('登陆失败');
}
</script>
</html>
ocx本地化配置
1.创建一个setup.reg文件,内容如下:
注:":Range"="192.168.1.222" 为服务器IP地址
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range9]
":Range"="192.168.1.222"
"http"=dword:00000002
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2]
"1004"=dword:00000000
"1201"=dword:00000000
"CurrentLevel"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\New Windows]
"PopupMgr"="yes"
2.创建一个*.bat文件,内容如下:
%windir%\system32 为系统system32路径
Cti_Client1100504.ocx为ocx文件名
@echo off
taskkill /f /im iexplore.exe
copy Cti_Client1100504.ocx %windir%\system32\Cti_Client1100504.ocx
regsvr32 %windir%\system32\Cti_Client1100504.ocx "-u" "-s"
regsvr32 %windir%\system32\Cti_Client1100504.ocx
regsvr32 %windir%\system32\Cti_Client1100504.ocx "-u" "-s"
regsvr32 %windir%\system32\Cti_Client1100504.ocx
setup.reg
exit
将这两个文件放在同一目录下,执行bat文件。
边栏推荐
- 深度学习(一):走进机器学习与深度学习理论部分
- Byte Android post 4 rounds of interviews, received 50k*18 offers, and successfully broke the situation under the layoff
- 强化学习——策略学习
- 强化学习——多智能体强化学习
- ESXi社区版网卡驱动2022年3月更新
- 《Distilling the Knowledge in a Neural Network》知识蒸馏论文解读
- Reversible digital watermarking method based on histogram modification
- Distributed cluster architecture scenario optimization solution: distributed scheduling problem
- Notes on the thinking of software analysis and library acquisition of a Taobao customer
- 利用辅助未标记数据增强无约束人脸识别《Boosting Unconstrained Face Recognition with Auxiliary Unlabeled Data》
猜你喜欢

A comparative study of backdoor attack and counter sample attack

基于选择性知识提取的野外低分辨率人脸识别的论文阅读笔记

Convolutional neural network

Small program development solves the anxiety of retail industry

Deep learning (incremental learning) - iccv2022:continuous continuous learning

强化学习——不完全观测问题、MCTS

Deep learning - patches are all you need

无约束低分辨率人脸识别综述一:用于低分辨率人脸识别的数据集

Deploy the project to GPU and run

神经网络学习
随机推荐
一、AMD - OpenVINO环境配置
深度学习(自监督:SimCLR)——A Simple Framework for Contrastive Learning of Visual Representations
How to do wechat group purchase applet? How much does it usually cost?
深度学习(自监督:CPC v2)——Data-Efficient Image Recognition with Contrastive Predictive Coding
Reinforcement learning - Basic Concepts
ESXi社区版网卡驱动2022年3月更新
Applet development
Automatic scheduled backup of remote MySQL scripts
Deploy the project to GPU and run
Model Inversion Attacks that Exploit Confidence Informati on and Basic Countermeasures 阅读心得
强化学习——基础概念
Interpreting the knowledge in a neural network
神经网络实现鸢尾花分类
深度学习(增量学习)——ICCV2022:Contrastive Continual Learning
Alpine, Debian replacement source
物联网互操作系统:分类、标准与未来发展方向综述
基于选择性知识提取的野外低分辨率人脸识别的论文阅读笔记
Word2vec+ regression model to achieve classification tasks
Reinforcement learning - continuous control
GF(2^8)的加法与乘法计算