com

How exactly do I config DCOM to load my DLL into a separate process?

十年热恋 提交于 2019-12-04 15:05:23
I'm trying to force an existing native C++ ATL in-proc COM server into a separate process. I hope DCOM can do this for me without changing the COM server. I started with a usual registry setup - I have a HKCR\CLSID{classId} entry and an InProcServer32 key there specifying the path to the .dll file. I generated an application id (GUID) and added it here and there. Specifically I added a string value "AppId" under HKCR\CLSID{classId} equal to the application id. I also added a HKCR\AppId{applicationId} key and a string value "DllSurrogate" equal to an empty string. I thought it would be enough

Good tools for analysing COM object registry interference? [closed]

空扰寡人 提交于 2019-12-04 14:41:07
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I have inherited two complicated COM objects. One was derived from the other and (allegedly) the GUIDs, etc., were all changed so that they should not interfere. They do interfere and so far our debugging has not identified the culprit -- we've done registry compares and source code diffs and looked through the

Returning string to JavaScript from C++ function

安稳与你 提交于 2019-12-04 14:19:36
问题 I have a class (JSObject) that implements the IDispatch interface. The class is exposed to JavaScript running in my hosted web browser control (IWebBrowser2). See more here about how this works: Calling C++ function from JavaScript script running in a web browser control I can call in to JSObject from my JavaScript code, and I can receive returned integers/longs. But something goes wrong when the function returns a string (BSTR). This is a part of the IDispatch::Invoke() code: int lenW =

How can I register a COM-Object with Windows Installer XML

こ雲淡風輕ζ 提交于 2019-12-04 14:18:08
I have got the following Problem: In my WiX Setup I need to register a COM Object. I have got a ".tlb" File and a ".dll" File (in my example: XYCommon.dll and a XYCommon.tlb) Now I want to make the Setup to Register the TLB. How Can I do this in Windows Installer XML ? My first try was to work with a CustomAction and Open "Regasm.exe" and Register it - but I dont know how I can bring the Regasm.exe to Register the XYCommon.tlb Any Help ? Thanks BryanJ Use the WiX harvester utility called Heat . It will generate the WiX source that contains the necessary registry entries to correctly register

Register managed assemblies with COM without using the GAC

泪湿孤枕 提交于 2019-12-04 14:16:52
问题 I'm wondering if it possible to register assemblies with COM without having to register it with the GAC. We need to deploy some .net libraries that are exposed to classic asp using a CCW. But deployments are a nightmare. 回答1: Yeap, use regasm.exe with /codebase key for that. When you use regasm.exe without /codebase it only writes the filename of the assmebly to the registry and so the .NET runtime can't find it unless the assembly is in the GAC. With /codebase it will write the full path and

Call COM object method from Go without CGo

偶尔善良 提交于 2019-12-04 13:17:14
问题 I have created a Direct3D9 wrapper in Go which uses CGo to interface with the COM objects in C. I would like to get rid of the dependency on a C-compiler under Windows so the user would not have to install MinGW or Cygwin to use DirectX from Go. The problem is that d3d9.dll does not expose C-functions but uses COM. The only function that can be called directly after loading the DLL (with syscall.LoadLibrary("d3d9.dll") ) is Direct3DCreate9 . This returns a COM object which exposes all

Simulating SideBySide for Out of Process ActiveX

怎甘沉沦 提交于 2019-12-04 13:09:00
We are adapting our client side relatively complicated application (ActiveX / .net / Delphi / C++ / COM ) to use SxS to achieve non admin deployment and isolation from older versions of our product. We were able to achieve this goal for almost all our in proc components such as our .net ui, Delphi ui, and the COM servers we use in proc by composing a manifest file which described all the libraries used by our process, with no registration on the client of any of the components (almost). And here comes the almost part: At the moment, our application invokes (from it's c++ portion) an out of

Downloading file using IE from python

ε祈祈猫儿з 提交于 2019-12-04 13:04:51
问题 I'm trying to download file with Python using IE: from win32com.client import DispatchWithEvents class EventHandler(object): def OnDownloadBegin(self): pass ie = DispatchWithEvents("InternetExplorer.Application", EventHandler) ie.Visible = 0 ie.Navigate('http://website/file.xml') After this, I'm getting a window asking the user where to save the file. How can I save this file automatically from python? I need to use some browser , not urllib or mechanize, because before downloading file I

C# Marshalling COM objects between threads

北城以北 提交于 2019-12-04 12:58:31
I'm getting very confused about whether C# marshal's COM objects between threads. To this end I have an application which is loading a set of files in a task parallel fashion. I'm using the StaTaskScehduler to load the files using the COM object. Once the COM object is loaded I am storing the object in a central list. I then later try to perform some processing on this data, again using the STATaskScheduler. However at this point I hit a problem. I receive an exception as follows: An unhandled exception of type 'System.Runtime.InteropServices.InvalidComObjectException' occurred in MadCat.exe

How to convert BSTR to std::string in Visual Studio C++ 2010?

梦想的初衷 提交于 2019-12-04 12:51:12
问题 I am working on a COM dll. I wish to convert a BSTR to a std::string to pass to a method that takes a const reference parameter. It seems that using _com_util::ConvertBSTRToString() to get the char* equivalent of the BSTR is an appropriate way to do so. However, the API documentation is sparse, and the implementation is potentially buggy: http://msdn.microsoft.com/en-us/library/ewezf1f6(v=vs.100).aspx http://www.codeproject.com/Articles/1969/BUG-in-_com_util-ConvertStringToBSTR-and-_com_util