activation-context-api

Where do I need to switch the Activation Context?

无人久伴 提交于 2019-12-04 12:35:24
The problem I'm facing is essentially described here , that is: I have a DLL that is using a 3rd party in-process COM component dll. I want to use registration free COM with that in-process component. I want to embed and use a manfest into this DLL (not into the main EXE) so that I can use the 3rd party component in a reg free way. The Interface I use from the component is activated through a call to CoCreateInstance . The 3rd party COM component hasn't got any further (COM) dependencies and doesn't rely on or need isolation. I see that simply embedding a manifest into my DLL doesn't work, as

Embed a Registration-Free COM manifest into a C# dll with native/managed environment

一笑奈何 提交于 2019-12-04 11:13:07
I'm currently working on a mixed native / managed application chain, which employs registration-free COM. The following image illustrates this: The C# wrapper DLL has been created using the tlbimp.exe utility. This allows each of the C# executables to access the native types and methods in the COM DLL. The COM DLL itself employs a server based RegFree COM manifest. Everything works fine, when the client based RegFree COM manifests are embedded in the C# executables. However, I would like to move and unify these manifest files into the C# DLL, which would ease maintenance and synchronization of

Registration-Free COM Interop: Deactivating activation context in finalizer throws SEHException

余生颓废 提交于 2019-12-02 07:21:04
I am currently working on a mixed managed / native work chain and need to create an activation context for registration-free COM support (see Embed a Registration-Free COM manifest into a C# dll with native/managed environment ). The following snippet is part of a larger class inside a C# DLL, which holds a reference to a COM Wrapper and establishes the required activation context: using System; using System.Runtime.InteropServices; using System.Diagnostics; namespace FirstClient { public class FirstClientDLL : IDisposable { ~FirstClientDLL() { Dispose(false); } void IDisposable.Dispose() {

Win32. Enable visual styles in dll

别等时光非礼了梦想. 提交于 2019-11-29 02:37:31
I've got no experience in C++ and Win API so sorry if this question is nooby. I've got DLL where I create some components, MessageBox for example. I added pragma comment to enable visual styles and it does not work (and it shouldn't as I know from this answer: windows 7 style for combobox on internet explorer toolbar, how? Dll code(omit export and so on): #include "stdafx.h" #include "my-dll.h" #include <Windows.h> #pragma comment(linker,"\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df'