1. Introduction 1.1 In this multi-part post, I will present an implementation of the .Net IList interface using unmanaged code. 1.2 Specifically, I shall be coding in C++ using ATL. 1.3 In this part 1, I will show how to use several STL classes and techniques to provide the functionality of IList. 1.4 Another important … Continue reading
1. Introduction. 1.1 This article is a follow up to my last blog Programmatically Register Assemblies in C#. 1.2 In that article, I mentioned that I will be writing more to explain implementations for the ITypeLibExporterNotifySink interface as used in the context of a call to TypeLibConverter.ConvertAssemblyToTypeLib(). 1.3 I will dive straight into exploring this … Continue reading
1. Introduction. 1.1 After publishing Programmatically Register COM Dlls in C# back in 2011, I received a number of requests for advise on how to register managed assemblies as COM servers. 1.2 In this blog, I will present the reader with a sample C# program that will perform such registration. 1.3 The sample assembly COM-registration … Continue reading
1. Introduction. 1.1 Recently, a friend asked me for advise on a very unusual requirement. 1.2 He needs to replace all UUIDs in a COM DLL with new ones. 1.3 He does not have the source codes to the original COM server so any modifications will have to be done on the binary code. 1.4 … Continue reading
1. Introduction. 1.1. It will be hard to find an intermediate and advanced .NET programmer who has not heard of MSIL. 1.2 I have occasionally worked with IL code in the past, specifically when there is a need to modify the declarations of parameters and attributes for the purpose of interop marshaling. 1.3 Then last … Continue reading
1. Introduction. 1.1 Extension methods were introduced in C# 3.0. 1.2 The main purpose of extension methods is to provide for seamless integration of new functionalities to existing classes. 1.3 I have personally used extension methods to great effect in my projects and I intend to share some of my extension methods with readers in … Continue reading
1. Introduction. 1.1 This blog is the third segment of the series of articles that discusses the problems and workarounds in relation to passing a reference to a SAFEARRAY as parameter to a dispinterface-based event which is fired from an unmanaged COM server to a managed client. 1.2 In part 2, I presented a workaround … Continue reading
1. Introduction. 1.1 This article is a follow up to my earlier blog which outlined the problems with passing a reference to a SAFEARRAY as parameter to a dispinterface-based event which is fired from an unmanaged COM server to a managed client. 1.2 Through this article and the next one to follow, I will demonstrate … Continue reading
1. Introduction 1.1 I recently ran into an unexpected problem with the .NET CLR. 1.2 It appears that its internal internal mechanism for processing COM events inadequately handles reference SAFEARRAYs passed as event parameters. 1.3 In this blog, I will demonstrate the problem with sample codes. It is my hope that interested readers will research … Continue reading
1. Introduction 1.1 Recently, a junior colleague approached me for some advise. 1.2 As part of his project work, he had need to programmatically perform printing using C#. 1.3 The document he was assigned to print includes a combination of text and images. 1.4 He had no prior experience in this task and was daunted … Continue reading