com

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

Why is the COM interface contract immutable?

筅森魡賤 提交于 2019-12-11 03:35:06
问题 I've googled quite a bit, and found it weird that no one cared to explain why COM interfaces are immutable. I suppose that the reason you're unable to remove any methods from a COM interface, is because a client relying on that interface, would encounter an error, which isn't good. But why would adding new features to the interface change any of that? Has this something to do with the underlying vtable? 回答1: If you add a method, a newer client that uses that method will fail when working with

Deplhi Import Component - Type Library vs ActiveX

 ̄綄美尐妖づ 提交于 2019-12-11 03:33:02
问题 I am trying to use the "Microsoft Terminal Services Active Client" in Delphi. I see that I can create the COM *.tlb file either via " Import ActiveX control " or " Import Type Library ". They both seem to give the same *.tlb source file. Is there a difference between the two approaches. (Long time Delphi user, but new to COM). 回答1: Delphi Help System says: "The Import Type Library dialog box displays the type libraries registered on your system so you can add them to your projects. If the

VB Script code not calling c# function

你离开我真会死。 提交于 2019-12-11 03:23:47
问题 I have created a C# dll and registerd as Com object. (Used ProgID, Set Comvisible True and Sign the assembly using Strong name). I am trying to call c# method using the below vbscript code Option Explicit Dim testwfhandler Set testwfhandler= CreateObject("CoreComponentWorkflow.WorkflowHandler") If Not testwfhandler Is Nothing Then Call testwfhandler.test() End If Set testwfhandler= Nothing am i missing anything? or am doing anything wrong? The below is the registry informaton of my registered

Threading in BHO/ATL/COM. Winapi or something else?

最后都变了- 提交于 2019-12-11 03:19:57
问题 I writing IE add-on and I'm using ATL for it. I need to create background worker thread so UI thread will be unblocked as soon as possible. My question is, should I use the lowest possible way of creating thread which is Winapi, CreateThread etc. Or is there other proffered way of creating worker thread in BHO/ATL/COM projects? I have to learn this stuff first so I thought I would ask first ;) 回答1: There is no need to use low-level APIs unless you need the level of control they offer. With

Issues with porting COM+ applications from Windows 2003 to Windows 2008 Server

别说谁变了你拦得住时间么 提交于 2019-12-11 03:13:55
问题 We are migrating our applications from Windows Server 2003 to Windows Server 2008 R2. I am facing some issues with the migration. I have deployed many COM+ components (32 bit) and DCOM components (32 bit) in the Windows Server 2008 R2. These COM+ and DCOM components are VC++ code. I have a .net 3.5 service 32 bit deployed in the same server, which calls the COM+ components mentioned above. Whenever i try to start the Service , it does not start and throw multiple errors in the event log. The

Find the size of retrieved binary data with WinHttp.WinHttpRequest

半世苍凉 提交于 2019-12-11 03:06:28
问题 I've recently realized that URLDownloadToFile uses the IE proxy setting. So I'm looking for an alternative and found WinHttp.WinHttpRequest may work. It seems the ResponseBody property contains the fetched data and I need to write it to a file. The problem is that I cannot find the byte size of it. http://msdn.microsoft.com/en-us/library/windows/desktop/aa384106%28v=vs.85%29.aspx has the information for the object but I don't find relevant properties for it. Can somebody tell how? strURL :=

PHP - Using COM error message: Parameter 5: Type mismatch

北慕城南 提交于 2019-12-11 03:06:16
问题 I'm using PHP to call an object on server with class COM, at IIS 7. The object is well created, but when I'm using a method of it, PHP return this error: PHP Fatal error: Uncaught exception 'com_exception' with message 'Parameter 5: Type mismatch. The error occurs in the parameter $bd. My PHP code: $oem = new COM("LogicControlOEM.OEM_EjecutaOEM") or die("ERROR"); var_dump($oem); $empresa = 1; $usuario = 'XXX'; $pass = 'XXX'; $proveedor = ''; $servidor = 'XXXX'; $bd = 'example'; // I tried to

import vb.net class library to vb6 project

最后都变了- 提交于 2019-12-11 03:00:14
问题 I have created a vb.net class library. It is an interface for a storage device. It gives some objects and methods in order to read and write data to the device. The problem is that a customer has a vb6 application where we want to add the functionality of the class library in order to manipulate the device. i have changed the classes to com classes, checked the com interopt checkbox and registered the library with .net framework 2.0 regasm.exe. I added the library as reference to a blank vb6

How to detect that an add-on has been disabled by the user in IE9?

心不动则不痛 提交于 2019-12-11 02:57:10
问题 IE9 users can disable an add-on, such as a browser helper object, by clicking on the cog button and selecting "Manage Add-Ons". I need to detect if a given add-on has been disabled in such way, using JavaScript. I can't seem to find a way for my error handler ( <object ... onerror="myhandler(event)" ) to detect that the BHO has been disabled. errorEvent.type is simply "error" . Is there any way? I need to detect this scenario because just having the webpage try to install the BHO again yields