com

Any way to resolve C4772 errors without having to register DLLs?

余生长醉 提交于 2020-01-14 19:10:45
问题 I am maintaining a VS2010 project which has a number of cross-referenced COM libraries. I am trying to configure the project in such a way that it is buildable from a random workstation which has VS2010 installed. The workstation could be both 32 and 64 bit, so if I configure project to "register output", the build will fail to build on 32-bit machine, since 64-bit DLL will not be possible to load to call DllRegisterServer. Here is an example: Typelib from project B references typelib from

Any way to resolve C4772 errors without having to register DLLs?

冷暖自知 提交于 2020-01-14 19:09:48
问题 I am maintaining a VS2010 project which has a number of cross-referenced COM libraries. I am trying to configure the project in such a way that it is buildable from a random workstation which has VS2010 installed. The workstation could be both 32 and 64 bit, so if I configure project to "register output", the build will fail to build on 32-bit machine, since 64-bit DLL will not be possible to load to call DllRegisterServer. Here is an example: Typelib from project B references typelib from

Any way to resolve C4772 errors without having to register DLLs?

醉酒当歌 提交于 2020-01-14 19:07:26
问题 I am maintaining a VS2010 project which has a number of cross-referenced COM libraries. I am trying to configure the project in such a way that it is buildable from a random workstation which has VS2010 installed. The workstation could be both 32 and 64 bit, so if I configure project to "register output", the build will fail to build on 32-bit machine, since 64-bit DLL will not be possible to load to call DllRegisterServer. Here is an example: Typelib from project B references typelib from

How to get ATL support into an existing Windows application

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-14 17:54:21
问题 I'm building an application using Qt 5.3.1 in Visual Studio 2012. I also want to use a hardware library which requires me to add a simple ATL object to the project. This can be done by using a Visual Studio wizard. The wizard complains that my project is neither an MFC executable nor an MFC DLL with full ATL support. My question is: How can I add this support to my application? In the project properties I configured the project to link to the ATL and use the MFC. It did not work. Both

How to get ATL support into an existing Windows application

不问归期 提交于 2020-01-14 17:54:09
问题 I'm building an application using Qt 5.3.1 in Visual Studio 2012. I also want to use a hardware library which requires me to add a simple ATL object to the project. This can be done by using a Visual Studio wizard. The wizard complains that my project is neither an MFC executable nor an MFC DLL with full ATL support. My question is: How can I add this support to my application? In the project properties I configured the project to link to the ATL and use the MFC. It did not work. Both

Why is this TStreamAdapter not released?

感情迁移 提交于 2020-01-14 13:01:50
问题 Compare these two snippets: (d as IPersistStream).Save( TStreamAdapter.Create( TFileStream.Create('test.bin',fmCreate),soOwned),true); (d as IPersistStream).Load( TStreamAdapter.Create( TFileStream.Create('test.bin',fmOpenRead),soOwned)); This fails on the second TFileStream.Create because the first isn't destroyed. This is odd since the parameter has the only reference, I thought it would get destroyed in closing up the Save call. So I tried this: var x:IStream; begin x:=TStreamAdapter

Find all properties of an ActiveX component

一世执手 提交于 2020-01-14 10:28:32
问题 I tried looking around but was not able to convince myself with an answer as the world of COM/ActiveX seems to be very confusing. Basically what I want to know is, given the GUID, is there a way to know all the interfaces, properties and methods exposed by an ActiveX control? I read somewhere that you just have to ask if a particular property is there or not. But how do I ask about a property before knowing what are there? I guess IDispatch does something similar, but I am not able to make

Closing Excel application with Excel Interop without save message

≡放荡痞女 提交于 2020-01-14 09:13:12
问题 I am working with Excel Interop COM object. I am writing a method in which I am opening and closing an Excel application followed by opening an Excel workbook and sheet. After I'm done working on them I am closing both the application and workbook. My problem is that this method can be called repeatedly several times and when the sheet and app are closing I get from the Excel application a message if I want to save the changes I've made. The method get stuck until I press "No" but I can't

Closing Excel application with Excel Interop without save message

限于喜欢 提交于 2020-01-14 09:12:23
问题 I am working with Excel Interop COM object. I am writing a method in which I am opening and closing an Excel application followed by opening an Excel workbook and sheet. After I'm done working on them I am closing both the application and workbook. My problem is that this method can be called repeatedly several times and when the sheet and app are closing I get from the Excel application a message if I want to save the changes I've made. The method get stuck until I press "No" but I can't

Exception from HRESULT: 0x80004002 (E_NOINTERFACE)

旧街凉风 提交于 2020-01-14 07:48:08
问题 I'm in charge of the maintenance of a C# application (VS 2005). This C# applications calls a dll ("mydll.dll"). I needed to make a few changes on the dll in question. I have the file "mydll.vbp" that was written in Visual Basic 6.0. I made my changes in Visual Studio and, then, "made "mydll"" from the Visual Basic interface. The problem is that, now, at each time I try to instance a class from "mydll.dll" in debbuger mode in C#, I have the following "InvalidCastException" Unable to cast COM