activex

Manually generate ActiveX wrapper after TLBIMP-ed dlls?

有些话、适合烂在心里 提交于 2019-11-30 18:38:13
问题 I have several ActiveX components that needed to be accessed from a C# project. I can import them via Visual Studio's add reference dialog, which will also automatically generate wrappers class. (i.e. ABCLib and AxABCLib ) I know that I can generate the primary interop assembly manually by running TLBIMP /primary on each individual OCX file but I could not find a way to generate the ActiveX wrapper unless I do it via Visual Studio user interface. Is there a command-line version that generate

Register ActiveX exe server using WiX

不羁岁月 提交于 2019-11-30 17:18:25
问题 I have several VB6 ActiveX server exe files which need to be registered on install before they can be used. I have tried using Heat to extract the information but it only generates a file element. These files can be registered by calling them with the /regserver switch and unregister by calling them with the /unregserver switch. I understand this is not the correct way to this. Instead I should add the registry keys and other required elements to my wix source. My question is how do I find

Creating and deploying an ActiveX control in .NET

℡╲_俬逩灬. 提交于 2019-11-30 17:03:15
问题 Since there is apparently no Flash control that can accept bitmap pastes, I want to think about writing one myself. I'd rather not use Flash though, so I though about using .NET. Now I believe the correct terminology for a native code control that can be downloaded and run in the browser is "ActiveX control". So my question is, can I create such an ActiveX control with .NET? I've found some tutorials on the web, but they all expect you to have the assembly installed on your local machine, and

Programmatically Printing in Adobe Reader 9 using .NET Interop

 ̄綄美尐妖づ 提交于 2019-11-30 16:22:00
问题 I am using VB.Net WinForms. I would like to call the Adobe Reader 9 ActiveX control to print some PDFs. I have added the ActiveX control to the VS toolbox (the dll is AcroPDF.dll, the COM name "Adobe PDF Reader". After some experiment the following code works. Dim files As String() = Directory.GetFiles(TextBoxPath.Text, "*.pdf", SearchOption.TopDirectoryOnly) Using ActiveXPDF As New AxAcroPDFLib.AxAcroPDF Me.Controls.Add(ActiveXPDF) ActiveXPDF.Hide() For Each filename As String In files

Programmatically Printing in Adobe Reader 9 using .NET Interop

徘徊边缘 提交于 2019-11-30 16:20:46
I am using VB.Net WinForms. I would like to call the Adobe Reader 9 ActiveX control to print some PDFs. I have added the ActiveX control to the VS toolbox (the dll is AcroPDF.dll, the COM name "Adobe PDF Reader". After some experiment the following code works. Dim files As String() = Directory.GetFiles(TextBoxPath.Text, "*.pdf", SearchOption.TopDirectoryOnly) Using ActiveXPDF As New AxAcroPDFLib.AxAcroPDF Me.Controls.Add(ActiveXPDF) ActiveXPDF.Hide() For Each filename As String In files ActiveXPDF.LoadFile(filename) ActiveXPDF.printAll() 'Begin Yukky Hack ' Dim endTime As Date = DateAdd

Pass Array From C# COM object to JavaScript?

别说谁变了你拦得住时间么 提交于 2019-11-30 15:49:13
Similar to this How do I return an array of strings from an ActiveX object to JScript but in C#. I have an COM control that passes back an array of strings to javascript. It seems like javascript cant understand what it is I am passing back and the array in javascript is always undefined. Javascript: try { keystore.openKeyStore("MY", true, false); var fNames = new Array(); fNames = keystore.getAllFriendlyNames(); document.getElementById('par').innerHTML = fNames[0]; } catch(err) { document.getElementById('err').innerHTML = err.description; } That outputs 'undefined' for fNames[0]; C#: public

Is there an equivalent to out-of-process COM EXE in .NET?

南笙酒味 提交于 2019-11-30 14:08:24
问题 One of the nice things about COM/ActiveX was the out-of-process EXE. You could have an EXE which exposed methods and properties in a form usable by both other processes, including VBScript and JScript. At the same time the EXE could have its own functionality, related or unrelated to that exposed by its type library. What is the .NET equivalent? I have an existing VB6 project which is a scripting language interpreter (using MSScript) and a resource of various tool functions for other

Resetting project compatibility in vb6

假装没事ソ 提交于 2019-11-30 13:42:40
When we break compatibility in a vb6 dll I have to do the following: Set to no binary compatibility Recompile Set compatibility again Remove reference to changed dll from all projects that use it Add reference back to all projects that use it Recompile all those projects Do the same for any projects that use those projects, etc. Of course that's a little bit simplified but anyone who's done it before should know what I'm talking about. My question is: Have you found a better way to do this, or have you found any (not too expensive) tools to facilitate this process? Or better yet, have you

How to read web.config APP key settings in HTML markup

我们两清 提交于 2019-11-30 11:47:09
I have an ASP.NET site which uses a 3rd party activeX control. I have to pass a few parameters to the OBJECT tag in the HTML page. If i hardcode these parameters into the HTML everything works. I would like to place the parameters in my web.config with app settings "key/value" pairs. My problem is i cannot read the app key setting in the HTML markup to succesfully pass them in as parameters. I can read them fine from server side code behind. What's the correct way to read these settings in the client side HTML markup ? Thanks Scott Mitchell In addition to using <%=ConfigurationManager

Why does GetSafeHwnd() return zero in an ActiveX control?

三世轮回 提交于 2019-11-30 10:08:36
问题 I have developed a MFC Activex control which is windowless and invisible in runtime, while i assumed that basically an activex is a control that would manipulate a windows handle, i have used GetSafeHwnd() to get windows handle, but unfortunately this method returns zero when it runs. maybe i had set wrong option when creating my activex. how i can create a windowless activex which could manipulate windows hanlde? 回答1: By definition, windowless ActiveX control doesn't have a window, and