activex

Using an ocx in a console application

I want to quickly test an ocx. How do I drop that ocx in a console application. I have found some tutorials in CodeProject and but are incomplete. ...

Active X Control JavaScript

My coworker and I have encountered a nasty situation where we have to use an active X control to manipulate a web camera on a page. Is it possible to assign a javascript event handler to a button in the active x control so that it would fire an action on the page when clicked, or do we have to create a button on the html page itself tha...

Good reasons for not letting the browser launch local applications

Hello all, I know this might be a no-brainer, but please read on. I also know it's generally not considered a good idea, maybe the worst, to let a browser run and interact with local apps, even in a intranet context. We use citrix for home-office, and people really like it. Now, they would like the same kind of environment at work, a ...

ActiveX control default property discovery

Is it possible to determine which property of an ActiveX control is the default property? For example, what is the default property of the VB6 control CommandButton and how would I found out any other controls default! /EDIT: Without having source to the object itself ...

How do I return an array of strings from an ActiveX object to JScript

I need to call into a Win32 API to get a series of strings, and I would like to return an array of those strings to JScript. This is for script that runs on local machine for administration scripts, not for the web browser. My IDL file for the COM object has the interface that I am calling into as: HRESULT GetArrayOfStrings([out, retv...

How do you allow multiple file uploads on an internal windows-authentication intranet?

I have a couple of solutions, but none of them work perfectly. Platform ASP.NET / VB.NET / .NET 2.0 IIS 6 IE6 (primarily), with some IE7; Firefox not necessary, but useful Allowed 3rd Party Options Flash ActiveX (would like to avoid) Java (would like to avoid) Current Attempts Gmail Style: You can use javascript to add new Uplo...

Detecting appilcation hangs with ActiveX controls in .Net

I am working on upgrades to a screen scraping application. We are using an ActiveX control to scrape screens out of an IBM mainframe. The mainframe program often hangs and crashes the ActiveX control causing our application to crash. We don't have access to the mainframe or the ActiveX source code. We are not going to write our own activ...

Is it possible to write ActiveX Controls in C# that will run in Excel?

I have been searching on the web for some example code on how we can write a custom ActiveX Control for use in Excel using .NET but so far I have found old articles suggesting that it is not supported. The application we are building uses Excel as a report writer so we which to add some custom controls to the worksheets to provide a ri...

Under what circumstances does Internet Explorer fail to properly unload an ActiveX control?

I'm running into a perplexing problem with an ActiveX control I'm writing - sometimes, Internet Explorer appears to fail to properly unload the control on process shutdown. This results in the control instance's destructor not being called. The control is written in C++, uses ATL and it's compiled using Visual Studio 2005. The control i...

AxAcroPDF - Vista64 Class Not Registered Error

We have a WinForms application written in C# that uses the AxAcroPDFLib.AxAcroPDF component to load and print a PDF file. Has been working without any problems in Windows XP. I have moved my development environment to Vista 64 bit and now the application will not run (on Vista 64) unless I remove the AxAcroPDF component. I get the follow...

.NET ActiveX Component in IE - How to Get Browser Reference

I admit I know enough about COM and IE architecture only to be dangerous. I have a working C# .NET ActiveX control similar to this: using System; using System.Runtime.InteropServices; using BrowseUI; using mshtml; using SHDocVw; using Microsoft.Win32; namespace CTI { public interface CTIActiveXInterface { ...

Blocking dialogs in .NET WebBrowser control

I have a .NET 2.0 WebBrowser control used to navigate some pages with no user interaction (don't ask...long story). Because of the user-less nature of this application, I have set the WebBrowser control's ScriptErrorsSuppressed property to true, which the documentation included with VS 2005 states will [...]"hide all its dialog boxes th...

Fighting with Protected Mode in Vista

Our application commonly used an ActiveX control to download and install our client on IE (XP and prior), however as our user base has drifted towards more Vista boxes with "Protected Mode" on, we are required to investigate. So going forward, is it worth the headache of trying to use the protected mode API? Is this going to result in ...

Firing COM events in C++ - Synchronous or asynchronous?

I have an ActiveX control written using the MS ATL library and I am firing events via pDispatch->Invoke(..., DISPATCH_METHOD). The control will be used by a .NET client and my question is this - is the firing of the event a synchronous or asynchronous call? My concern is that, if synchronous, the application that handles the event coul...

How to build a 64-bit .NET DLL, with 64-bit COM interop?

I need to build a managed DLL, targeted for x64, and expose it via x64 COM. I need a walk through, good article, etc... Interop is fairly straightforward, but when you talk about x64 on both sides, I can't find anything. ...

How to create an AxHost solely in code [C#]

Hello, I'm using a COM Wrapper to interact with Windows Media Player. The it is using an AxHost to somehow wrap the player, for me it's all just magic under the hood^^ The AxHost.AttachInterfaces looks like this protected override void AttachInterfaces() { try { //Get the IOleObject for Windows Media Player. IOleObj...

How to write a class library for OLE Automation?

I have Excel add-in which I add so many class modules that it is now very bulky. I want to convert it into a type library or a COM package so that I can re-use it for the other apps in the MS Office suite. I ported the add-in to Visual Studio as a class library project but Excel Automation doesn't recognize the classes in the compiled ....

Trying to set/get a JavaScript variable in an ActiveX WebBrowser from C#

We have a windows application that contains an ActiveX WebBrowser control. As part of the regular operation of this application modifications are made to the pages that are displayed by the ActiveX WebBrowser control. Part of these modifications involve setting a JavaScript variable in a web page being loaded into the ActiveX WebBrowser....

How to handle an ActiveX event in Javascript

This is somewhat of a follow-up to an answer here. I have a custom ActiveX control that is raising an event ("ReceiveMessage" with a "msg" parameter) that needs to be handled by Javascript in the web browser. Historically we've been able to use the following IE-only syntax to accomplish this on different projects: function MyControl::R...

ActiveX events between apartments

Environment: VS2008 (ATL), Borland Developer Studio 2006. Hello all. I'm having some troubles with ActiveX control events. Here is a brief description of my app architecture: There is an inproc COM server which contains STA ActiveX control (aka control) and MTA COM object (aka object). Here is the IDL definition of the control an...