com

Merging two .IDL files or two .tlb files into one file

跟風遠走 提交于 2019-12-11 08:27:11
问题 I have 2 .net dll's which I expose to COM using REGASM. In order to simplify referencing within a COM client I would like to make these into one file. I have tried converting both files to IDL and then copying the contents of the Library section of one into the other and then compiling back to .tlb with MIDL. This works fine for the TypeDefs within the second IDL however it seems to fail when it comes to the interfaces I copied in. OLE/COM viewer can see the interface definitions but when I

80040154 Class not registered (Exception from HRESULT

放肆的年华 提交于 2019-12-11 08:19:42
问题 EDIT: This program is trying to read in an excel file using C# then adding the data to a table in sql developer. I have ran into an error that I cant seem to figure out. When I try and load excel data into a Message Box I get this: Retrieving the COM class factory for component with CLSID {00020819-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). This error appears on: Microsoft.Office

Responsibility for memory deallocation in COM Interop

匆匆过客 提交于 2019-12-11 08:14:49
问题 I'm working on a C++ code consuming services provided by a .NET dll, which I'm accessing via COM Interop. I'm writing both the C++ and C# side. One of the methods that is exposed by the dll and is called from the C++, asks the dll to return an allocated byte array containing some information. After creating that method in my C# code, the .tlb generator exposed it as follows: HRESULT _stdcall DownloadData( [out] SAFEARRAY(unsigned char)* outputBuf); Testing has shown that when I send the

Making a custom surrogate for a dll com server

旧街凉风 提交于 2019-12-11 08:05:42
问题 the only 2 guides i've found for making a custom surrogate were not very clear (http://masterblood.ru/ch12c.shtml) (http://msdn.microsoft.com/en-us/library/ms682432(v=vs.85).aspx) does anyone know of any full working examples of one? I think it would be helpful for me to see. If not, I'm confused about how exactly I implement the interfaces they say I need to implement (IMarshal, IUnknown, and IClassFactory) I know I need to write functions like loaddllserver and freesurrogate myself, but do

Best way to keep COM-exposed assemblies in sync with .NET-referenced assemblies

痞子三分冷 提交于 2019-12-11 07:59:40
问题 I have a C#, COM-exposed .NET assembly, which I use heavily as a library for VB6 clients (Office VBA). I am extremely happy with it. That same COM-exposed library is useful for me in some newer, .NET clients I have written as well. From Googling, the consensus is that the only way to do this is to reference the .NET libraries themselves (link 1, link 2), which I have done. When these .NET apps are deployed, VS naturally wants to bring my COM .NET assemblies with them. But I now have several,

Delphi - Changing Chart Title in Excel causes AV - Updated with complete sample

回眸只為那壹抹淺笑 提交于 2019-12-11 07:58:34
问题 I am using Delphi Seattle to build and display a Chart in Excel (2013). I build my chart from a pivot table. The chart displays everything fine. It has a default title, so I want to change that. This should be a simple property change, but I keep getting AV errors. When I google, the closest thing I can find mentions that I need to select the Chart and/or Chart title before I change it. [UPDATED] Here is a working sample that shows the problem. procedure TForm1.Button1Click(Sender: TObject);

Powershell Update Fields in Header and Footer in Word

[亡魂溺海] 提交于 2019-12-11 07:57:49
问题 I'm trying to get a Powershell Script working that needs to update all fields I have in Header and Footers of all pages. But even after hours of research, I don't get any farther than being able to update the fields in the main text. Sure, that is really useful and everything and I am using it as well, but I would also like to update the fields in the headers. I'm afraid I can't be of much help other than showing you the snippet I have that updates all my fields in the document. So here goes

ATL COM 32-bit dll to 64-bit non-COM dll

梦想与她 提交于 2019-12-11 07:57:39
问题 I have a 32-bit dll library project written in C++ ATL COM. How do you convert a ATL COM project to pure C++ non-COM 64-bit? I believe ATL COM, or COM, doesn't support 64-bit. Are there any instructions/guidelines on how to strip away the ATL COM part of such a project and replace it with managed or unmanaged C++, so it's compile able to 64-bit? Best Regards, Johan 来源: https://stackoverflow.com/questions/52702542/atl-com-32-bit-dll-to-64-bit-non-com-dll

WPF application which calls an API, which needs a message pump

做~自己de王妃 提交于 2019-12-11 07:56:40
问题 I have a WPF application that calls an API to operate a device (a scanner). This API is COM based, and internally has a hidden window that the scanner sends messsages too. The intent of the API is to turn those windows messages into COM events. The problem is that the WPF application doesn't have a message pump, and therefore none of the messages are being delivered to the hidden window. Therefore none of the events are fired and it looks like the scanner is not responding. How should I

Monitoring ASP/COM+ application performance in Windows 2003/IIS 6.0

混江龙づ霸主 提交于 2019-12-11 07:49:39
问题 We are running a website using Active Server Pages & COM+ components . The ASP pages call COM+ components which in turn communicates with external systems and respond to ASP page requests. We find that the application becomes slow over a period of time and requires restarts (like in couple of days). The website runs on good hardware and does not have huge traffic and so we believe it's not a capacity issue. The application was written in ASP 3.0, VB 6.0 (COM) by an external vendor who does