activex

Launch an exe from browser (Windows)

心已入冬 提交于 2019-11-29 11:47:25
I need to launch an installed application from browser (not just IE). From this thread I understood that I need to implement asynchronous pluggable protocols and registering an application to uri scheme . I would like to check if there are any other ways of implementing it? In my scenario I am expected to launch an existing application from the client machine. So can I register this application to uri scheme and use it. My only concern is in both the scenarios(or at least the second scenario) we have to make registry changes. And if the registry settings are not present this won't work. Is

How to pass variable by reference in javascript? Read data from ActiveX function which returns more than one value

删除回忆录丶 提交于 2019-11-29 11:02:18
I have a ActiveX object which I want to use in the browser (javascript). There is a function I want to call. Its prototype is: function TOPOSFiscalPrinter.DirectIO(Command: Integer; var pData: Integer; var pString: WideString): Integer; So, the function returns three values: result code, pData and pString; In javascript the function does not update the variables pData and pString; function test() { var d=1, s="DIRECIO:"; var code = opos.DirectIO(1024, d, s); alert(d); alert(s); } Variables d and s are not updated. They must be d=0 and s="ED123456"; How to read data from function which returns

How to create an ActiveX control in C#?

不羁岁月 提交于 2019-11-29 10:59:29
I am not able to create a functioning ActiveX control in C#; I have tried following tutorials to do so without success. I create a sample Class Library project which includes this code: namespace AACWCSurvey { [ProgId("Prisoner.PrisonerControl")] [ClassInterface(ClassInterfaceType.AutoDual)] public class Class1 { public Class1() { MessageBox.Show("FIRETRUCK!!!"); } } } I then did the following steps: Properties => Application => Assembly Information => Make Assembly COM-visible Build => Register for COM interop TRUE (checked) Make Strong name for assembly (signing) Build the project regasm

ActiveXObject in IE8

不羁岁月 提交于 2019-11-29 08:18:29
I want to use javascript to create a textfile, so I used : This Line of code: var fso = new ActiveXObject("Scripting.FileSystemObject"); It's working properly in IE6 but not in IE8. Any suggested solution? IE8 internet setting is more secure, to it doesn't allow activex objects. If you have to run this, goto Tools->Internet Options-> Security->Custom Level->choose enable or prompt activex.. 来源: https://stackoverflow.com/questions/2964531/activexobject-in-ie8

Changing “active content” security settings on WPF WebBrowser control

半腔热情 提交于 2019-11-29 06:13:51
问题 I'm putting together a WPF application that will allow users to view PowerPoint files through the WebBrowser control, once the files have been saved as either .MHT or .HTML. The problem is that the files contain ActiveX controls, and the WebBrowser control by default will display a warning every time I load these files, saying "To help protect your security, your web browser has restricted this file from showing active content that could access your computer." I've seen a few different places

SaveAs vs SaveAs2 in the Microsoft Office Word object model

早过忘川 提交于 2019-11-29 05:46:36
It looks like SaveAs has gone away in Office 2010 in favor of SaveAs2 . What is going on here? Are there any important differences between the two? My fix has been to check for SaveAs2 first, and then fall back to SaveAs. Is this reasonable? It hasn't gone away, you've just got another way to save the document. Save2() takes an extra argument, CompatibilityMode. If you don't care about the compatibility mode then just keep using Save(). If you do then check Application.Version to verify that you can call Save2() without getting an exception. 来源: https://stackoverflow.com/questions/4107210

Disable Internet Explorer shortcut keys

风流意气都作罢 提交于 2019-11-29 04:28:40
EDIT: After waited a while and didn't get anything yet, I've decided to do shortcut disable thingy only for IE now. Is there a possibility to disable IE shortcut keys to access menus/print etc. via vbscript? Is it possible to disable browser shortkeys? Because many of them are using in application. For instance, Ctrl + p is using and I don't want browser to popup the print window. Yes, you can listen for the various key combinations with javascript and disable the default behaviors. There's even a library that you can use and test here . I just tested it using google chrome and firefox in

STL,ATL,WTL之间的联系和区别

旧街凉风 提交于 2019-11-28 23:15:07
STL即 Standard Template Library (标准模板库) STL是惠普实验室开发的一系列软件的统称。它是由Alexander Stepanov、Meng Lee和David R Musser在惠普实验室工作时所开发出来的。现在虽说它主要出现在C++中,但在被引入C++之前该技术就已经存在了很长的一段时间。 STL的代码从广义上讲分为三类: algorithm(算法)、container(容器)和iterator(迭代器), 几乎所有的代码都采用了模板类和模版函数的方式 ,这相比于传统的由函数和类组成的库来说提供了更好的代码重用机会。 从根本上说,STL是一些“容器”的集合,这些“容器”有list,vector,set,map等,STL也是算法和其他一些组件的集合。 这里的“容器”和算法的集合指的是世界上很多聪明人很多年的杰作。 STL的目的是标准化组件,这样你就不用重新开发它们了。你可以仅仅使用这些现成的组件。STL现在是C++的一部分,因此不用额外安装什麽。 它被内建在 你的编译器之内。因为STL的list是一个简单的容器,所以我打算从它开始介绍STL如何使用。如果你懂得了这个概念,其他的就都没有问题了。另外,list容器是相当简单的,我们会看到这一点。 这篇文章中我们将会看到如何定义和初始化一个list,计算它的元素的数量,从一个list里查找元素,删除元素

利用mfc编写activex控件

坚强是说给别人听的谎言 提交于 2019-11-28 23:14:52
介绍: 利用 vc 中的向导来创建 activex 控件很方便。这篇文章不准备告诉 activex 的原理,它将一步步的告诉你如何建立一个简单的 activex 控件,其中主要介绍事件和属性页的编程,如果想知道其中的道理,我想你还需要读一些相关的书籍。本文是讲述 mfc 创建 activex 控件,如果想学习 atl 创建 activex ,请不要看此文。 创建控件 使用向导建立 activex control 工程 选择 file 中的 new ,然后选择 MFC ActiveX Control Wizard 输入工程的名称 选中所有的默认设置点击 next 如果想子类话的话可以从 combobox 中选择相应的类 点击结束按钮完成。此时产生如下代码 C**App - 派生自 COleControlModule. 这个类提供了控件类的初始化 initialization ( InitInstance ) 和 销毁代码 ( ExitInstance ). C**Ctrl - 派生自 COleControl 提供控件的大部分功能,这个类是你需要编写大部分代码的部 C**PropPage - C**PropPage, ( 派生自 COlePropertyPage) 。这个类主要操纵控件的属性页 编译控件,将生成.ocx的文件。这是vc自带的测试控件的容器将帮助我们来测试控件