//
archives

Archive for

Using The UnknownWrapper Class Part 2.

1. Introduction. 1.1 In┬ápart 1 of this series of articles, I demonstrated how to use the UnknownWrapper class to pass an IUnknown interface pointer from a COM-visible managed object to a COM method. 1.2 The COM method specifically takes a VARIANT parameter and the COM-visible managed object has to be contained inside a System.Object instance. … Continue reading

Using The UnknownWrapper Class Part 1.

1. Introduction. 1.1 The UnknownWrapper class is a helper class designed to be exposed to COM as a VARIANT. 1.2 Furthermore, it is specifically designed to contain an IUnknown interface pointer extracted from a managed Object. 1.3 This article explains why such a wrapper is necessary and how to use it. 1.4 Part 1 will … Continue reading

Using the SafeHandle Class to Customize the Management of Unmanaged Handles.

1. Introduction. 1.1 Recently (circa March 2012) I┬ábecame interested to see how we can use managed SafeHandle-derived classes to wrap various Operating System handles for customized management. 1.2 I thus began to do research on this subject and eventually emerged with this article and the accompanying sample codes. 1.3 I hope that this article will … Continue reading