activex

How can I browse the classes and methods of an ActiveX DLL?

感情迁移 提交于 2019-12-03 02:39:08
Basically, what I want to is be able to explore an ActiveX DLL. I normally fire up VB 6, add the DLL to the "References" of the project, and use Object Explorer. However, in this particular machine I can't install VB / VS. I'm sure there's a tool out there that does this. Does anyone know of one? Thanks John Rudy Is it possible to download the component from that machine and examine it locally in Visual Studio? (That'd be my first suggestion.) (And BTW, the .NET versions of Visual Studio also feature a VB6-like Object Explorer which works nicely for this.) Alternatively, and it's not free, but

Access memory address in c#

你离开我真会死。 提交于 2019-12-03 00:41:43
I am interfacing with an ActiveX component that gives me a memory address and the number of bytes. How can I write a C# program that will access the bytes starting at a given memory address? Is there a way to do it natively, or am I going to have to interface to C++? Does the ActiveX component and my program share the same memory/address space? I highly suggest you use an IntPtr and Marshal.Copy. Here is some code to get you started. memAddr is the memory address you are given, and bufSize is the size. IntPtr bufPtr = new IntPtr(memAddr); byte[] data = new byte[bufSize]; Marshal.Copy(bufPtr,

【C++笔记02】VS2017使用创建MFCActiveX控件项目

匿名 (未验证) 提交于 2019-12-03 00:25:02
无从下手的感觉,只要从基本编辑器工具使用和基础的操作开始学习,一步一步堆积起来了。在VS2017中创建,针对我的操作做一个笔记。 启动VS2017软件,最好以管理员身份运行启动软件,在VS2017界面的菜单栏中,文件-新建-项目(Ctrl+Shift+N),打开新建项目,选择已安装 》Visual C++ 》MFC 》 MFC ActiveX 控件 》 确定 点击确定后,弹出: MFC ActiveX控件 配置窗口,可以设置新建控件的短名称、控件类名称等配置参数。参数配置完毕点击下一步,本人的下默认 弹出控件设置窗口,点击完成 项目创建完毕后,点击VS2017菜单栏上的 生成 > 生产解决方案 编辑新建的ActiveX项目源代码,项目编译完成,VS2017的输出窗口会给出 无法注册生成的ActiveX控件的错误提示 。 提示中看出是权限不够导致,所以我们提前使用管理员身份运行VS2017 。如果忘记,那么久关闭VS2017,然后用管理用身份重新打开。在以管理用身份启动VS2017中,点击菜单栏上的 “文件 > 最近使用的项目和解决方案”,然后选择之前创建的项目的解决方案,将其打开。 项目编译成功。编译完成还不可以直接点击调试运行ActiveX项目,项目生产的ocx文件无法直接运行,VS弹出错误提示: 后续.... 文章来源: 【C++笔记02

C#调用Activex中串口电子秤的数据,并将电子秤的数据显示到前端页面

匿名 (未验证) 提交于 2019-12-02 22:06:11
大二的一个项目需要用到Activex技术将读取到串口中的数据在后台获取到,并将串口的数据写入数据库,这个过程需要在后台使用C#调用Activex控件已经使用的方法,然后在前端通过JavaScript进行调用串口的数据进行赋值 <script type="text/javascript"> function method1() { var obj = document.getElementById("obj1"); var retVal = obj.GetData(); document.getElementById('<%=Label1.ClientID%>').innerText= retVal ; } </script> <body> <form id="form1" runat="server"> <object id="obj1" classid="clsid:F742E011-3467-4447-B069-C5BF3D148EF9"> </object> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> <br/><br/> <button onclick="method1();" type="button">方法五</button> </form> </body> 文章来源: C

Can I check to see if CoInitialize has been called or not?

怎甘沉沦 提交于 2019-12-02 20:45:59
In a multi-threaded environment with ADO database connections, I would like to know if CoInitialize has been called or not. How would I go about checking this? Normally you should not do this check and just call CoInitialize / CoUnInitialize pair. Still you can do it like this: function IsCoInitialized: Boolean; var HR: HResult; begin HR:= CoInitialize(nil); Result:= (HR and $80000000 = 0) and (HR <> S_OK); if (HR and $80000000 = 0) then CoUnInitialize; end; There is no problem if you call CoInitialize more than once in a thread. The first call should return S_OK , all subsequent calls should

Cannot pass arguments to ActiveX COM object using PyQt4

百般思念 提交于 2019-12-02 19:42:55
问题 I'm trying to write some Python code to talk to the Thorlabs APT ActiveX control. I'm basing my code on the code found on this page, but trying to use PyQt4 ActiveX container instead of the wxPython ActiveX container. It works for a very simple ActiveX methods, however, I get an error when trying to call a method that takes arguments. This code works and shows the about box for Thorlabs APT: import sys from ctypes import * from PyQt4 import QtGui from PyQt4 import QAxContainer class APTSystem

AxShockwaveFlashObjects and ShockwaveFlashObjects from Flash ocx

风流意气都作罢 提交于 2019-12-02 16:59:52
问题 I'm trying to create: AxShockwaveFlashObjects.dll and ShockwaveFlashObjects.dll entering the following command: aximp C:\WINDOWS\system32\Macromed\Flash\FlDbg10.ocx /nologo but I get an E_ACCESSDENIED error. What am I doing wrong? Thanks! 回答1: Open your command prompt. Switch to the directory that contains the aximp.exe file. Typically; C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin> Enter the following command (you may need to change the name of your COX file to match your version.

Using “FSO” in Javascript, how to write a variables's content to a file? [duplicate]

牧云@^-^@ 提交于 2019-12-02 13:34:06
Possible Duplicate: how to write a variables's content to a file in JavaScript I have this piece of code to create a text file. How can I write to this text file? function makefile() { var fso; var thefile; fso = new ActiveXObject("Scripting.FileSystemObject"); thefile=fso.CreateTextFile("C:\\tmp\\MyFile.txt",true); thefile.close() } Here's one way: makefile(); function makefile () { var fso = new ActiveXObject("Scripting.FileSystemObject"), thefile=fso.CreateTextFile("C:\\temp\\MyFile.txt",true); thefile.WriteLine('abc'); thefile.Close(); } Bear in mind this will only work in IE with the

Sometimes the ActiveX Combobox only shows one row, why?

痴心易碎 提交于 2019-12-02 10:49:41
It seems that when I first click on the combobox and then click on the arrow, all items are displayed. While if I click on the arrow without clicking on the combobox before, only one item is displayed and I can click on scroll buttons to see the other items. Why does this happen? Here is the macro I am using to populate the combobox with items Private Sub ComboBox1_GotFocus() Dim c As Range Dim selText As String selText = ComboBox1.selText ComboBox1.Clear For Each c In wConfig.Range("BudgetDropdown").Cells ComboBox1.AddItem c.Value Next c ComboBox1.selText = selText End Sub To automatically

Cannot pass arguments to ActiveX COM object using PyQt4

久未见 提交于 2019-12-02 10:20:02
I'm trying to write some Python code to talk to the Thorlabs APT ActiveX control. I'm basing my code on the code found on this page , but trying to use PyQt4 ActiveX container instead of the wxPython ActiveX container. It works for a very simple ActiveX methods, however, I get an error when trying to call a method that takes arguments. This code works and shows the about box for Thorlabs APT: import sys from ctypes import * from PyQt4 import QtGui from PyQt4 import QAxContainer class APTSystem(QAxContainer.QAxWidget): def __init__(self, parent): self.parent = parent super(APTSystem, self)._