com

Must the IUnknown interface be re-implemented by every new COM class?

≡放荡痞女 提交于 2019-12-23 10:20:46
问题 Sorry if this question seems obvious for everyone, but I am very new to COM. From the tutorial I see here http://www.codeguru.com/cpp/com-tech/activex/tutorials/article.php/c5567, it seems like every COM class created in C++ must implement its own QueryInterface, AddRef and Release. Since these methods should have basically the same implementation for any new class, I don't understand why there isn't some abstract class or whatever that implements it for the developer. I don't understand why

Difference between Interop.Excel and Tools.Excel?

妖精的绣舞 提交于 2019-12-23 10:15:42
问题 I'm currently working on an AddIn for Microsoft Excel, and I'm a little confused about something : What are the differences between Interop.Excel and Tools.Excel ? For example, between Interop.Excel.Workbook and Tools.Excel.Workbook ? Or Interop.Excel.Worksheet and Tools.Excel.Worksheet ? What are they used for, where do I use which one ? Is it possible to cast from one to another ? Thanks!! 回答1: Microsoft.Office.Tools.Excel is the set of objects exposed by visual studio tools for office, for

What languages to write windows shell extensions

六月ゝ 毕业季﹏ 提交于 2019-12-23 09:48:10
问题 I know how to write shell extesions in python. The drawbacks are it does not work on 64 bit Windows I am unsure how creating a python process everytime something “happens” reduces performance. I know how to write shell extensions using .Net (C#) The drawbacks are discouraged by MS I am unsure how this reduces performance. (does it?) I have seen shell extenions written in (free)pascal. Are there drawbacks using this approach Does this work with 64bit windows. Obviosly one can write shell

What's the purpose of COM+ library applications?

落花浮王杯 提交于 2019-12-23 09:41:13
问题 When a COM+ application is created the wizard offers to choose between a library and a server application. A server application is activated in a separate process and this can be used to cheaply interop 64-bit consumers with 32-bit in-proc COM components. What's the use of library applications that are activated right in the caller process? Why use them instead of plain old in-proc COM servers? 回答1: There are several: Performance - it is a bit faster as you don't have to go through the

the OpenMP “master” pragma must not be enclosed by the “parallel for” pragma

筅森魡賤 提交于 2019-12-23 09:37:08
问题 Why won't the intel compiler let me specify that some actions in an openmp parallel for block should be executed by the master thread only? And how can I do what I'm trying to achieve without this kind of functionality? What I'm trying to do is update a progress bar through a callback in a parallel for: long num_items_computed = 0; #pragma omp parallel for schedule (guided) for (...a range of items...) { //update item count #pragma omp atomic num_items_computed++; //update progress bar with

Calling C# BHO methods from Javascript (still not working)

故事扮演 提交于 2019-12-23 09:18:01
问题 I followed this answer exactly and read and reread all google findings. Unfortunately mostly all of them simply the copy and pastes of the referenced answer (including the 'Stop banging your head against the wall and go celebrate!') sentence and it does not work for me... So after a half day working I am really about to start banging my head... My simple error: The javascript windows.myExtension object is 'undefined' so calling Foo on it throws error. See the full source below. It seems the

change Access Permissions in Component Services > COM Security with script/api?

你。 提交于 2019-12-23 09:01:06
问题 is there an api to change the Access Permissions for the COM Security? i need to write new values to "Edit Limits..." and "Edit Default...". are these plain registry settings? can't find how to set these entries. 回答1: The quick answer is Yes they are registry settings, the long answer is No they are not simple registry settings. The values are binary and point to an ACL structure. In order to change these you need to load, update, and save the ACL (which requires a fair amount of code). The

Is it possible to automate a Click-to-run application?

只谈情不闲聊 提交于 2019-12-23 07:55:38
问题 I have a small application which automates Microsoft Word via COM/OLE Automation. Unfortunately this doesn't work with the virtualized Click-to-run editions of Word, because they don't have the required keys in the registry. (At least not where they are exptected to be) In other words: CreateObject fails because the necessary COM classes are not registered. Is there any way to automate the Click-to-run editions of Microsoft Office? Perhaps some compatibility layer? EDIT: I found just two

CoInitialize() has not been called exceptions in C++

偶尔善良 提交于 2019-12-23 07:26:37
问题 - My problem I got CoInitialize has not been called exption. - My project structure Here is my porblem. I have a COM dll, MCLWrapper.dll developped with C#; I have a nother native C++ dll, ThorDetectorSwitch.dll that calls MCLWrapper.dll; And finally, I have a console application TDSTest.exe that calls ThorDetectorSwitch.dll. Basically, something like this: TDSTest.exe (C++ console) -> ThorDetectorSwitch.dll (C++ native) -> MCLWrapper.dll (C#) Code in TDSTest.exe that loads the

C# ITypeInfo.GetContainingTypeLib fails when passed live instance of VBA Class

*爱你&永不变心* 提交于 2019-12-23 07:06:20
问题 So I have experimented on calling ITypeInfo on a VBA Class instance and whilst it looks promising I wanted to see if I could get a reference to its containing project, an analogue to a type library. I thought ITypeInfo.GetContainingTypeLib might be useful but it throws an exception indicating VBA won't co-operate. Anyone got any ideas about how VBA maybe doing things differently from the standard COM specification? The C# Class library code is here. Register for COM interop and set COMVisible