com

Reading data from Excel in Haskell

扶醉桌前 提交于 2019-12-05 00:11:10
I would like to get data from .xls files without manually opening Excel. One possibility is to use COM automation. There are the com-1.2.3 and hdirect packages, but I can't find any examples of how to use these packages with Excel. Does anyone have a solution for this? With something like this, if your needs are relatively simple, I've found that it's more straightforward to find/write a command line executable that just pulls out a csv from the xls file. Then you invoke that executable from haskell, and proceed with its output from there. In Ruby, I use rjb (ruby java bridge) and use a

Managed COM aggregation

混江龙づ霸主 提交于 2019-12-04 23:50:44
问题 It is my understanding building a COM object aggregating an existing COM object implies implementing redirection logic in the IUnknown.QueryInterface method of the outer object. The question I have is how to do that if the object you are building is managed. On managed objects IUnknown is not explicitly implemented COM Interop does it for you. So how do I tell COM Interop that the object I build is an aggregation of another COM object? So far the only way I found is to implement all the

a Reference to 'Microsoft Windows Installer Object Library' could not be added

巧了我就是萌 提交于 2019-12-04 23:47:55
I'm unable to add reference to 'Microsoft Windows Installer Object Library' with VS2012. Any ideas, what could cause this issue? When I try to create reference to the COM component, I get this error message "a reference to 'Microsoft Windows Installer Object Library' could not be added". The VS project is basic class library (c# x86). In Visual Studio go to References > Add Reference... > COM > Browse... > %WINDIR%\system32\msi.dll . Worked for me on VS2012. Check ur Regedit , Please check these Values HKEY_CLASSES_ROOT\TypeLib\{000C1092-0000-0000-C000-000000000046}\1.0 If Visual Studio 2010

Subscribe to C# .net Event in VB6

别等时光非礼了梦想. 提交于 2019-12-04 23:43:39
问题 I need to get be able to handle a .net event in VB6. So far i have it set up by making me c# class COM visible. My VB6 object can call methods on it fine but now i need some way to communicate from .net to VB. If i add an event to my c# class the .net wrapper seems to add an add_EventName and remove_EventName which i assume this is to subscribe and unsubscribe to the event. But i'm still a novice when it comes to VB6 and come so i'm not really sure how to use it. The add_EventName seems to

COM+ object activation in a different partition

久未见 提交于 2019-12-04 23:37:03
I had created a COM+ domain partition then mapped it to a Windows 2008 server machine and imported a COM+ application into it. I tried using the following C# code to activate an object from that specific partition on the server remotely: //partition guid Guid guidMyPartition = new Guid("41E90F3E-56C1-4633-81C3-6E8BAC8BDD70"); //parition moniker string uri= "partition:{" + guidMyPartition + "}/new:MyObject"; Type t = Type.GetTypeFromProgID("MyObject", "MyServer"); MyObject obj = (MyObject)Activator.GetObject(t, uri); But I get this exception: Cannot create channel sink to connect to URL

Set OLE Request Timeout from C++

自闭症网瘾萝莉.ら 提交于 2019-12-04 23:05:52
问题 I am instantiating a local COM server using CoCreateInstance. Sometimes the application providing the server takes a long time to start. When this happens, Windows pops a dialog box like this: Server Busy The action cannot be completed because the other program is busy. Choose 'Switch To' to activate the busy program and correct the problem. [Switch To...] [Retry] [Cancel] I have found mention of a Visual Basic property on the Application object, OleRequestPendingTimeout, that can be used to

Icon overlay issue with Python

好久不见. 提交于 2019-12-04 22:55:14
问题 I found some examples and topics on this forum about the way to implement an icon overlay handler with Python 2.7 & the win32com package but it does not work for me and I don't understand why. I create the DLL and I have no error when I register it. I have also tried directly with the script but it's the same. It's like the class is never called. Here is the code: import win32traceutil from win32com.shell import shell, shellcon import pythoncom import winerror import os REG_PATH =r'Software

How to check if a COM component (EXE/DLL file) is registered or not (using .NET)? [duplicate]

不打扰是莪最后的温柔 提交于 2019-12-04 22:52:43
This question already has answers here : How to check if a DLL file is registered? (7 answers) Closed 4 years ago . How do I check if a COM component (EXE/DLL file) is registered or not using .NET? Just make a lookup in the registry. HKEY_CLASSES_ROOT\yourcom.component. DB Tech It depends. Your component will be registered into the Windows Registry so you need to figure out which hive you want to look in. If your component is installed with regasm, chances are HKCU will be used, since it will be run from a user's command line. If, however, you use an MSI, the MSI may not use regasm and may

Unload a COM control when working in VB6 IDE

喜夏-厌秋 提交于 2019-12-04 22:14:00
Part of my everyday work is maintaining and extending legacy VB6 applications. A common engine is written in C/C++ and VB6 uses these functions in order to improve performance. When it comes to asynchronous programming, a C interface is not enough and we rely on COM controls to fire events to VB6. My problem is that when I register the control in VB6, VB loads this control in memory and does not unload it until I quit the VB6 IDE. As the control is loaded the whole time, I am unable to recompile it in VC6, because the DLL file is locked. A solution I found is not to enable the control in VB

Registration free activation of native COM (activex) component from .NET

▼魔方 西西 提交于 2019-12-04 22:09:05
I have a native dll (which is an activex control) that I need use with my .NET application without having to register the dll in the registry. I have read several in depth posts about registration free activation, some of the better ones are A lengthy one from Steve White and Leslie Muller This one from samuel jack And another from Mike Makarov and from what I can see it is possible. However several hours and hundreds of tests later I just cant get it to work. I've done a bit of PInvoking and even less with ActiveX controls in .NET in my career, so would appreciate any input from anyone whom