activex

Passing an array from managed code to unmanaged C++ ActiveX component

别等时光非礼了梦想. 提交于 2019-12-11 07:21:18
问题 In an earlier post Passing pointer from managed C++/CLI to ActiveX C++ component I've asked about the correct means to pass an array (whether managed or unmanaged array) to an activeX component created in native C++. The activeX method has the following signature: short Component::CopyToBuffer(short FAR* ptr) {} when the activeX is imported to be used in C++/CLI the method signature is displayed as short Component::CopyToBuffer(short% ptr) {} when imported in C# it is displayed as short

Unable to Execute Macro With ActiveX Controls (Excel VBA)

戏子无情 提交于 2019-12-11 07:17:08
问题 Problem : Users on different machines unable to execute VBA macro that works perfectly on my machine and the machines of others. Having issues with ActiveX form controls in MS Excel 2010 v.14.0.7015.1000 (32-bit). Using ActiveX Button and Text box I wrote VBA code that populates the text box when the button is clicked. The code executes perfectly on my machine and has worked on other machines. I am having issues with other users being able to click the button. I told the user having trouble

How to hook ActiveX control into events/changes into my viewmodel?

↘锁芯ラ 提交于 2019-12-11 07:06:10
问题 I've added WindowsMediaPlayer ActiveX to my WPF/MVVM application. Now I need the control to react to changes happening in the viewmodel (most importantly updating URL when the current selection in my collection changes). Based on Walkthrough: Hosting an ActiveX Control in WPF I have the following in my Loaded event: // Create the interop host control. System.Windows.Forms.Integration.WindowsFormsHost host = new System.Windows.Forms.Integration.WindowsFormsHost(); // Create the ActiveX control

Adding scrollbar to an activeX control in MFC

泄露秘密 提交于 2019-12-11 06:15:38
问题 I'm trying to create an activeX control using Microsoft Foundation Class Library. I have created the control. It's a graph control. I have placed some buttons on the control as well. I am trying to add a scrollbar to my control using CScrollBar class. I create the control using CScrollBar::Create method. I can see the control when use my activeX control in an application. I have added the OnHScroll method to my control class. This derives from COleControl class . When I scroll I use

How can you get the terminal service client machine name from javascript?

回眸只為那壹抹淺笑 提交于 2019-12-11 05:58:17
问题 Is it possible to get the machine name, or IP, or MAC address (basically client network information) from javascript running Internet Explorer? I found the following code that seems to accomplish this: function Button1_onclick() { var locator = new ActiveXObject("WbemScripting.SWbemLocator"); var service = locator.ConnectServer("."); var properties = service.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration"); var e = new Enumerator (properties); document.write("<table border=1>");

Invoking the print/save/email function of Adobe Reader plugin in browser

ⅰ亾dé卋堺 提交于 2019-12-11 05:21:10
问题 I am looking for a way to invoke the print/save/email functions from the Adobe Reader plugin in the browser. To better explain, please open the following image in your browser: http://stylephp.com/demo/pdf.png In the image, you'll see a sample PDF is loaded in the browser in the Adobe Reader plugin. And the plugin has the save/email/print buttons on it. Also, there are four similar html buttons on top of it. When clicked on the html buttons on top, I would like to invoke the button within the

COM pass function pointer (delegate) as a method parameter to ActiveX object (implemented in C#)

做~自己de王妃 提交于 2019-12-11 04:53:22
问题 I'm working on a browser plugin using ActiveX/COM and I'm trying to pass a Javascript function to a method call so that it can be used as a callback. I've been able to get the function assigned to a property on the ActiveX object, but since the method is async all calls to the method must share the same callback. I've seen this existing SO question but I'm not sure if this is the exact same problem since I'm not dealing directly with function pointers. Example of what we have now : var obj =

Permission denied on frame

允我心安 提交于 2019-12-11 04:07:17
问题 I have a window based on the CAxWindow. In this window I create WebBrowser control. When the DISPID_DOCUMENTCOMPLETE happens I do: void __stdcall document_complete( LPDISPATCH pBrowser, VARIANT* ) { CComQIPtr< IWebBrowser2 > wb( pBrowser ); CComPtr< IDispatch > doc; if( SUCCEEDED( wb->get_Document( &doc ) ) ) { _docs.push_back( doc ); } ... } When the page is loaded I call for each document in _docs the script (IActiveScript and IActiveScriptSite): function main( doc ) { try { return doc.URL;

What is the proper way for an activeX (COM) control to clean up when closed by its parent?

♀尐吖头ヾ 提交于 2019-12-11 03:38:33
问题 I'm having problems with my .net controls not getting cleaned up properly when wrapped for activeX use. The default behavior leaves the SDK's test container app (TstCon32.exe) running as a GUIless process when I try and close it. The workaround I initially found via google was to override WndProc and call Environment.Exit(0) manually. This did get TstCon32.exe to shut down completely; however it's breaking the application where i need to have the control hosted. The App is MDI and WM_DESTROY

Expose a WinForms UserControl as an ActiveX control

白昼怎懂夜的黑 提交于 2019-12-11 03:33:37
问题 How do you expose an WinForms UserControl written in C# as an ActiveX control? My goal is to then use this UserControl from other languages such as VB6 or Delphi. 回答1: The solution is to use the Interop Toolkit, see http://msdn.microsoft.com/en-us/vbasic/bb419144 and http://www.codeproject.com/KB/vb-interop/VB6InteropToolkit2.aspx. 回答2: You will need to create a Runnable Callable Wrapper or COM Callable Wrapper depending on your direction. 来源: https://stackoverflow.com/questions/7409433